Permalink
Browse files

This code was needed to work around http://redmine.ruby-lang.org/issu…

…es/show/2494. Since that bug is now closed in Ruby, we can remove it.
  • Loading branch information...
1 parent 3b1642c commit 1c66f85eb6cd80053cf60889634a8c39c21b11a1 Yehuda Katz committed Dec 25, 2009
Showing with 1 addition and 4 deletions.
  1. +1 −4 activesupport/lib/active_support/whiny_nil.rb
@@ -43,10 +43,7 @@ def id
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

0 comments on commit 1c66f85

Please sign in to comment.