Permalink
Browse files

added some new variations to the klass.rb target

  • Loading branch information...
1 parent ad9a874 commit ee6d2ac2fcf0c6ae5e44a75f0f3b32da988cfaf0 @mattknox committed May 16, 2010
Showing with 21 additions and 4 deletions.
  1. +0 −4 lib/call_visitors.rb
  2. +21 −0 target/klass.rb
@@ -4,10 +4,6 @@ def visitCallOneArgFixnumNode(node)
visitCallOneArgNode(node)
end
- # def visitFCallNode(node)
- # raise NotYetImplmented
- # end
-
def visitFCallNoArgBlockNode(node)
gather("this.#{node.name}(#{compile_function(nil, node.get_iter_node.get_var_node, node.get_iter_node.get_body_node)})")
end
View
@@ -5,5 +5,26 @@ def initialize(x)
super
end
end
+ def inner_target_instance_method(x)
+ x + 1
+ end
+ end
+
+ def target_instance_method(x)
+ x + 7
+ end
+
+ def self.target_class_method(x)
+ x + 2
+ end
+
+ def Target.other_class_method(x)
+ x + 3
+ end
+
+ class << self
+ def yet_another_class_method(x)
+ x + 4
+ end
end
end

0 comments on commit ee6d2ac

Please sign in to comment.