You would have to implement def aaa a little differently.


If you want to call it as aaa('hello', :world): (note: this is
generally a bad idea)

def aaa(string, method)
  print string
  send method
end

Note the "send"  it call the method whose name is given as argument
on "self"; in this case (with toplevel methods) it will be an implicit
toplevel object. (If either of your methods belonged to some class,
this would stop working  that's why it's a bad idea.)


If you want to call it as aaa('hello', method(:world)):

 def aaa(string, method)
  print string
  method.call
end

Here, "method" is an object which acts just like a Proc, so it can be called.




-- Matma Rex