Ostruct relies on #frozen? to block modification. And also allows modification 
of new members after having been frozen.
-----------------------------------------------------------------------------------------------------------------------

                 Key: JRUBY-3446
                 URL: http://jira.codehaus.org/browse/JRUBY-3446
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.2
         Environment: Linux siena 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 
UTC 2009 i686 GNU/Linux
jruby 1.2.0RC1 (ruby 1.8.6 patchlevel 287) (2009-02-25 rev 6586) [i386-java]
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 1.6.0_0-b12, mixed mode, sharing)

            Reporter: Robert Dober
         Attachments: ostruct.patch, ostructfrozen.rb

After freezing an ostruct one can assign to a new member.
One can also assign to any members if OpenStruct#frozen? is redefined thus that 
it returns a non true value, or if the singleton class of an ostruct object was 
modified in this very way before it was frozen.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to