test/RubyLess/basic.yml in rubyless-0.8.0 vs test/RubyLess/basic.yml in rubyless-0.8.1
- old
+ new
@@ -204,5 +204,22 @@
tem: "node.is_like?(\"DOC\")"
proc_to_resolve_class:
src: "author"
tem: "node.author"
+
+method_on_array:
+ src: "@foo.genitors.size"
+ tem: "node.genitors.size"
+
+method_on_array_with_nil:
+ src: "@foo.children.size"
+ tem: "(node.children ? node.children.size : nil)"
+
+map_allowed_method:
+ src: "%w{45 52}.map(:to_i)"
+ tem: "[\"45\",\"52\"].map(&:to_i).compact"
+ res: "4552"
+
+map_forbidden_method:
+ src: "%w{45 52}.map(:foo)"
+ tem: "unknown method 'map(:foo)' for '[\"45\",\"52\"]' of type Array."
\ No newline at end of file