summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2020-01-20 09:38:52 +0900
committeraycabta <aycabta@gmail.com>2020-01-21 09:51:26 +0900
commit93ca212ddac5ac49134f2058c24db3948b6695c6 (patch)
treed58ffb723f8a535e50d57f616e4af1a968a19241 /lib/irb.rb
parent51a8055d7db8a6ae35a9f624700c0910ec20aeb8 (diff)
[ruby/irb] [ruby/irb] Rewrite an expression to detect multiline
https://github.com/ruby/irb/commit/ed5cf375a6 https://github.com/ruby/irb/commit/5b7bbf9c34
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 3e08877..ac868d9 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -737,7 +737,7 @@ module IRB
def output_value # :nodoc:
str = @context.inspect_last_value
- multiline_p = str.each_line.take(2).length > 1
+ multiline_p = /\A.*\Z/ !~ str
if multiline_p && @context.newline_before_multiline_output?
printf @context.return_format, "\n#{str}"
else