[MacRuby] #1477: Macirb no longer understands blocks with more than one argument
#1477: Macirb no longer understands blocks with more than one argument --------------------------------+------------------------------------------- Reporter: lastobelus@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Since the Jan. 12th nightly, macirb no longer understands blocks with more than one argument: {{{ irb(main):002:0> h={:a => "a", :b => "b"} => {:a=>"a", :b=>"b"} irb(main):003:0> h.each{|k,v| puts k;puts v} SyntaxError: compile error (irb):3: duplicated argument name }}} (In the first few builds after jan 12, this caused a breakpoint trap) -- Ticket URL: <http://www.macruby.org/trac/ticket/1477> MacRuby <http://macruby.org/>
#1477: Macirb no longer understands blocks with more than one argument --------------------------------+------------------------------------------- Reporter: lastobelus@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by watson1978@…): Hmm, it looks like Bugs have mixed into Ripper. {{{ require 'ripper' class Parser < Ripper::SexpBuilder ms = Ripper::SexpBuilder.new('').methods defs = ms.map { |s| s.to_s } .select { |s| s.start_with?('on_') } .map { |s| %Q{ def #{s}(*args) print '#{s}: ' p args end }}.join eval(defs) end def parse(src) puts "****" + src.inspect + "****" Parser.new(src).parse end parse "def test(a,b)" }}} {{{ $ macruby_select 0.10 t.rb ****"def test(a,b)"**** on_kw: ["def"] on_sp: [" "] on_ident: ["test"] on_lparen: ["("] on_ident: ["a"] on_comma: [","] on_ident: ["b"] on_rparen: [")"] on_params: [[["a"], ["b"]], nil, nil, nil, nil] on_paren: [[[["a"], ["b"]], nil, nil, nil, nil]] on_parse_error: ["syntax error, unexpected $end"] $ macruby t.rb ****"def test(a,b)"**** on_kw: ["def"] on_sp: [" "] on_ident: ["test"] on_lparen: ["("] on_ident: ["a"] on_comma: [","] on_ident: ["b"] on_rparen: [")"] on_parse_error: ["duplicated argument name"] # <= unexpected on_params: [[["a"], ["b"]], nil, nil, nil, nil] on_paren: [[[["a"], ["b"]], nil, nil, nil, nil]] on_parse_error: ["syntax error, unexpected $end"] }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1477#comment:1> MacRuby <http://macruby.org/>
#1477: Macirb no longer understands blocks with more than one argument --------------------------------+------------------------------------------- Reporter: lastobelus@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/611c2ec874a125955b27f5e7ca54864402... -- Ticket URL: <http://www.macruby.org/trac/ticket/1477#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby