[ruby-cvs:59276] eregon:r52125 (trunk): * lib/ostruct.rb: Finish defining OpenStruct attributes lazily.

eregon at ruby-lang.org eregon at ruby-lang.org
Thu Oct 15 01:57:22 JST 2015


eregon	2015-10-15 01:57:21 +0900 (Thu, 15 Oct 2015)

  New Revision: 52125

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52125

  Log:
    * lib/ostruct.rb: Finish defining OpenStruct attributes lazily.
      Patch by @sferik in [GH-1037]: https://github.com/ruby/ruby/pull/1037
      This commit is an addendum to https://github.com/ruby/ruby/pull/1033.
      It:
      1. lazily defines attribute accessors for copied and marshaled objects,
      2. returns nil when an attribute reader is not defined, and
      3. defines respond_to_missing? to maintain the same respond_to? behavior

  Modified files:
    trunk/ChangeLog
    trunk/lib/ostruct.rb


More information about the ruby-cvs mailing list