[macruby-changes] [4861] DietRB/trunk/lib/irb/deprecated.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sun Oct 31 15:58:09 PDT 2010
Revision: 4861
http://trac.macosforge.org/projects/ruby/changeset/4861
Author: eloy.de.enige at gmail.com
Date: 2010-10-31 15:58:07 -0700 (Sun, 31 Oct 2010)
Log Message:
-----------
Silence deprecation warnings for now, unless in $DEBUG mode and cover :AUTO_INDENT.
Modified Paths:
--------------
DietRB/trunk/lib/irb/deprecated.rb
Modified: DietRB/trunk/lib/irb/deprecated.rb
===================================================================
--- DietRB/trunk/lib/irb/deprecated.rb 2010-10-31 22:52:13 UTC (rev 4860)
+++ DietRB/trunk/lib/irb/deprecated.rb 2010-10-31 22:58:07 UTC (rev 4861)
@@ -1,5 +1,6 @@
module IRB
def self.deprecated(message, caller)
+ return unless $DEBUG
caller = caller.first.split(':')[0..-2].join(':')
warn "[!] Deprecation warning from #{caller}: #{message}"
end
@@ -31,6 +32,9 @@
when :PROMPT_MODE
message = "use `IRB.formatter.prompt = :#{value.downcase}'"
IRB.formatter.prompt = "#{value.to_s.downcase}".to_sym
+ when :AUTO_INDENT
+ message = "use `IRB.formatter.auto_indent = #{value}'"
+ IRB.formatter.auto_indent = value
when :USE_READLINE
message = "for now DietRB only has a readline module"
when :SAVE_HISTORY
@@ -40,4 +44,4 @@
value
end
end
-end
\ No newline at end of file
+end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101031/86e1c35e/attachment.html>
More information about the macruby-changes
mailing list