[ruby-cvs:68312] shyouhei:r61131 (trunk): Add FrozenError as a subclass of RuntimeError

shyouhei at ruby-lang.org shyouhei at ruby-lang.org
Tue Dec 12 09:46:34 JST 2017


shyouhei	2017-12-12 09:46:34 +0900 (Tue, 12 Dec 2017)

  New Revision: 61131

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

  Log:
    Add FrozenError as a subclass of RuntimeError
    
    FrozenError will be used instead of RuntimeError for exceptions
    raised when there is an attempt to modify a frozen object. The
    reason for this change is to differentiate exceptions related
    to frozen objects from generic exceptions such as those generated
    by Kernel#raise without an exception class.
    
    From: Jeremy Evans <code at jeremyevans.net>
    Signed-off-by: Urabe Shyouhei <shyouhei at ruby-lang.org>

  Modified files:
    trunk/error.c
    trunk/include/ruby/ruby.h
    trunk/object.c
    trunk/test/-ext-/string/test_enc_associate.rb
    trunk/test/date/test_date_marshal.rb
    trunk/test/dbm/test_dbm.rb
    trunk/test/gdbm/test_gdbm.rb
    trunk/test/pathname/test_pathname.rb
    trunk/test/ruby/test_array.rb
    trunk/test/ruby/test_class.rb
    trunk/test/ruby/test_enumerator.rb
    trunk/test/ruby/test_eval.rb
    trunk/test/ruby/test_hash.rb
    trunk/test/ruby/test_lazy_enumerator.rb
    trunk/test/ruby/test_literal.rb
    trunk/test/ruby/test_marshal.rb
    trunk/test/ruby/test_module.rb
    trunk/test/ruby/test_object.rb
    trunk/test/ruby/test_pack.rb
    trunk/test/ruby/test_rand.rb
    trunk/test/ruby/test_range.rb
    trunk/test/ruby/test_rubyoptions.rb
    trunk/test/ruby/test_string.rb
    trunk/test/ruby/test_thread.rb
    trunk/test/ruby/test_transcode.rb
    trunk/test/ruby/test_variable.rb
    trunk/test/stringio/test_stringio.rb
    trunk/test/test_delegate.rb
    trunk/test/test_set.rb


More information about the ruby-cvs mailing list