aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/whiny_nil.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/whiny_nil.rb b/activesupport/lib/active_support/whiny_nil.rb
index 4a83cd585e..3612c6acbf 100644
--- a/activesupport/lib/active_support/whiny_nil.rb
+++ b/activesupport/lib/active_support/whiny_nil.rb
@@ -18,6 +18,10 @@ class NilClass
@@method_class_map[method.to_sym] = klass
end
end
+
+ def id
+ raise "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id"
+ end
private
def method_missing(method, *args, &block)