diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-03-06 15:23:31 +0000 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-03-06 15:23:31 +0000 |
commit | 5e7ce47fb9ab50858fe067a6eb6c0462c5c5681e (patch) | |
tree | 1eca518e7fb90f27e6b9e318a0021f2d820e756f /activesupport/lib | |
parent | 31f09f9dbc1b8e598fc82d86b622167bfc01d18a (diff) | |
download | rails-5e7ce47fb9ab50858fe067a6eb6c0462c5c5681e.tar.gz rails-5e7ce47fb9ab50858fe067a6eb6c0462c5c5681e.tar.bz2 rails-5e7ce47fb9ab50858fe067a6eb6c0462c5c5681e.zip |
Report the correct value of nil.id in the exception message
as different ruby implementations may have different values,
for example Rubinius returns 53 for nil.id.
[#6444 state:resolved]
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/whiny_nil.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/whiny_nil.rb b/activesupport/lib/active_support/whiny_nil.rb index 91ddef2619..bcedbfd57a 100644 --- a/activesupport/lib/active_support/whiny_nil.rb +++ b/activesupport/lib/active_support/whiny_nil.rb @@ -37,7 +37,7 @@ class NilClass # Raises a RuntimeError when you attempt to call +id+ on +nil+. def id - raise RuntimeError, "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id", caller + raise RuntimeError, "Called id for nil, which would mistakenly be #{object_id} -- if you really wanted the id of nil, use object_id", caller end private |