Actions
Bug #10280
closedRegression while evaluating default argments of a method
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0preview1 (2014-09-17 trunk 47616) [x86_64-darwin13]
Backport:
Description
class DefArg
def calc(str, val=val)
p val
end
def val
10
end
end
# ruby-2.2.0-preview1 => nil
# ruby-2.1.3 => 10
DefArg.new.calc("hello")
im not sure what ruby spec says. but it looks like this program should print 10 in both the cases.
Actions
Like0
Like0Like0Like0