From: Robert Klemme Date: 2004-03-14T01:04:41+09:00 Subject: Re: long string arguments "Thomas Fini Hansen" schrieb im Newsbeitrag news:20040313150153.GD24324@saber.xen.dk... > On Sat, Mar 13, 2004 at 11:53:33PM +0900, David A. Black wrote: > > Hi -- > > > > On Sat, 13 Mar 2004, Thomas Fini Hansen wrote: > > > Well, that doesn't work for a number of reasons. For starters it > > > should basically quote "\nend\n...". And I don't think <| and |> are > > > valid names... > > > > a = Object.new > > class << a > > define_method("|>") {|s| puts s } > > end > > > > a.send("|>", "a string") # a string > > > > :-) > > OKOK, they're valid names, but particular useful names: > > irb(main):005:0> a.|> "test" > NameError: undefined method `|' for # > > ;-) seems the parser sees > as an operator, which is fair. In fact there are two operators, namely "|" and ">". And expr "|" ">" is not valid Ruby syntax. You can do things like puts <