Hi

this used to work but now doesn't anymore


» ir
IronRuby 0.9.1.0 on .NET 2.0.50727.4927
Copyright (c) Microsoft Corporation. All rights reserved.

>>> class SomeClass
... define_method(:initialize) do |*args|
... puts args.join(", ")
... end
... end
=> #<Proc:0x0000056@(unknown):2>
>>> SomeClass.new 1, 4, 6, 3
:0: wrong number of arguments (4 for 0) (ArgumentError)

>>> exit
+ C:\dev
» irb
irb(main):001:0> class SomeClass
irb(main):002:1> define_method(:initialize) do |*args|
irb(main):003:2* puts args.join(", ")
irb(main):004:2> end
irb(main):005:1> end
=> #<Proc:0x0442490c@(irb):2>
irb(main):006:0> SomeClass.new 1, 4, 6, 3
1, 4, 6, 3
=> #<SomeClass:0x4416c08>
irb(main):007:0>
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to