diff options
Diffstat (limited to 'bootstraptest/test_yjit.rb')
-rw-r--r-- | bootstraptest/test_yjit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index b0c17229c5..6d0ba93fc8 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1337,6 +1337,16 @@ assert_equal 'foo123', %q{ make_str("foo", 123) } +# test that invalidation of String#to_s doesn't crash +assert_equal 'meh', %q{ + class String + def to_s + "meh" + end + end + "".to_s +} + # test string interpolation with overridden to_s assert_equal 'foo', %q{ class String |