summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/symbol/test_type.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/-ext-/symbol/test_type.rb b/test/-ext-/symbol/test_type.rb
index d6816754c8..9053d936e2 100644
--- a/test/-ext-/symbol/test_type.rb
+++ b/test/-ext-/symbol/test_type.rb
@@ -3,6 +3,16 @@ require "-test-/symbol"
module Test_Symbol
class TestType < Test::Unit::TestCase
+ def test_id2str_fstring_bug9171
+ fstr = eval("# encoding: us-ascii
+ 'foobar'.freeze")
+ assert_same fstr, Bug::Symbol.id2str(:foobar)
+
+ fstr = eval("# encoding: us-ascii
+ '>'.freeze")
+ assert_same fstr, Bug::Symbol.id2str(:>)
+ end
+
def assert_symtype(sym, pred, msg = nil)
assert_send([Bug::Symbol, pred, sym], msg)
end