Project

General

Profile

Actions

Backport #2415

closed

syntax errors in method name or argument inside do block causes SEGV ( Re: Methods with default params not at the end and with rest params)

Added by nobu (Nobuyoshi Nakada) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
[ruby-core:26961]

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0