Hello, Is there a built-in way to achieve what C# 'using' does, with IronRuby ? Although it's pretty easy to roll your own ( http://myotherpants.com/2009/09/disposable-code), I'd like to use the built-in way if there's one. thanks! -- Thibaut
on 2010-02-01 10:06
on 2010-02-01 10:08
yes http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb#L17 --- 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) On Mon, Feb 1, 2010 at 10:03 AM, Thibaut Barrère
on 2010-02-01 10:09
you don't need to provide the true anymore. It was a bug a year ago and I still have to update that --- 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) On Mon, Feb 1, 2010 at 10:07 AM, Ivan Porto Carrero <
on 2010-02-01 10:30
Thanks Ivan, I like your version :) Will something similar be added directly into IronRuby Kernel ? -- Thibaut On Mon, Feb 1, 2010 at 10:07 AM, Ivan Porto Carrero <
on 2010-02-01 10:37
it's not a rubyism as such, so I don't think it actually belongs in the core. But opinions may vary --- 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) On Mon, Feb 1, 2010 at 10:21 AM, Thibaut Barrère
on 2010-02-01 11:01
> it's not a rubyism as such, so I don't think it actually belongs in the
core. But opinions may vary
agreed - it's an ironrubyism :)
I think we can add it straight to the FAQ, to the very least!
-- Thibaut
on 2010-02-01 11:12
On Mon, Feb 1, 2010 at 10:46, Thibaut Barrère <thibaut.barrere@gmail.com> wrote: >> it's not a rubyism as such, so I don't think it actually belongs in the >> core. But opinions may vary > > agreed - it's an ironrubyism :) I'm definitely against adding such a feature to the core (as Ivan said, it doesn't belong to ruby), but... require 'ironrubysm' # just to reuse your term, but it could be something along these lines :-) Maybe we can have a separate gem that groups a bunch of typical .NET patterns in a more rubyish way. Thoughts? -- Daniele Alessandri http://www.clorophilla.net/ http://twitter.com/JoL1hAHN
on 2010-02-01 11:19
> Maybe we can have a separate gem that groups a bunch of typical .NET > patterns in a more rubyish way. Thoughts? I think it's a nice idea; it would be a bit like Facets ( http://facets.rubyforge.org/), small bits that you can enable if you wish. -- Thibaut
on 2010-02-01 20:44
I also think it's a nice idea. I have a few other such methods (Array#to_clr_a, Time#to_clr_time, and the godawful Array#to_2d_a) that seem like they'd also be a good fit :-) On Mon, Feb 1, 2010 at 11:17 PM, Thibaut Barrère
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.