summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-08-16 22:25:31 +0900
committeraycabta <aycabta@gmail.com>2020-08-18 14:38:02 +0900
commit43c648c8325db536715a8e827951ac48114eb6bd (patch)
tree0a7125760975e4a898e4fc25ff45853821b9fad0 /lib
parentb3f84b4a5b7c78339c28baa11f75ed4c121bd5ca (diff)
[ruby/irb] Support shortening lambda notation
https://github.com/ruby/irb/commit/8e3f81d428
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/ruby-lex.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb
index 3568e66a66..a90c97c6b2 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -398,7 +398,7 @@ class RubyLex
next
end
case t[1]
- when :on_lbracket, :on_lbrace, :on_lparen
+ when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
depth_difference += 1
open_brace_on_line += 1
when :on_rbracket, :on_rbrace, :on_rparen
@@ -481,7 +481,7 @@ class RubyLex
next
end
case t[1]
- when :on_lbracket, :on_lbrace, :on_lparen
+ when :on_lbracket, :on_lbrace, :on_lparen, :on_tlambeg
spaces_of_nest.push(spaces_at_line_head + open_brace_on_line * 2)
open_brace_on_line += 1
when :on_rbracket, :on_rbrace, :on_rparen