Hi Matz,

On Mon, Nov 30, 2009 at 9:02 AM, Yukihiro Matsumoto <matz / ruby-lang.org> wrote:
>
> The argument order is
>
>  ¨Βαξδατοςω­αςησ¬ οπτιοξαμ­αςησ¬ ςεστ­αςηποστ­ναξδατοςω­αςη>
> you put post-mandatory-args before rest-arg.

Ah, got it, thanks!

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

Here's what I get when I try to run such a spec:

/opt/work/mspec.git/lib/mspec/runner/mspec.rb:55: [BUG] Segmentation fault
ruby 1.9.2dev (2009-11-17) [i686-linux]

-- control frame ----------
c:0015 p:---- s:0045 b:0045 l:000044 d:000044 CFUNC  :load
c:0014 p:0018 s:0041 b:0041 l:002620 d:000040 BLOCK
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:55
c:0013 p:---- s:0039 b:0039 l:000038 d:000038 FINISH
c:0012 p:---- s:0037 b:0037 l:000036 d:000036 CFUNC  :instance_eval
c:0011 p:0017 s:0034 b:0034 l:000033 d:000033 METHOD
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:67
c:0010 p:0081 s:0028 b:0028 l:002620 d:002660 BLOCK
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:55
c:0009 p:---- s:0025 b:0025 l:000024 d:000024 FINISH
c:0008 p:---- s:0023 b:0023 l:000022 d:000022 CFUNC  :each
c:0007 p:0055 s:0020 b:0020 l:002620 d:002620 METHOD
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:49
c:0006 p:0023 s:0016 b:0016 l:000015 d:000015 METHOD
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:41
c:0005 p:0063 s:0013 b:0013 l:000012 d:000012 METHOD
/opt/work/mspec.git/lib/mspec/commands/mspec-run.rb:87
c:0004 p:0098 s:0010 b:0010 l:000009 d:000009 METHOD
/opt/work/mspec.git/lib/mspec/utils/script.rb:217
c:0003 p:0082 s:0006 b:0006 l:0014a4 d:000004 EVAL
/opt/work/mspec.git/bin/mspec-run:8
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0014a4 d:0014a4 TOP
---------------------------
/opt/work/mspec.git/bin/mspec-run:8:in `<main>'
/opt/work/mspec.git/lib/mspec/utils/script.rb:217:in `main'
/opt/work/mspec.git/lib/mspec/commands/mspec-run.rb:87:in `run'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:41:in `process'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:49:in `files'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:49:in `each'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:55:in `block in files'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:67:in `protect'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:67:in `instance_eval'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:55:in `block (2 levels) in files'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:55:in `load'

-- C level backtrace information -------------------------------------------
/opt/ruby19-dev/bin/ruby(rb_vm_bugreport+0xbd) [0x816d83d]
/opt/ruby19-dev/bin/ruby [0x81a9d09]
/opt/ruby19-dev/bin/ruby(rb_bug+0x2b) [0x81a9dab]
/opt/ruby19-dev/bin/ruby [0x80fcd05]
[0xb7fbe440]
/opt/ruby19-dev/bin/ruby [0x80bcee9]
/opt/ruby19-dev/bin/ruby(ruby_suppress_tracing+0xf3) [0x816f1e3]
/opt/ruby19-dev/bin/ruby(rb_parser_compile_file+0x7b) [0x809d73b]
/opt/ruby19-dev/bin/ruby [0x80fb641]
/opt/ruby19-dev/bin/ruby(rb_ensure+0x51) [0x805d631]
/opt/ruby19-dev/bin/ruby(rb_load_file+0x57) [0x80f9cc7]
/opt/ruby19-dev/bin/ruby [0x81abb15]
/opt/ruby19-dev/bin/ruby [0x81ac7c7]
/opt/ruby19-dev/bin/ruby [0x8154d14]
/opt/ruby19-dev/bin/ruby [0x8158131]
/opt/ruby19-dev/bin/ruby [0x81589ed]
/opt/ruby19-dev/bin/ruby [0x815b96d]
/opt/ruby19-dev/bin/ruby [0x816319d]
/opt/ruby19-dev/bin/ruby [0x81639d6]
/opt/ruby19-dev/bin/ruby [0x816432c]
/opt/ruby19-dev/bin/ruby [0x8164d8f]
/opt/ruby19-dev/bin/ruby [0x8154d14]
/opt/ruby19-dev/bin/ruby [0x8158131]
/opt/ruby19-dev/bin/ruby [0x81589ed]
/opt/ruby19-dev/bin/ruby [0x815b96d]
/opt/ruby19-dev/bin/ruby [0x816319d]
/opt/ruby19-dev/bin/ruby [0x81639d6]
/opt/ruby19-dev/bin/ruby(rb_yield+0x47) [0x8163f17]
/opt/ruby19-dev/bin/ruby(rb_ary_each+0x41) [0x817cc81]
/opt/ruby19-dev/bin/ruby [0x8158131]
/opt/ruby19-dev/bin/ruby [0x81589ed]
/opt/ruby19-dev/bin/ruby [0x815b96d]
/opt/ruby19-dev/bin/ruby [0x816319d]
/opt/ruby19-dev/bin/ruby(rb_iseq_eval_main+0x1c4) [0x8163494]
/opt/ruby19-dev/bin/ruby [0x805db02]
/opt/ruby19-dev/bin/ruby(ruby_run_node+0x4c) [0x805fcac]
/opt/ruby19-dev/bin/ruby(main+0x60) [0x805cdc0]
/lib/libc.so.6(__libc_start_main+0xe0) [0xb7e17450]
/opt/ruby19-dev/bin/ruby [0x805ccf1]

Thanks,
  --Vladimir