Projects

Ticket #652 (closed defect: fixed)

Opened 22 months ago

Last modified 21 months ago

"alias" keyword doesn't compile with symbolized-interpolated-strings

Reported by: joshua.ballanco@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.7
Component: MacRuby Keywords:
Cc:

Description

The following works in Ruby but not MacRuby:

class String
  a = 'length'
  b = :bar
  alias :"get#{b.capitalize}" :"#{a}"
end

"test".getBar

Result is:

Assertion failed: (nd_type(node->u1.node) == NODE_LIT), function compile_node, file compiler.cpp, line 4694.

Change History

Changed 21 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Should be fixed in r4076.

$ cat t.rb 
class String
  a = 'length'
  b = :bar
  alias :"get#{b.capitalize}" :"#{a}"
end

p "test".getBar
$ ./miniruby t.rb 
4
Note: See TracTickets for help on using tickets.