Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 1472

Show
Ignore:
Timestamp:
06/21/05 16:36:40 (3 years ago)
Author:
david
Message:

Added an exception if calling id on nil to WhinyNil #584 [kevin-temp@writesoon.com]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/CHANGELOG

    r1466 r1472  
    11*SVN* 
     2 
     3* Added an exception if calling id on nil to WhinyNil #584 [kevin-temp@writesoon.com] 
    24 
    35* Added Fix/Bignum#multiple_of? which returns true on 14.multiple_of?(7) and false on 16.multiple_of?(7) #1464 [Thomas Fuchs] 
  • trunk/activesupport/lib/active_support/whiny_nil.rb

    r1455 r1472  
    1818      @@method_class_map[method.to_sym] = klass 
    1919    end 
     20  end 
     21   
     22  def id 
     23    raise "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id" 
    2024  end 
    2125