Actions
Bug #17193
closedEndless method definition doesn't work with lambdas in IRB
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-darwin19]
Description
Endless method definition doesn't work with lambdas. Please check the attached screenshot.
def foo() = 123
# => :foo
foo
# => 123
def bar() = lambda { |x| x * x }
# I expected the method to be defined.
def bar() = ->(x) { x * x }
# Same issue.
Nice to have:
def bar = lambda { |x| x * x }
def bar = ->(x) { x * x }
Files
Actions
Like0
Like0Like0Like0Like0Like0