[MacRuby] #328: Calling a ObjC-method with a named argument which is a Ruby keyword does not work
#328: Calling a ObjC-method with a named argument which is a Ruby keyword does not work ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ------------------------+--------------------------------------------------- {{{ macruby -e "framework 'ScriptingBridge'; term = SBApplication.applicationWithBundleIdentifier('com.apple.terminal'); term.doScript( 'echo hello', in:nil)" }}} gives an error: {{{ -e:1: syntax error, unexpected keyword_in, expecting ')' ...erm.doScript( 'echo hello', in:nil) ... ^ }}} Calling by selector is working fine: {{{ macruby -e "framework 'ScriptingBridge'; term = SBApplication.applicationWithBundleIdentifier('com.apple.terminal'); term.performSelector( :'doScript:in:', withObject:'echo hello', withObject:nil)" }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/328> MacRuby <http://macruby.org/>
#328: Calling a ObjC-method with a named argument which is a Ruby keyword does not work ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ------------------------+--------------------------------------------------- Changes (by martinlagardette@…): * milestone: MacRuby 0.5 => Comment: It looks like the parser has a problem with the "'''in'''" keyword: {{{ $> macruby -e "obj.do('a', in: nil)" -e:1: syntax error, unexpected keyword_in, expecting ')' obj.do('a', in: nil) ^ $> macruby -e "obj.do('a', ia: nil)" /Users/naixn/-e:1:in `<main>': undefined local variable or method `obj' for main:TopLevel (NameError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/328#comment:1> MacRuby <http://macruby.org/>
#328: Calling a ObjC-method with a named argument which is a Ruby keyword does not work ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ------------------------+--------------------------------------------------- Comment(by lsansonetti@…): I believe there is a fix in 1.9's parse.y that we can backport. -- Ticket URL: <http://www.macruby.org/trac/ticket/328#comment:2> MacRuby <http://macruby.org/>
#328: Calling a ObjC-method with a named argument which is a Ruby keyword does not work ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ------------------------+--------------------------------------------------- Changes (by martinlagardette@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Fixed with r4217 :-) -- Ticket URL: <http://www.macruby.org/trac/ticket/328#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby