public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Tighten the rescue clause when dealing with invalid instance variable 
names in form_helper.
NZKoz (author)
Tue Jul 01 10:43:57 -0700 2008
jeremy (committer)
Tue Jul 15 15:54:19 -0700 2008
commit  b32790c558435a3cb454a1221fb520264d3d42c2
tree    979d77994a711d977cfeed33364efb0f982d6c89
parent  0d96fcc7840f6e4981f3cce1b517d0e0c80a65bc
...
601
602
603
604
 
 
 
 
 
605
606
607
...
601
602
603
 
604
605
606
607
608
609
610
611
0
@@ -601,7 +601,11 @@ module ActionView
0
       end
0
 
0
       def object
0
- @object || (@template_object.instance_variable_get("@#{@object_name}") rescue nil)
0
+ @object || @template_object.instance_variable_get("@#{@object_name}")
0
+ rescue NameError
0
+ # As @object_name may contain the nested syntax (item[subobject]) we
0
+ # need to fallback to nil.
0
+ nil
0
       end
0
 
0
       def value(object)

Comments

    No one has commented yet.