Skip to content

Commit

Permalink
added some new variations to the klass.rb target
Browse files Browse the repository at this point in the history
  • Loading branch information
mattknox committed May 16, 2010
1 parent ad9a874 commit ee6d2ac
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/call_visitors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions target/klass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.