This project is archived and is in readonly mode.
ActiveSupport: nil.id could not be 4
Reported by nakahiro (at gmail) | February 17th, 2011 @ 10:19 AM
Cosmetic: proper care about nil.id for Ruby impls.
nil.id could not be 4. Just a exception message thing.
% ~/ruby/rubinius-1.2.1/bin/rbx -ve 'p nil.object_id' rubinius
1.2.1 (1.8.7 release 2011-02-15 JI) [x86_64-unknown-linux-gnu]
53
Patch attached for activesupport/lib/active_support/whiny_nil.rb
Comments and changes to this ticket
-
Andrew White February 17th, 2011 @ 01:57 PM
- State changed from new to open
- Assigned user set to Andrew White
- Importance changed from to Low
I think you mean 'may not be 4' - 'could not' implies that it's never 4.
Rather than making the message even more ambiguous I think we should just put the result of nil.object_id in there. You'll need a test that stubs nil.object_id to return a different value and asserts the error message is correct before I can apply the patch.
-
Repository March 6th, 2011 @ 03:32 PM
- State changed from open to resolved
(from [824107b2edb12ec275673c1f0e656a5e7ed6f4bf]) 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] https://github.com/rails/rails/commit/824107b2edb12ec275673c1f0e656...
-
Repository March 6th, 2011 @ 03:32 PM
(from [5e7ce47fb9ab50858fe067a6eb6c0462c5c5681e]) 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] https://github.com/rails/rails/commit/5e7ce47fb9ab50858fe067a6eb6c0...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 6444 ActiveSupport: nil.id could not be 4 [#6444 state:resolved] https://github.com/rails/rails/co...
- 6444 ActiveSupport: nil.id could not be 4 [#6444 state:resolved] https://github.com/rails/rails/co...