ruby-changes:44892
From: nobu <ko1@a...>
Date: Fri, 2 Dec 2016 15:13:01 +0900 (JST)
Subject: [ruby-changes:44892] nobu:r56965 (trunk): test/ruby/test_string.rb: ensure restoring $/
nobu 2016-12-02 15:12:56 +0900 (Fri, 02 Dec 2016) New Revision: 56965 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56965 Log: test/ruby/test_string.rb: ensure restoring $/ Modified files: trunk/test/ruby/test_string.rb Index: test/ruby/test_string.rb =================================================================== --- test/ruby/test_string.rb (revision 56964) +++ test/ruby/test_string.rb (revision 56965) @@ -381,6 +381,8 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L381 $/ = save assert_equal(S("a").hash, S("a\u0101").chomp(S("\u0101")).hash, '[ruby-core:22414]') + ensure + $/ = save end def test_chomp! @@ -437,6 +439,8 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L439 assert_equal("foo\r", s) assert_equal(S("a").hash, S("a\u0101").chomp!(S("\u0101")).hash, '[ruby-core:22414]') + ensure + $/ = save end def test_chop @@ -665,6 +669,7 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L669 S("hello!world").lines.each {|x| res << x} assert_equal(S("hello!"), res[0]) assert_equal(S("world"), res[1]) + ensure $/ = save end @@ -807,6 +812,8 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L812 assert_nothing_raised(bug7646) do "\n\u0100".each_line("\n") {} end + ensure + $/ = save end def test_lines -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/