From: Carlos Date: 2004-12-12T05:45:37+09:00 Subject: Re: puts / print as method not keyword? [zuzu , 2004-12-11 21.13 CET] > but a programmer cannot > > "this is a string".puts > > and produce the desired result. instead the programmer must > > puts "this is a string" > > switching from postfix to prefix notation, most likely intuitive > because of experience C-style printf() or C++ style cout (or i suppose > BASIC). > > > > however, i suppose the real answer should be "shut up and code it that > way for yourself then". but i want to throw this out there for > discussion as to why this was implemented in this way to begin with, > as well as gather information from those who know offhand where the > source of this lies in the default object library. You have Object#display. But nobody uses it... $ ri -T display --------------------------------------------------------- Object#display obj.display(port=$>) => nil ------------------------------------------------------------------------ Prints _obj_ on the given port (default +$>+). Equivalent to: def display(port=$>) port.write self end For example: 1.display "cat".display [ 4, 5, 6 ].display puts _produces:_ 1cat456