aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_optimization.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb
index 2f9c0f6d22..129f62a0ff 100644
--- a/test/ruby/test_optimization.rb
+++ b/test/ruby/test_optimization.rb
@@ -87,6 +87,11 @@ class TestRubyOptimization < Test::Unit::TestCase
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?