aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Katz <wycats@Yehuda-Katz.local>2009-12-24 23:48:35 -0800
committerYehuda Katz <wycats@Yehuda-Katz.local>2009-12-24 23:48:35 -0800
commit1c66f85eb6cd80053cf60889634a8c39c21b11a1 (patch)
tree4f153960d158c119ebdcef7a3a02c407e4b82dd0
parent3b1642c23cb433dde3d96f0b70dfdc66d15f6713 (diff)
downloadrails-1c66f85eb6cd80053cf60889634a8c39c21b11a1.tar.gz
rails-1c66f85eb6cd80053cf60889634a8c39c21b11a1.tar.bz2
rails-1c66f85eb6cd80053cf60889634a8c39c21b11a1.zip
This code was needed to work around http://redmine.ruby-lang.org/issues/show/2494. Since that bug is now closed in Ruby, we can remove it.
-rw-r--r--activesupport/lib/active_support/whiny_nil.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/whiny_nil.rb b/activesupport/lib/active_support/whiny_nil.rb
index c3ed659d6b..4f6ff7d3b5 100644
--- a/activesupport/lib/active_support/whiny_nil.rb
+++ b/activesupport/lib/active_support/whiny_nil.rb
@@ -43,10 +43,7 @@ class NilClass
private
def method_missing(method, *args, &block)
- # Ruby 1.9.2: disallow explicit coercion via method_missing.
- if method == :to_ary || method == :to_str
- raise NoMethodError, "undefined method `#{method}' for nil:NilClass"
- elsif klass = METHOD_CLASS_MAP[method]
+ if klass = METHOD_CLASS_MAP[method]
raise_nil_warning_for klass, method, caller
else
super