spec/sample_xel_spec.rb in raabro-1.0.5 vs spec/sample_xel_spec.rb in raabro-1.1.0
- old
+ new
@@ -31,11 +31,13 @@
def rewrite_exp(t); rewrite(t.children[0]); end
def rewrite_num(t); t.string.to_i; end
def rewrite_fun(t)
- [ t.children[0].string ] +
- t.children[1].children.inject([]) { |a, e| a << rewrite(e) if e.name; a }
+
+ #[ t.children[0].string ] +
+ #t.children[1].children.inject([]) { |a, e| a << rewrite(e) if e.name; a }
+ [ t.children[0].string ] + t.children[1].odd_children.map { |c| rewrite(c) }
end
end
describe Raabro do