[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02831] obj = new BeautifulInstantiation

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-05-16 10:38:09 UTC
List: ruby-talk #2831
I'm back from a small trip as you probably have noted :). This is just small
thing.

# This is how I made Ruby to eat more beautiful "obj = new Class".
# Far from perfect probably, but works for simple case.
# Don't use parentheses, or use them in C++/Java way anyway :)

def new( klass, *args )
  if args.length != 0
    klass.new args
  else 
    klass.new
  end
end

Any thoughts, comments?

	- Aleksi

In This Thread

Prev Next