Re: [Ironruby-core] Code Review: Issues with Thread#kill and raising exception from ensure clause

2009-01-09 Thread Shri Borde
Inline... -Original Message- From: Tomas Matousek Sent: Friday, January 09, 2009 4:34 PM To: Shri Borde; IronRuby External Code Reviewers Cc: ironruby-core@rubyforge.org Subject: RE: Code Review: Issues with Thread#kill and raising exception from ensure clause Are any methods in RubyOps

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Ryan Riley
Oops! Sorry for being a bit behind! On Fri, Jan 9, 2009 at 5:37 PM, Jimmy Schementi < jimmy.scheme...@microsoft.com> wrote: > Foo.of(Bar).new works today … since it's about instantiating generic > types … this discussion was only about generic methods. > > > > *From:* ironruby-core-boun...@rubyf

Re: [Ironruby-core] Code Review: CompositeConversions3

2009-01-09 Thread Martin Maly
Outer ring looks good. From: Tomas Matousek Sent: Friday, January 09, 2009 4:08 PM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core@rubyforge.org Subject: Code Review: CompositeConversions3 tfpt review "/shelveset:CompositeConversions3;REDMOND\tomat" DLR change (interpre

Re: [Ironruby-core] Code Review: Issues with Thread#kill and raising exception from ensure clause

2009-01-09 Thread Tomas Matousek
Are any methods in RubyOps Exceptions #region (including those added by this shelveset) emitted to IL? If not they should rather be in RubyUtils class. On the other hand, SourceUnitTree.CheckForAsyncRaiseViaThreadAbortshould should be marked as [Emitted], be in RubyOps.cs and SourceUnitTree.Gen

Re: [Ironruby-core] Code Review: CompositeConversions3

2009-01-09 Thread John Messerly
Interpreter change looks good. From: Tomas Matousek Sent: Friday, January 09, 2009 4:08 PM To: IronRuby External Code Reviewers; DLR Code Reviews Cc: ironruby-core@rubyforge.org Subject: Code Review: CompositeConversions3 tfpt review "/shelveset:CompositeConversions3;REDMOND\tomat" DLR change (

Re: [Ironruby-core] IronRuby hosting: self becomes nil

2009-01-09 Thread Tomas Matousek
Yes, please. Thanks, Tomas -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Alex 2k8 Sent: Friday, January 09, 2009 4:00 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] IronRuby hosting: self becomes ni

Re: [Ironruby-core] IronRuby hosting: self becomes nil

2009-01-09 Thread Alex 2k8
Hello, Should I report this as IronRuby bug? - Alex -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Jimmy Schementi
Foo.of(Bar).new works today … since it's about instantiating generic types … this discussion was only about generic methods. From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ryan Riley Sent: Friday, January 09, 2009 2:33 PM To: ironruby-core@rub

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Tomas Matousek
Generic types already work: List = List.of(Object).new Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ryan Riley Sent: Friday, January 09, 2009 2:33 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Generic method synxtax

Re: [Ironruby-core] Misleading error message calling private method

2009-01-09 Thread Tomas Matousek
That's the right way :) Thanks, Tomas -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Alex 2k8 Sent: Friday, January 09, 2009 1:25 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Misleading error messa

[Ironruby-core] Code Review: Issues with Thread#kill and raising exception from ensure clause

2009-01-09 Thread Shri Borde
tfpt review "/shelveset:kill;REDMOND\sborde" Comment : Added more tests for Thread#kill, and fixed bugs that were exposed. Throwing an exception from the ensure clause exposes new code paths. Ruby allows Thread#kill to be completely subverted (not just deferred as an infinite loop i

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Ryan Riley
How would this look for instantiating a generic object? my_object = Foo.method(:new).of(Bar).call That seems strange. Perhaps we need to possibilities: the above for generic methods and the following for generic classes: my_object = Foo.of(Bar).new # where Foo would be defined as Foo in C# my_c

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Jimmy Schementi
Let's let Tomas implement content.method(:load).of(Texture2D).call(“mytexture”) ... and then we can play around with the different syntax in context. Then it's pick-the-syntax-you-want =) From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ryan Ri

Re: [Ironruby-core] Generic method synxtax

2009-01-09 Thread Ryan Riley
I like Tomas's idea the best. Generics are not native to Ruby, so most people using them will likely have a C#/VB background, which means Tomas's syntax would be more familiar. The "_of" syntax isn't bad, but forcing a ".do" or ".call" at the end isn't ideal, even if it does have a bit of a Ruby f

Re: [Ironruby-core] Misleading error message calling private method

