summaryrefslogtreecommitdiff
path: root/test/ruby/test_literal.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 09:34:41 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-30 11:45:37 +0900
commit409b0ec4c3c4878c0ba164d1303de67787157808 (patch)
tree292c5554ee9f81571b760d359ac9513c44da3ee0 /test/ruby/test_literal.rb
parent84837e6d16cb0e588b1acc2691cb1048b9a89989 (diff)
Suppress unused variable warnings
Diffstat (limited to 'test/ruby/test_literal.rb')
-rw-r--r--test/ruby/test_literal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index 3f5acde3df..3f87f860b1 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -187,7 +187,7 @@ class TestRubyLiteral < Test::Unit::TestCase
if defined?(RubyVM::InstructionSequence.compile_option) and
RubyVM::InstructionSequence.compile_option.key?(:debug_frozen_string_literal)
def test_debug_frozen_string
- src = 'n = 1; "foo#{n ? "-#{n}" : ""}"'; f = "test.rb"; n = 1
+ src = 'n = 1; _="foo#{n ? "-#{n}" : ""}"'; f = "test.rb"; n = 1
opt = {frozen_string_literal: true, debug_frozen_string_literal: true}
str = RubyVM::InstructionSequence.compile(src, f, f, n, opt).eval
assert_equal("foo-1", str)