Skip to content

Commit

Permalink
Prevent warnings: assigned but unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Sep 15, 2024
1 parent ddbd644 commit bc13ec7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/ruby/test_iseq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def assert_iseq_to_binary(code, mesg = nil)
end

def test_to_binary_with_hidden_local_variables
assert_iseq_to_binary("for foo in bar; end")
assert_iseq_to_binary("for _foo in bar; end")

bin = RubyVM::InstructionSequence.compile(<<-RUBY).to_binary
Object.new.instance_eval do
Expand Down Expand Up @@ -868,7 +868,7 @@ def test_ibf_bignum

def test_compile_prism_with_file
Tempfile.create(%w"test_iseq .rb") do |f|
f.puts "name = 'Prism'; puts 'hello'"
f.puts "_name = 'Prism'; puts 'hello'"
f.close

assert_nothing_raised(TypeError) do
Expand Down

0 comments on commit bc13ec7

Please sign in to comment.