ruby-changes:62386
From: Yusuke <ko1@a...>
Date: Thu, 23 Jul 2020 23:44:58 +0900 (JST)
Subject: [ruby-changes:62386] 098e8c2873 (master): Suppress "assigned but unused variable" warnings
https://git.ruby-lang.org/ruby.git/commit/?id=098e8c2873 From 098e8c2873ed7cfa276aa87967ce28ac711cbb30 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Thu, 23 Jul 2020 23:44:25 +0900 Subject: Suppress "assigned but unused variable" warnings diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 6a7df1a..5d7bf00 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -34,7 +34,7 @@ class RubyLex https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-lex.rb#L34 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 270e4f3..c23f67e 100644 --- a/test/fiber/test_io.rb +++ b/test/fiber/test_io.rb @@ -44,14 +44,14 @@ class TestFiberIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/fiber/test_io.rb#L44 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/