Backport #2415
closedsyntax errors in method name or argument inside do block causes SEGV ( Re: Methods with default params not at the end and with rest params)
Description
=begin
Hi,
At Tue, 1 Dec 2009 01:51:16 +0900,
Vladimir Sizikov wrote in [ruby-core:26959]:
Btw, placing the following in RubySpec crashes all tested MRI versions
from 1.9.0 to the latest trunk, on both Linux and Windows:it "does bad stuff" do
def stuff(a=1, b, *r)
[a, b, r]
end
end
Simpler examples.
0.times do
0.times do
def x(a=1, b, *rest); nil end
end
end
0.times do
0.times do
def x@; nil end
end
end
0.times do
0.times do
def x(a = 0.times do
def x@; nil; end
end)
nil
end
end
end
--
Nobu Nakada
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r25967.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Closed to Assigned
- Assignee set to yugui (Yuki Sonoda)
- Priority changed from 3 to Normal
=begin
=end
Updated by yugui (Yuki Sonoda) over 14 years ago
- Status changed from Assigned to Closed
=begin
This issue was solved with changeset r26014.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end