ruby-changes:35840
From: normal <ko1@a...>
Date: Wed, 15 Oct 2014 07:02:03 +0900 (JST)
Subject: [ruby-changes:35840] normal:r47922 (trunk): test/ruby/test_optimization.rb (test_string_size): new test
normal 2014-10-15 07:01:54 +0900 (Wed, 15 Oct 2014) New Revision: 47922 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47922 Log: test/ruby/test_optimization.rb (test_string_size): new test String#size may be overridden, so test for it. Modified files: trunk/ChangeLog trunk/test/ruby/test_optimization.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 47921) +++ ChangeLog (revision 47922) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Oct 15 07:00:14 2014 Eric Wong <e@8...> + + * test/ruby/test_optimization.rb (test_string_size): new test + Wed Oct 15 06:51:13 2014 Eric Wong <e@8...> * test/ruby/test_optimization.rb (test_string_eq_neq): new test Index: test/ruby/test_optimization.rb =================================================================== --- test/ruby/test_optimization.rb (revision 47921) +++ test/ruby/test_optimization.rb (revision 47922) @@ -87,6 +87,11 @@ class TestRubyOptimization < Test::Unit: https://github.com/ruby/ruby/blob/trunk/test/ruby/test_optimization.rb#L87 assert_redefine_method('String', 'length', 'assert_nil "string".length') end + def test_string_size + assert_equal 6, "string".size + assert_redefine_method('String', 'size', 'assert_nil "string".size') + end + def test_string_empty? assert_equal true, "".empty? assert_equal false, "string".empty? -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/