ruby-changes:46996
From: nobu <ko1@a...>
Date: Sun, 18 Jun 2017 13:29:10 +0900 (JST)
Subject: [ruby-changes:46996] nobu:r59111 (trunk): test_string.rb: chomp! frozen string
nobu 2017-06-18 13:29:05 +0900 (Sun, 18 Jun 2017) New Revision: 59111 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59111 Log: test_string.rb: chomp! frozen string * test/ruby/test_string.rb (TestString#test_chomp): should raise if frozen. Modified files: trunk/test/ruby/test_string.rb Index: test/ruby/test_string.rb =================================================================== --- test/ruby/test_string.rb (revision 59110) +++ test/ruby/test_string.rb (revision 59111) @@ -441,6 +441,9 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L441 assert_equal("foo\r", s) assert_equal(S("a").hash, S("a\u0101").chomp!(S("\u0101")).hash, '[ruby-core:22414]') + + s = S("").freeze + assert_raise_with_message(RuntimeError, /frozen/) {s.chomp!} ensure $/ = save end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/