From: matz@... (Yukihiro Matsumoto) Date: 2000-07-16T00:13:52+09:00 Subject: [ruby-talk:04038] Re: Pluggable functions and blocks Hi, In message "[ruby-talk:04031] Re: Pluggable functions and blocks" on 00/07/15, Dave Thomas writes: |> String.instance_method(:clone).call("a") #=> cloned string "a" |> Class.instance_method(:new).call("a") #=> TypeError | |I'm wondering - what is the semantics of this? Is the parameter |substituted for 'self' in the call, or is it an argument to the |constructor of the original class (or something else entirely)? How do |you differentiate parameters that are to be passed to the method |itself? an unbound method is a method definition without specific receiver. You should supply its receiver of sufficient type as the first argument to `call' method to invoke it. String.instance_method(:gsub).call("abc", /a/, "b") # => "bbc" String.instance_method(:gsub).call(42, /a/, "b") # => TypeError Hope this helps. matz.