[ruby-cvs:69452] marcandre:r62271 (trunk): lib/ostruct.rb: Use `FrozenError` instead of `RuntimeError`.

marcandre at ruby-lang.org marcandre at ruby-lang.org
Wed Feb 7 08:52:30 JST 2018


marcandre	2018-02-07 08:52:30 +0900 (Wed, 07 Feb 2018)

  New Revision: 62271

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

  Log:
    lib/ostruct.rb: Use `FrozenError` instead of `RuntimeError`.
    
    Patch by Yuuji Yaginuma. [Fixes GH-1808]
    
    In other classes, `FrozenError` will be raised if change the frozen
    object.
    In order to match the behavior, I think that `FrozenError` should
    use in `OpenStruct`.

  Modified files:
    trunk/lib/ostruct.rb
    trunk/test/ostruct/test_ostruct.rb


More information about the ruby-cvs mailing list