From 8990779d3693b106fbca014518726ba53224f731 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 18 Jan 2019 09:52:50 +0000 Subject: [PATCH] Prefer block_given? to iterator? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb/cmd/fork.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/cmd/fork.rb b/lib/irb/cmd/fork.rb index ae4d51b5d1..31d53dcaba 100644 --- a/lib/irb/cmd/fork.rb +++ b/lib/irb/cmd/fork.rb @@ -21,7 +21,7 @@ module IRB class << self alias_method :exit, ExtendCommand.irb_original_method_name('exit') end - if iterator? + if block_given? begin yield ensure