diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-07-23 23:44:25 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-07-23 23:44:25 +0900 |
commit | 098e8c2873ed7cfa276aa87967ce28ac711cbb30 (patch) | |
tree | 254299ad15003cc881b0ca4b22bd5db902b8b60f | |
parent | e43d62957599ea6607ceb851b7bd9d90148de16b (diff) |
Suppress "assigned but unused variable" warnings
-rw-r--r-- | lib/irb/ruby-lex.rb | 2 | ||||
-rw-r--r-- | test/fiber/test_io.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 6a7df1ad96..5d7bf006be 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -34,7 +34,7 @@ class RubyLex line_no = 1 begin result = yield code, line_no - rescue ArgumentError => e + rescue ArgumentError code = ";\n#{code}" line_no = 0 result = yield code, line_no diff --git a/test/fiber/test_io.rb b/test/fiber/test_io.rb index 270e4f35e7..c23f67edaa 100644 --- a/test/fiber/test_io.rb +++ b/test/fiber/test_io.rb @@ -44,14 +44,14 @@ class TestFiberIO < Test::Unit::TestCase skip unless defined?(UNIXSocket) 16.times.map do - thread = Thread.new do + Thread.new do i, o = UNIXSocket.pair scheduler = Scheduler.new Thread.current.scheduler = scheduler Fiber do - message = i.read(20) + i.read(20) i.close end |