ara.t.howard / noaa.gov wrote:
> On Fri, 5 Jan 2007, Trans wrote:
>
> > Or maybe
> >
> >    obj!send message
>
> that's pretty good.  i was leaning towards a module so we could just try to
> write it as an extension now though...

irb(main):003:0> class Object
irb(main):004:1>   def p(obj=(not_obj=true;nil))
irb(main):005:2>     return Pervasives if not_obj
irb(main):006:2>     super obj
irb(main):007:2>   end
irb(main):008:1> end
=> nil
irb(main):009:0> module Pervasives
irb(main):010:1>   module_function
irb(main):011:1>   def send(obj, *args, &blk)
irb(main):012:2>     obj.send(*args,&blk)
irb(main):013:2>   end
irb(main):014:1> end
=> nil
irb(main):015:0> p "2"
"2"
=> nil
irb(main):016:0> p.send("2",:class)
=> String
irb(main):017:0> p.send "2", :class
=> String

Then go "p p" ;-)

T.