2009-01-09 Thread Alex 2k8
Hi, Tomas I submitted it as bug # 23508, thought did no assignments. - Alex -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Compiling .rb files vs. embedding and hosting ?

2009-01-09 Thread Tomas Matousek
The last 4 lines of the snippet could be slightly simplified: var engine = IronRuby.Ruby.CreateEngine(); engine.Execute(code); Tomas -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jimmy Schementi Sent: Friday, Janua

Re: [Ironruby-core] Compiling .rb files vs. embedding and hosting ?

2009-01-09 Thread Thibaut Barrère
Hi Jimmy, thanks for the feedback (and the outlook snippet :-)! I'll try that. cheers -- Thibaut ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Calling overloaded methods

2009-01-09 Thread Alex 2k8
Thank you! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Compiling .rb files vs. embedding and hosting ?

2009-01-09 Thread Jimmy Schementi
Embedding the files as resources would be your best bet, as we don't have compilation to an assembly working today. Basically (compiled with outlook ...): var assembly = Assembly.GetExecutingAssembly(); var textStreamReader = new StreamReader(assembly.GetManifestResourceStream("foo.rb")); var c

Re: [Ironruby-core] Misleading error message calling private method

2009-01-09 Thread Tomas Matousek
Could you file a bug @ http://rubyforge.org/projects/ironruby/? Thanks, Tomas -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Alex 2k8 Sent: Friday, January 09, 2009 7:55 AM To: ironruby-core@rubyforge.org Subject: [I

Re: [Ironruby-core] Calling overloaded methods

2009-01-09 Thread Tomas Matousek
[3,4] is not an array of objects. It's a RubyArray. You can create a CLR array like this: v = System::Array.of(Object).new(3) [1,2,3].each_with_index { |x,i| v[i] = x } Tomas -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On B

Re: [Ironruby-core] Calling overloaded methods

2009-01-09 Thread Curt Hagenlocher
You'll need to build a CLR array rather than a Ruby array. require 'mscorlib' System::Array.create_instance(System::Object.to_clr_type, 2) o = System::Array.create_instance(System::Object.to_clr_type, 2) >>> o[0] = 3 >>> o[1] = 4 You can monkey-patch Array and add this as a helper: class Array

[Ironruby-core] Calling overloaded methods

2009-01-09 Thread Alex 2k8
Hello, C# public class Cls { public void foo(object a) { Console.WriteLine("foo #1"); } public void foo(object[] a) { Console.WriteLine("foo #2"); } } Ruby: Cls.new.foo(7) Cls.new.foo([3, 4]) Output: foo #1 foo #1

[Ironruby-core] Misleading error message calling private method

2009-01-09 Thread Alex 2k8
Hello, IronRuby throws misleading error message, when I call private method of the C# class. - - - - C# public class Cls { private void private_method() {} } Ruby: Cls.new.private_method Output: # - - - - - Alex. -- Posted via http://www.ruby-forum.com/. __

Re: [Ironruby-core] local variables: Ruby vs. IronRuby difference?

2009-01-09 Thread Alex 2k8
Thanks, http://www.ruby-forum.com/topic/175284 fixed it. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Compiling .rb files vs. embedding and hosting ?

2009-01-09 Thread Thibaut Barrère
Hello, I'm starting to integrate IronRuby files into a VisualStudio C# project, mainly to write easy-to-maintain GUI builders. As I don't want to have .rb files lying around this deployment, I had that idea about embedding all the files inside an assembly, loading them at run time through resource

Re: [Ironruby-core] SVN __AND__ Git revisions pushed

2009-01-09 Thread jirapong.na...@gmail.com
I get svn.exe error...on Mac + Mono Macintosh-2:Ruby Jirapong$ rake compile mono=1 --trace (in /Users/Jirapong/ironruby/merlin/main/Languages/Ruby) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy Cannot find svn.exe on system path. * Missing commands! You must ha

Re: [Ironruby-core] SVN __AND__ Git revisions pushed

2009-01-09 Thread Thibaut Barrère
> This release includes support for local variables in the ir console. > Enjoy J That's a great thing! thanks for your work -- Thibaut ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] SVN __AND__ Git revisions pushed

2009-01-09 Thread Jim Deville
My changes went in this morning, so I have pushed SVN 183 and Git revision 69815c7. Two things: 1) Git may be in a bad state due to CRLF issues and casing. Can I get a confirmation that it compiles and runs? 2) This release includes support for local variables in the ir console. Enj

[Ironruby-core] Code Review: rakefix2

2009-01-09 Thread Jim Deville
FYI, Going in via direct commit tfpt review "/shelveset:rakefix2;REDMOND\jdeville" Comment : More changes for git rakefix2.diff Description: rakefix2.diff ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman