From curth at microsoft.com Wed Apr 1 00:33:13 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 31 Mar 2009 21:33:13 -0700 Subject: [Ironruby-core] lol.. google undo send definitely is a fad In-Reply-To: <49D2E261.1020605@sun.com> References: <0AB34E2BFBE88245B073D2D83B4245FD09855454@TK5EX14MBXC101.redmond.corp.microsoft.com> <49D2E261.1020605@sun.com> Message-ID: No, the retraction is a different (and thoroughly retarded) feature. You can actually create a send rule that applies a delay based on all sorts of criteria. See http://ironcurt.typepad.com/p/sendrule.png for a screen shot of the rule. The "retraction" isn't a totally ridiculous feature, but I always smirk when I see a "Manager X has recalled an email" message... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Charles Oliver Nutter Sent: Tuesday, March 31, 2009 8:41 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] lol.. google undo send definitely is a fad Jim Deville wrote: > As was pointed out by some people around here, Outlook has had a similar > feature for a while, that gives more customization. It just requires you > to make a rule ;) And requires the receiver to accept the retraction if it's already been delivered, if I remember right...which of course I never did. - Charlie _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 1 00:52:43 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Apr 2009 04:52:43 +0000 Subject: [Ironruby-core] lol.. google undo send definitely is a fad In-Reply-To: <49D2E261.1020605@sun.com> References: <0AB34E2BFBE88245B073D2D83B4245FD09855454@TK5EX14MBXC101.redmond.corp.microsoft.com> <49D2E261.1020605@sun.com> Message-ID: > Jim Deville wrote: > > As was pointed out by some people around here, Outlook has had a > > similar feature for a while, that gives more customization. It > > just requires you to make a rule ;) Jim, are you really pimping Outlook? ;) > Charles Oliver Nutter wrote: > And requires the receiver to accept the retraction if it's already been > delivered, if I remember right...which of course I never did. I believe Jim was referring to making a Outlook rule which delays the sending of an email by a minute or so, which then you can delete from our outbox during that window and it will never be delivered; similar to what gmail can do for you. The "retraction" system is far more inferior. Ok, enough Outlook banter ... From lists at ruby-forum.com Wed Apr 1 01:59:39 2009 From: lists at ruby-forum.com (Chamini Gallage) Date: Wed, 1 Apr 2009 07:59:39 +0200 Subject: [Ironruby-core] Error when running Cucumber examples with IronRuby In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Hi, Thank you very much for the kind support. Now, I'm going ahead with the new source :). I will be happy to update u as soon as possible :D. -- Posted via http://www.ruby-forum.com/. From thibaut.barrere at gmail.com Wed Apr 1 06:43:48 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Wed, 1 Apr 2009 12:43:48 +0200 Subject: [Ironruby-core] Confused - trying to run the specs In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD09835AC2@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <0AB34E2BFBE88245B073D2D83B4245FD09835AC2@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0904010343x4409ae1cy39c921ceecad54a4@mail.gmail.com> Hi Jim, > > > I have this fixed in my Git fork. I'll be pulling it in this week. In the mean time, change Merlin/External/Languages/IronRuby/mspec/default.mspec to set :target, "/path/to/Merlin/Main/bin/debug/ir.exe". > > pulled again and it seems to work. thanks! -- Thibaut > JD > > -----Original Message----- > From: Thibaut Barr?re > Sent: March 25, 2009 3:50 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Confused - trying to run the specs > > > Hi, > I tried that: > > set HOME=%USERPROFILE% > then dev.bat > > then: > > U:\Merlin\External\Languages\IronRuby\mspec>mspec :core > U:/Merlin/External/Languages/IronRuby/mspec/mspec/lib/mspec/commands/mspec.rb:150:in > `exec': No such file or directory - U:\Merlin\Main\Test\Scripts\ir.cmd > (Errno::ENOENT) > from > U:/Merlin/External/Languages/IronRuby/mspec/mspec/lib/mspec/commands/mspec.rb:150:in > `run' > from > U:/Merlin/External/Languages/IronRuby/mspec/mspec/lib/mspec/utils/script.rb:203:in > `main' > from U:/Merlin/External/Languages/IronRuby/mspec/mspec/bin/mspec:7 > > U:\Merlin\External\Languages\IronRuby\mspec>echo %HOME% > C:\Documents and Settings\Thibaut Barr?re > > At this point there is a .mspecrc in HOME, and MERLIN_ROOT is set to > U:\Merlin\Main > > Calling dev.bat first then setting HOME does not change the behaviour. > > I also removed all known references to some IR version from my PATHs > (both user and system), pulled the last ironruby bits, compiled again and > retried, but it raises the same error. > > Maybe it's a cause: in which folder should I be before I call mspec ci ? > > No idea what's going on for the moment, any hint will be most welcome. > > -- Thibaut > > 2009/3/25 Shri Borde > >> This does seem to be an issue with HOME not being set which Adam >> Khatava was also running into. Can you try setting HOME before running >> dev.bat? Dev.bat copies default.mspec to the HOME folder allowing the ?mspec >> ci? command to know where to find the tests. So setting HOME after running >> dev.bat will **not** work. >> >> >> >> I have a change for dev.bat to set HOME if it is not set already. If you >> could confirm that setting HOME before running dev.bat works, then I will >> know that my change is actually the right fix for your problem. >> >> >> >> Tags are a way to disable tests. Browsing the ironruby-tags folder will >> tell you what does not work. See http://rubyspec.org/wiki/mspec/Mspec-tagfor some info. >> >> >> >> Thanks, >> >> Shri >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Thibaut Barr?re >> >> *Sent:* Tuesday, March 24, 2009 2:54 PM >> *To:* ironruby-core >> *Subject:* [Ironruby-core] Confused - trying to run the specs >> >> >> >> Hi, >> >> >> >> I'm having a closer look at the source in order to attempt some work >> around system and IO popen. >> >> >> >> I pulled the code, ran dev.bat etc. The build runs fine. >> >> >> >> Now I'm trying to run the specs and something must be not quite right - or >> I'm not invoking the right modjo. Maybe some confusion with some existing >> install on the system, I'm not sure. >> >> >> >> I've tried (U: is my github root): >> >> >> >> U:\>mspec ci core\kernel\system >> >> ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] >> >> >> >> Finished in 0.000000 seconds >> >> >> >> 0 files, 0 examples, 0 expectations, 0 failures, 0 errors >> >> also tried: >> >> >> >> U:\Merlin\External\Languages\IronRuby\mspec>mspec :core >> >> U:/Merlin/External/Languages/IronRuby/mspec/mspec/lib/mspec/commands/mspec.rb:150:in >> `exec': No such file or directory - U:\Merlin\Main\Test\Scripts\ir.cmd >> (Errno::ENOENT) >> >> from >> U:/Merlin/External/Languages/IronRuby/mspec/mspec/lib/mspec/commands/mspec.rb:150:in >> `run' >> >> from >> U:/Merlin/External/Languages/IronRuby/mspec/mspec/lib/mspec/utils/script.rb:203:in >> `main' >> >> from U:/Merlin/External/Languages/IronRuby/mspec/mspec/bin/mspec:7 >> >> >> >> I have no HOME var set. I tried setting it but it doesn't seem to change >> anything currently. >> >> >> >> So any hint will help me go further here (I'll continue diving in here). >> Are there some steps I should carry out ? >> >> >> >> As well, is there an explanation of what "tags" are for ? Are these some >> way to track the specs that aren't passing ? >> >> >> >> cheers, >> >> >> >> -- Thibaut >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jb at nurv.fr Wed Apr 1 09:15:31 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 15:15:31 +0200 Subject: [Ironruby-core] agdlr test w/ ruby string Message-ID: <69f7d8470904010615v55e7b78bw792f854a43ece645@mail.gmail.com> Hey, Moonlight currently fails the following agldr test: it 'verifies SetProperty works' do new_ctl = HtmlPage.Document.CreateElement('div') new_value = "This is added by Merlin SL Test!" new_ctl.SetProperty("innerHTML", new_value) new_ctl.GetProperty("innerHTML").should.equal new_value.to_clr_string end it passes if I change the SetProperty line to: new_ctl.SetProperty("innerHTML", new_value.to_clr_string) SetProperty's signature is `void SetProperty(string name, object value)`, so I'd except it to convert the name "innerHTML" to a clr_string, but not the value argument. Is IronRuby doing some conversion here, or is it Silverlight doing interesting things when marshalling the value? -- Jb Evain From jb at nurv.fr Wed Apr 1 10:25:39 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 16:25:39 +0200 Subject: [Ironruby-core] [patch] agdlr: Fix for Package.NormalizePath Message-ID: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> Hey, This patch is part of a bunch I sent to Jimmy privately. But they haven't been applied, so am resending them here for review. Package.NormalizePath transforms paths in the xap that use \ as a directory separator to /. So use \ directly, instead of expecting it to be the system directory separator. Thanks, -- Jb Evain -------------- next part -------------- A non-text attachment was scrubbed... Name: Package.patch Type: application/octet-stream Size: 700 bytes Desc: not available URL: From jb at nurv.fr Wed Apr 1 10:31:18 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 16:31:18 +0200 Subject: [Ironruby-core] [patch] agdlr: Fix hosting api unit test Message-ID: <69f7d8470904010731p7e864a5ap390227dbbef97215@mail.gmail.com> Hey, Here's a patch against a test which currently asserts on an internal implementation detail. This fix makes it cross-platform. Thanks, -- Jb Evain -------------- next part -------------- A non-text attachment was scrubbed... Name: test.patch Type: application/octet-stream Size: 602 bytes Desc: not available URL: From jb at nurv.fr Wed Apr 1 11:20:14 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 17:20:14 +0200 Subject: [Ironruby-core] [patch] agdlr: Fix hosting api unit test In-Reply-To: <69f7d8470904010731p7e864a5ap390227dbbef97215@mail.gmail.com> References: <69f7d8470904010731p7e864a5ap390227dbbef97215@mail.gmail.com> Message-ID: <69f7d8470904010820w58df7e9cm62b98f5709d65c3b@mail.gmail.com> On 4/1/09, Jb Evain wrote: > Here's a patch against a test which currently asserts on an internal > implementation detail. This fix makes it cross-platform. That should read .superclass of course. -- Jb Evain From Tomas.Matousek at microsoft.com Wed Apr 1 11:55:29 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 1 Apr 2009 08:55:29 -0700 Subject: [Ironruby-core] agdlr test w/ ruby string In-Reply-To: <69f7d8470904010615v55e7b78bw792f854a43ece645@mail.gmail.com> References: <69f7d8470904010615v55e7b78bw792f854a43ece645@mail.gmail.com> Message-ID: SetProperty converts Ruby string "innerHTML" to CLR string because its first parameter is strongly typed to CLR string. The second parameter is not and hence no conversion occurs. This should work: new_ctl.SetProperty("innerHTML", new_value) new_ctl.GetProperty("innerHTML").should.equal new_value The current implementation "==" compares Ruby strings and CLR strings by value. The implementation of "eql?" doesn't: >>> x = 'str' => "str" >>> y = x.to_clr_string => 'str' >>> x == y => true >>> x.eql? y => false Which is similar to numerics in MRI: irb(main):001:0> 1 == 1.0 => true irb(main):002:0> 1.eql? 1.0 => false irb(main):003:0> exit Would it be better to override "eql?" on string to compare Ruby string and CRL string equal if they have the same value? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jb Evain Sent: Wednesday, April 01, 2009 6:16 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] agdlr test w/ ruby string Hey, Moonlight currently fails the following agldr test: it 'verifies SetProperty works' do new_ctl = HtmlPage.Document.CreateElement('div') new_value = "This is added by Merlin SL Test!" new_ctl.SetProperty("innerHTML", new_value) new_ctl.GetProperty("innerHTML").should.equal new_value.to_clr_string end it passes if I change the SetProperty line to: new_ctl.SetProperty("innerHTML", new_value.to_clr_string) SetProperty's signature is `void SetProperty(string name, object value)`, so I'd except it to convert the name "innerHTML" to a clr_string, but not the value argument. Is IronRuby doing some conversion here, or is it Silverlight doing interesting things when marshalling the value? -- Jb Evain _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jb at nurv.fr Wed Apr 1 12:38:01 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 18:38:01 +0200 Subject: [Ironruby-core] agdlr test w/ ruby string In-Reply-To: References: <69f7d8470904010615v55e7b78bw792f854a43ece645@mail.gmail.com> Message-ID: <69f7d8470904010938u6cd8c06fjec7159f586e3bb70@mail.gmail.com> Hey Tomas, On 4/1/09, Tomas Matousek wrote: > SetProperty converts Ruby string "innerHTML" to CLR string because its first parameter is strongly typed to CLR string. The second parameter is not and hence no conversion occurs. Alright that's what I expected. > The current implementation "==" compares Ruby strings and CLR strings by value. >>> "" == "".to_clr_string => false I see :) Now to fix it in Mono. Thanks, -- Jb Evain From Jimmy.Schementi at microsoft.com Wed Apr 1 12:55:54 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Apr 2009 16:55:54 +0000 Subject: [Ironruby-core] [patch] agdlr: Fix for Package.NormalizePath In-Reply-To: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> References: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> Message-ID: <20C66F2C-1FC8-4B90-9A43-683384A9EC31@microsoft.com> They are applied in the dev/mono branch, and I can apply them for 0.5.1. ~Jimmy Sent from my phone On Apr 1, 2009, at 8:01 AM, "Jb Evain" wrote: > Hey, > > This patch is part of a bunch I sent to Jimmy privately. But they > haven't been applied, so am resending them here for review. > > Package.NormalizePath transforms paths in the xap that use \ as a > directory separator to /. So use \ directly, instead of expecting it > to be the system directory separator. > > Thanks, > > -- > Jb Evain > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jb at nurv.fr Wed Apr 1 14:01:52 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 20:01:52 +0200 Subject: [Ironruby-core] [patch] agdlr: Fix for Package.NormalizePath In-Reply-To: <20C66F2C-1FC8-4B90-9A43-683384A9EC31@microsoft.com> References: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> <20C66F2C-1FC8-4B90-9A43-683384A9EC31@microsoft.com> Message-ID: <69f7d8470904011101y1065fa76oa0f17d1be0ab72fa@mail.gmail.com> Hey Jimmy, On 4/1/09, Jimmy Schementi wrote: > They are applied in the dev/mono branch, and I can apply them for 0.5.1. Yeah, that would be cool. Is there any reason for not merging them in origin? -- Jb Evain From Jimmy.Schementi at microsoft.com Wed Apr 1 14:11:49 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Apr 2009 18:11:49 +0000 Subject: [Ironruby-core] [patch] agdlr: Fix for Package.NormalizePath In-Reply-To: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> References: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> Message-ID: <20C66F2C-1FC8-4B90-9A43-683384A9EC31@microsoft.com> They are applied in the dev/mono branch, and I can apply them for 0.5.1. ~Jimmy Sent from my phone On Apr 1, 2009, at 8:01 AM, "Jb Evain" wrote: > Hey, > > This patch is part of a bunch I sent to Jimmy privately. But they > haven't been applied, so am resending them here for review. > > Package.NormalizePath transforms paths in the xap that use \ as a > directory separator to /. So use \ directly, instead of expecting it > to be the system directory separator. > > Thanks, > > -- > Jb Evain > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 1 14:12:30 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Apr 2009 18:12:30 +0000 Subject: [Ironruby-core] [patch] agdlr: Fix for Package.NormalizePath In-Reply-To: <69f7d8470904011101y1065fa76oa0f17d1be0ab72fa@mail.gmail.com> References: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> <20C66F2C-1FC8-4B90-9A43-683384A9EC31@microsoft.com> <69f7d8470904011101y1065fa76oa0f17d1be0ab72fa@mail.gmail.com> Message-ID: No major reason ... they are small enough to be considered bug reports, so I have no problem making the fixes. FYI, I have to be more careful with substantial improvements/features, for the same reason that IronRuby.dll or the DLR can't accept contributions, but I hope to have a clearer message on contributions in the future. I don't have moonlight on any of my machines to test it out (though I trust you =P). Can you point me at instructions for setting up Moonlight? I have a Ubuntu VM , or is there another distro I should use since you're testing more on it (SUSE I assume?). ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jb Evain > Sent: Wednesday, April 01, 2009 11:02 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] [patch] agdlr: Fix for > Package.NormalizePath > > Hey Jimmy, > > On 4/1/09, Jimmy Schementi wrote: > > They are applied in the dev/mono branch, and I can apply them for > 0.5.1. > > Yeah, that would be cool. Is there any reason for not merging them in > origin? > > -- > Jb Evain > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jb at nurv.fr Wed Apr 1 14:37:01 2009 From: jb at nurv.fr (Jb Evain) Date: Wed, 1 Apr 2009 20:37:01 +0200 Subject: [Ironruby-core] [patch] agdlr: Fix for Package.NormalizePath In-Reply-To: References: <69f7d8470904010725h4e7921b9o2c23693a9f16deb@mail.gmail.com> <20C66F2C-1FC8-4B90-9A43-683384A9EC31@microsoft.com> <69f7d8470904011101y1065fa76oa0f17d1be0ab72fa@mail.gmail.com> Message-ID: <69f7d8470904011137l43dfdfa3v3454ee35ca371e43@mail.gmail.com> On 4/1/09, Jimmy Schementi wrote: > No major reason ... they are small enough to be considered bug reports, so I have no problem making the fixes. FYI, I have to be more careful with substantial improvements/features, for the same reason that IronRuby.dll or the DLR can't accept contributions, but I hope to have a clearer message on contributions in the future. Cool. I don't particularly care that my own personal patch is applied, I care about having the feature working. So if you guys prefer bug reports I can submit bugs reports. > I don't have moonlight on any of my machines to test it out (though I trust you =P). Can you point me at instructions for setting up Moonlight? I have a Ubuntu VM , or is there another distro I should use since you're testing more on it (SUSE I assume?). I use openSUSE, but there's no reason you couldn't make it work Ubuntu. You would have to setup Mono from svn, I suggest using: http://www.mono-project.com/Parallel_Mono_Environments There's some instructions for Moonlight here: http://www.mono-project.com/Moonlight#Developing_Moonlight But it's not always up to date as we are currently changing things a lot. Don't hesitate to ask on moonlight-list for help, or contact me directly. http://lists.ximian.com/mailman/listinfo/moonlight-list -- Jb Evain From thibaut.barrere at gmail.com Wed Apr 1 16:08:10 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Wed, 1 Apr 2009 22:08:10 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight Message-ID: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> Hi, I noticed something that I didn't expect while working with Silverlight. defined?(System::Windows::Forms::Control) throws an exception: MemberAccessException: uninitialized constant System::Windows::Forms ? IronRuby.Builtins.ModuleOps.ConstantMissing(RubyModule self, String name) ? _stub_$2##1(Closure , CallSite , CodeContext , RubyModule , SymbolId ) ? System.Scripting.Actions.MatchCaller.Call3[T0,T1,T2,TRet](Func`5 target, CallSite site, Object[] args) ? System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) ? System.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) ? IronRuby.Builtins.RubySites.ModuleConstMissing(CodeContext context, RubyModule self, String name) The same call under ir.exe will work as expected in MRI. Can anyone else reproduce that issue (or is it something known already), or is my silverlight install messing up ? cheers, -- Thibaut From jb at nurv.fr Wed Apr 1 18:35:44 2009 From: jb at nurv.fr (Jb Evain) Date: Thu, 2 Apr 2009 00:35:44 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> Message-ID: <69f7d8470904011535xb7e00e8md284c07903adadb7@mail.gmail.com> On 4/1/09, Thibaut Barr?re wrote: > Can anyone else reproduce that issue (or is it something known > already), or is my silverlight install messing up ? Well, there's no System.Windows.Froms.Control in silverlight to begin with. defined?(System::Windows::Application) does work though. -- Jb Evain From jb at nurv.fr Wed Apr 1 18:39:11 2009 From: jb at nurv.fr (Jb Evain) Date: Thu, 2 Apr 2009 00:39:11 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <69f7d8470904011535xb7e00e8md284c07903adadb7@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <69f7d8470904011535xb7e00e8md284c07903adadb7@mail.gmail.com> Message-ID: <69f7d8470904011539ib917f6cq8184523fdbba0291@mail.gmail.com> On 4/2/09, Jb Evain wrote: > defined?(System::Windows::Application) > > does work though. At least it works in the IronRuby repl. But trying to get a undefined namespace doesn't throw an exception either. How're you running the code? -- Jb Evain From Jimmy.Schementi at microsoft.com Wed Apr 1 19:13:07 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Apr 2009 23:13:07 +0000 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> Message-ID: System::Windows::Forms doesn't exist in Silverlight. You want System::Windows::Controls. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Thibaut Barr?re > Sent: Wednesday, April 01, 2009 1:08 PM > To: ironruby-core > Subject: [Ironruby-core] defined?(xxx) behaves differently when called > from Silverlight > > Hi, > > I noticed something that I didn't expect while working with > Silverlight. > > defined?(System::Windows::Forms::Control) > > throws an exception: > > MemberAccessException: uninitialized constant System::Windows::Forms > ? IronRuby.Builtins.ModuleOps.ConstantMissing(RubyModule self, > String name) > ? _stub_$2##1(Closure , CallSite , CodeContext , RubyModule , > SymbolId ) > ? System.Scripting.Actions.MatchCaller.Call3[T0,T1,T2,TRet](Func`5 > target, CallSite site, Object[] args) > ? System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] > args) > ? > System.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS > ite > site, T0 arg0, T1 arg1, T2 arg2) > ? IronRuby.Builtins.RubySites.ModuleConstMissing(CodeContext > context, RubyModule self, String name) > > The same call under ir.exe will work as expected in MRI. > > Can anyone else reproduce that issue (or is it something known > already), or is my silverlight install messing up ? > > cheers, > > -- Thibaut > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 1 19:15:49 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 1 Apr 2009 23:15:49 +0000 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> Message-ID: Granted, it shouldn't throw ... and doesn't for me in SL. rb> defined?(System::Windows::Forms) => nil rb> defined?(System::Windows::Forms::Controls) => nil > -----Original Message----- > From: Jimmy Schementi > Sent: Wednesday, April 01, 2009 4:13 PM > To: ironruby-core at rubyforge.org > Subject: RE: [Ironruby-core] defined?(xxx) behaves differently when > called from Silverlight > > System::Windows::Forms doesn't exist in Silverlight. You want > System::Windows::Controls. > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Thibaut Barr?re > > Sent: Wednesday, April 01, 2009 1:08 PM > > To: ironruby-core > > Subject: [Ironruby-core] defined?(xxx) behaves differently when > called > > from Silverlight > > > > Hi, > > > > I noticed something that I didn't expect while working with > > Silverlight. > > > > defined?(System::Windows::Forms::Control) > > > > throws an exception: > > > > MemberAccessException: uninitialized constant System::Windows::Forms > > ? IronRuby.Builtins.ModuleOps.ConstantMissing(RubyModule self, > > String name) > > ? _stub_$2##1(Closure , CallSite , CodeContext , RubyModule , > > SymbolId ) > > ? System.Scripting.Actions.MatchCaller.Call3[T0,T1,T2,TRet](Func`5 > > target, CallSite site, Object[] args) > > ? System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] > > args) > > ? > > > System.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS > > ite > > site, T0 arg0, T1 arg1, T2 arg2) > > ? IronRuby.Builtins.RubySites.ModuleConstMissing(CodeContext > > context, RubyModule self, String name) > > > > The same call under ir.exe will work as expected in MRI. > > > > Can anyone else reproduce that issue (or is it something known > > already), or is my silverlight install messing up ? > > > > cheers, > > > > -- Thibaut > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Wed Apr 1 19:33:30 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 1 Apr 2009 16:33:30 -0700 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> Message-ID: It seems to me that this misses the most important part of the original report: > The same call under ir.exe will work as expected in MRI. Presumably, System::Windows::Forms doesn't exist in MRI, either :P -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Wednesday, April 01, 2009 4:13 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight System::Windows::Forms doesn't exist in Silverlight. You want System::Windows::Controls. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Thibaut Barr?re > Sent: Wednesday, April 01, 2009 1:08 PM > To: ironruby-core > Subject: [Ironruby-core] defined?(xxx) behaves differently when called > from Silverlight > > Hi, > > I noticed something that I didn't expect while working with > Silverlight. > > defined?(System::Windows::Forms::Control) > > throws an exception: > > MemberAccessException: uninitialized constant System::Windows::Forms > ? IronRuby.Builtins.ModuleOps.ConstantMissing(RubyModule self, > String name) > ? _stub_$2##1(Closure , CallSite , CodeContext , RubyModule , > SymbolId ) > ? System.Scripting.Actions.MatchCaller.Call3[T0,T1,T2,TRet](Func`5 > target, CallSite site, Object[] args) > ? System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] > args) > ? > System.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallS > ite > site, T0 arg0, T1 arg1, T2 arg2) > ? IronRuby.Builtins.RubySites.ModuleConstMissing(CodeContext > context, RubyModule self, String name) > > The same call under ir.exe will work as expected in MRI. > > Can anyone else reproduce that issue (or is it something known > already), or is my silverlight install messing up ? > > cheers, > > -- Thibaut > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From charles.nutter at sun.com Wed Apr 1 22:11:13 2009 From: charles.nutter at sun.com (Charles Oliver Nutter) Date: Wed, 01 Apr 2009 21:11:13 -0500 Subject: [Ironruby-core] lol.. google undo send definitely is a fad In-Reply-To: References: <0AB34E2BFBE88245B073D2D83B4245FD09855454@TK5EX14MBXC101.redmond.corp.microsoft.com> <49D2E261.1020605@sun.com> Message-ID: <49D41EC1.3040807@sun.com> Curt Hagenlocher wrote: > No, the retraction is a different (and thoroughly retarded) feature. You can actually create a send rule that applies a delay based on all sorts of criteria. See http://ironcurt.typepad.com/p/sendrule.png for a screen shot of the rule. > > The "retraction" isn't a totally ridiculous feature, but I always smirk when I see a "Manager X has recalled an email" message... To be sure. One time the manager of a team I was on tried to retract a spreadsheet containing everyone's salaries. I think a couple people quit that same day. - Charlie From lists at ruby-forum.com Wed Apr 1 23:12:22 2009 From: lists at ruby-forum.com (Chamini Gallage) Date: Thu, 2 Apr 2009 05:12:22 +0200 Subject: [Ironruby-core] Error when running Cucumber examples with IronRuby In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Hi, I got the new ironruby source from http://github.com/ironruby/ironruby/tree/master and built it by Visual Studio 2008 (with 11 successful, 0 failed and 1 skipped)and tried the examples. Still I'm getting a simillar kind of error. C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.2.3\examples\i18n\en>icucumber features *** THIS RUBY IMPLEMENTATION DOESN'T REPORT FILE AND LINE FOR PROCS *** *** WARNING: You must "gem install win32console" (1.2.0 or higher) to get coloured output on MRI/Windows (eval):220:in `_nt_keyword_space': unexpected break (LocalJumpError) from :0:in `loop' from (eval):211:in `_nt_keyword_space' from feature.rb:900:in `_nt_step' from feature.rb:848:in `_nt_steps' from :0:in `loop' from feature.rb:839:in `_nt_steps' from feature.rb:763:in `_nt_scenario_outline' from feature.rb:96:in `_nt_feature' from :0:in `loop' from feature.rb:71:in `_nt_feature' from :0:in `send' from compiled_parser.rb:15:in `parse' from treetop_ext.rb:39:in `parse_or_fail' from treetop_ext.rb:28:in `parse_file' from c:\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:161:in `InvokeOpenBlock' from treetop_ext.rb:19:in `parse_file' from main.rb:54:in `load_plain_text_features' from :0:in `each' from main.rb:49:in `load_plain_text_features' from main.rb:30:in `execute!' from main.rb:19:in `execute' from cucumber:0 from :0:in `load' from cucumber:0 I tried the same procedure after rake compiling the source as well, but got the same error. Ruby, IronRuby and Cucumber seems to be working fine when tested alone. Any help will be very much appreciated. Thanx in advance :) -- Posted via http://www.ruby-forum.com/. From Shri.Borde at microsoft.com Thu Apr 2 01:37:01 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 1 Apr 2009 22:37:01 -0700 Subject: [Ironruby-core] Error when running Cucumber examples with IronRuby In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> Its an IronRuby bug with "break" in eval'ed code. The problem can be reproed with the snippet below. Tomas, do you want to take a look? def f yield end f { break } # This works with both MRI and IronRuby eval "f { break }" # This throws LocalJumpError with IronRuby only Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Chamini Gallage Sent: Wednesday, April 01, 2009 8:12 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Error when running Cucumber examples with IronRuby Hi, I got the new ironruby source from http://github.com/ironruby/ironruby/tree/master and built it by Visual Studio 2008 (with 11 successful, 0 failed and 1 skipped)and tried the examples. Still I'm getting a simillar kind of error. C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.2.3\examples\i18n\en>icucumber features *** THIS RUBY IMPLEMENTATION DOESN'T REPORT FILE AND LINE FOR PROCS *** *** WARNING: You must "gem install win32console" (1.2.0 or higher) to get coloured output on MRI/Windows (eval):220:in `_nt_keyword_space': unexpected break (LocalJumpError) from :0:in `loop' from (eval):211:in `_nt_keyword_space' from feature.rb:900:in `_nt_step' from feature.rb:848:in `_nt_steps' from :0:in `loop' from feature.rb:839:in `_nt_steps' from feature.rb:763:in `_nt_scenario_outline' from feature.rb:96:in `_nt_feature' from :0:in `loop' from feature.rb:71:in `_nt_feature' from :0:in `send' from compiled_parser.rb:15:in `parse' from treetop_ext.rb:39:in `parse_or_fail' from treetop_ext.rb:28:in `parse_file' from c:\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:161:in `InvokeOpenBlock' from treetop_ext.rb:19:in `parse_file' from main.rb:54:in `load_plain_text_features' from :0:in `each' from main.rb:49:in `load_plain_text_features' from main.rb:30:in `execute!' from main.rb:19:in `execute' from cucumber:0 from :0:in `load' from cucumber:0 I tried the same procedure after rake compiling the source as well, but got the same error. Ruby, IronRuby and Cucumber seems to be working fine when tested alone. Any help will be very much appreciated. Thanx in advance :) -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Thu Apr 2 02:14:23 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 1 Apr 2009 23:14:23 -0700 Subject: [Ironruby-core] Error when running Cucumber examples with IronRuby In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Let's file a bug. We have more control flow issues to be fixed. I'll fix them all at once. Thanks for investigation, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Wednesday, April 01, 2009 10:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Error when running Cucumber examples with IronRuby Its an IronRuby bug with "break" in eval'ed code. The problem can be reproed with the snippet below. Tomas, do you want to take a look? def f yield end f { break } # This works with both MRI and IronRuby eval "f { break }" # This throws LocalJumpError with IronRuby only Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Chamini Gallage Sent: Wednesday, April 01, 2009 8:12 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Error when running Cucumber examples with IronRuby Hi, I got the new ironruby source from http://github.com/ironruby/ironruby/tree/master and built it by Visual Studio 2008 (with 11 successful, 0 failed and 1 skipped)and tried the examples. Still I'm getting a simillar kind of error. C:\ruby\lib\ruby\gems\1.8\gems\cucumber-0.2.3\examples\i18n\en>icucumber features *** THIS RUBY IMPLEMENTATION DOESN'T REPORT FILE AND LINE FOR PROCS *** *** WARNING: You must "gem install win32console" (1.2.0 or higher) to get coloured output on MRI/Windows (eval):220:in `_nt_keyword_space': unexpected break (LocalJumpError) from :0:in `loop' from (eval):211:in `_nt_keyword_space' from feature.rb:900:in `_nt_step' from feature.rb:848:in `_nt_steps' from :0:in `loop' from feature.rb:839:in `_nt_steps' from feature.rb:763:in `_nt_scenario_outline' from feature.rb:96:in `_nt_feature' from :0:in `loop' from feature.rb:71:in `_nt_feature' from :0:in `send' from compiled_parser.rb:15:in `parse' from treetop_ext.rb:39:in `parse_or_fail' from treetop_ext.rb:28:in `parse_file' from c:\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:161:in `InvokeOpenBlock' from treetop_ext.rb:19:in `parse_file' from main.rb:54:in `load_plain_text_features' from :0:in `each' from main.rb:49:in `load_plain_text_features' from main.rb:30:in `execute!' from main.rb:19:in `execute' from cucumber:0 from :0:in `load' from cucumber:0 I tried the same procedure after rake compiling the source as well, but got the same error. Ruby, IronRuby and Cucumber seems to be working fine when tested alone. Any help will be very much appreciated. Thanx in advance :) -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jb at nurv.fr Thu Apr 2 04:21:22 2009 From: jb at nurv.fr (Jb Evain) Date: Thu, 2 Apr 2009 10:21:22 +0200 Subject: [Ironruby-core] agdlr test w/ ruby string In-Reply-To: <69f7d8470904010615v55e7b78bw792f854a43ece645@mail.gmail.com> References: <69f7d8470904010615v55e7b78bw792f854a43ece645@mail.gmail.com> Message-ID: <69f7d8470904020121u500beb2eg59deefe38b5150fa@mail.gmail.com> On 4/1/09, Jb Evain wrote: > Is IronRuby doing some conversion here, or is it Silverlight doing > interesting things when marshalling the value? Alright, so for the curious, after an update, the string comparison works ok on Moonlight. The issue is indeed marshaling in Silverlight, which decides that innerHTML is a string property, so it stringifies whatever you give it to. Not obvious :) -- Jb Evain From thibaut.barrere at gmail.com Thu Apr 2 05:56:40 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 2 Apr 2009 11:56:40 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> Message-ID: <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> Hi, I believe I need to give you more context about what I'm doing. In Magic (see here in particular) I currently have a single file providing support for WPF, Silverlight and Windows Forms. I use defined? to determine if one of these are available and adopt adequate behaviour. So that's why I run defined?(System::Windows::Forms::Control) inside Silverlight. I can definitely think about alternatives (such as creating a specific file for each scenario) - I could do that but I'm trying to stay with a single file and avoid metaprogramming for the moment as it's much simpler to test. So back to the issue, now that I hope you have a clearer understanding of what I'm doing here. Using ruby 1.8.6 or ironruby v0.3, running this file through command line [ruby/ir] my_test.rb doesn't choke: raise "detected!" if defined?(System::Windows::Forms::Control) Putting the same code as the first line of app.rb in a silverlight ironruby app fails: MemberAccessException: uninitialized constant System::Windows::Forms Is there any way to retrieve some accurate info on versioning from inside silverlight, so that I can make a better report or understand what's happening ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Apr 2 06:43:25 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 2 Apr 2009 10:43:25 +0000 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> Message-ID: The folder SL is installed into is the version; if you're using SL2 it should be C:\Program Files\Microsoft Silverlight\2.0.40115.0\. SL3 Beta is C:\Program Files\Microsoft Silverlight\3.0.40307.0\. http://jimmy.schementi.com/silverlight/repro-defined.zip Unzip that and double-click on the index.html file. The first line of app.xap is defined?(System::Windows::Forms), and works fine. It also works in the console. Let me know what happens for you. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 02, 2009 2:57 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight Hi, I believe I need to give you more context about what I'm doing. In Magic (see here in particular) I currently have a single file providing support for WPF, Silverlight and Windows Forms. I use defined? to determine if one of these are available and adopt adequate behaviour. So that's why I run defined?(System::Windows::Forms::Control) inside Silverlight. I can definitely think about alternatives (such as creating a specific file for each scenario) - I could do that but I'm trying to stay with a single file and avoid metaprogramming for the moment as it's much simpler to test. So back to the issue, now that I hope you have a clearer understanding of what I'm doing here. Using ruby 1.8.6 or ironruby v0.3, running this file through command line [ruby/ir] my_test.rb doesn't choke: raise "detected!" if defined?(System::Windows::Forms::Control) Putting the same code as the first line of app.rb in a silverlight ironruby app fails: MemberAccessException: uninitialized constant System::Windows::Forms Is there any way to retrieve some accurate info on versioning from inside silverlight, so that I can make a better report or understand what's happening ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Thu Apr 2 10:35:59 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 2 Apr 2009 16:35:59 +0200 Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? Message-ID: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com> Hi, while trying to call some C# code from IronRuby, I get this: my_csharp_class_instance.call(%w(some array)) :0: can't convert Array into System::String[] (TypeError) Is there some easy way to construct an array of System::String ? Or a conversion ? cheers, -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Thu Apr 2 11:03:29 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 2 Apr 2009 08:03:29 -0700 Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? In-Reply-To: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com> References: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com> Message-ID: I don't know if it's the easiest way, but this should work as a conversion: x = ['a', 'b', 'c'] System::Array[System::String].new(x.map { |s| s.to_s.to_clr_string }) (Obviously, if you know that the elements are already Ruby strings, you can omit the "to_s".) From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 02, 2009 7:36 AM To: ironruby-core Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? Hi, while trying to call some C# code from IronRuby, I get this: my_csharp_class_instance.call(%w(some array)) :0: can't convert Array into System::String[] (TypeError) Is there some easy way to construct an array of System::String ? Or a conversion ? cheers, -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Thu Apr 2 11:20:52 2009 From: michael.letterle at gmail.com (Michael Letterle) Date: Thu, 2 Apr 2009 11:20:52 -0400 Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? In-Reply-To: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com> References: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com> Message-ID: class Array def to_clr_arr arr = System::Array.CreateInstance self[0].class.to_clr_type, System::Int32.pase(self.length.to_s) self.each_with_index { |r, i| arr[i] = r } return arr end end my_csharp_class_instance.call(%w(some array).map{|x| x.to_clr_string}.to_clr_arr) 2009/4/2 Thibaut Barr?re > Hi, > > while trying to call some C# code from IronRuby, I get this: > > my_csharp_class_instance.call(%w(some array)) > > :0: can't convert Array into System::String[] (TypeError) > > Is there some easy way to construct an array of System::String ? Or a > conversion ? > > cheers, > > -- Thibaut > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle IronRuby MVP http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Thu Apr 2 11:41:23 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 2 Apr 2009 15:41:23 +0000 Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? In-Reply-To: References: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com>, Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD098613F1@TK5EX14MBXC101.redmond.corp.microsoft.com> Jimmy and I have discussed a to_clr_array(type) where type defaults to Object, but nothing like that exists yet. JD ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Curt Hagenlocher [curth at microsoft.com] Sent: Thursday, April 02, 2009 8:03 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to instanciate a System::String[] from IronRuby? I don?t know if it?s the easiest way, but this should work as a conversion: x = ['a', 'b', 'c'] System::Array[System::String].new(x.map { |s| s.to_s.to_clr_string }) (Obviously, if you know that the elements are already Ruby strings, you can omit the ?to_s?.) From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 02, 2009 7:36 AM To: ironruby-core Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? Hi, while trying to call some C# code from IronRuby, I get this: my_csharp_class_instance.call(%w(some array)) :0: can't convert Array into System::String[] (TypeError) Is there some easy way to construct an array of System::String ? Or a conversion ? cheers, -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Apr 2 12:24:26 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 2 Apr 2009 09:24:26 -0700 Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD098613F1@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com>, <0AB34E2BFBE88245B073D2D83B4245FD098613F1@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: This is the right way: x = ['a', 'b', 'c'] System::Array[System::String].new(x.map { |s| s.to_s.to_clr_string }) This would simplify to x = ['a', 'b', 'c'] System::Array[System::String].new(x) As soon as we implement implicit conversions here. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Thursday, April 02, 2009 8:41 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to instanciate a System::String[] from IronRuby? Jimmy and I have discussed a to_clr_array(type) where type defaults to Object, but nothing like that exists yet. JD ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Curt Hagenlocher [curth at microsoft.com] Sent: Thursday, April 02, 2009 8:03 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to instanciate a System::String[] from IronRuby? I don't know if it's the easiest way, but this should work as a conversion: x = ['a', 'b', 'c'] System::Array[System::String].new(x.map { |s| s.to_s.to_clr_string }) (Obviously, if you know that the elements are already Ruby strings, you can omit the "to_s".) From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 02, 2009 7:36 AM To: ironruby-core Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? Hi, while trying to call some C# code from IronRuby, I get this: my_csharp_class_instance.call(%w(some array)) :0: can't convert Array into System::String[] (TypeError) Is there some easy way to construct an array of System::String ? Or a conversion ? cheers, -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobjohnson11 at gmail.com Thu Apr 2 12:58:24 2009 From: bobjohnson11 at gmail.com (Robert Johnson) Date: Thu, 2 Apr 2009 12:58:24 -0400 Subject: [Ironruby-core] error --> undefined method 'length' for nil:NilClass Message-ID: <31fa7e630904020958j484d1098w5b7fcec0eb299527@mail.gmail.com> I just updated my local repo from gitHub and when I run rake compile I see the following error: ---------------------------------------------------------------------------------------------------------------------------------------- C:\Users\Robert\bob-code-repo\ironruby_working\Merlin\Main\Languages\Ruby>rake compile (in C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby) rake aborted! undefined method `length' for nil:NilClass (See full trace by running task with --trace) ---------------------------------------------------------------------------------------------------------------------------------------- I ran rake with "--trace" and the following was the result: ------------------------------------------------------------------------------------------------------------------------------------------ C:\Users\Robert\bob-code-repo\ironruby_working\Merlin\Main\Languages\Ruby>rake c ompile --trace (in C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy rake aborted! undefined method `length' for nil:NilClass C:/ruby/lib/ruby/gems/1.8/gems/pathname2-1.6.1/lib/pathname2.rb:100:in `initiali ze' C:/ruby/lib/ruby/gems/1.8/gems/pathname2-1.6.1/lib/pathname2.rb:665:in `new' C:/ruby/lib/ruby/gems/1.8/gems/pathname2-1.6.1/lib/pathname2.rb:665:in `+' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:30:in `path_exists?' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:29:in `each' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:29:in `path_exists?' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:103 C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:102:in `each' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:102 C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_c hain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_c hain' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisit es' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisit es' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_c hain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_c hain' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exceptio n_handling' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exceptio n_handling' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 c:/ruby/bin/rake:19:in `load' c:/ruby/bin/rake:19 ------------------------------------------------------------------------------------------------------------------------------------------ Does anyone have any idea whats happening ? Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Thu Apr 2 13:42:20 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 2 Apr 2009 17:42:20 +0000 Subject: [Ironruby-core] error --> undefined method 'length' for nil:NilClass In-Reply-To: <31fa7e630904020958j484d1098w5b7fcec0eb299527@mail.gmail.com> References: <31fa7e630904020958j484d1098w5b7fcec0eb299527@mail.gmail.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD09863D90@TK5EX14MBXC101.redmond.corp.microsoft.com> It's probably related to Merlin\External moving to Merlin\External.LCA_RESTRICTED. I'll figure it out and push out a new revision in a few hours. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Johnson Sent: Thursday, April 02, 2009 9:58 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] error --> undefined method 'length' for nil:NilClass I just updated my local repo from gitHub and when I run rake compile I see the following error: ---------------------------------------------------------------------------------------------------------------------------------------- C:\Users\Robert\bob-code-repo\ironruby_working\Merlin\Main\Languages\Ruby>rake compile (in C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby) rake aborted! undefined method `length' for nil:NilClass (See full trace by running task with --trace) ---------------------------------------------------------------------------------------------------------------------------------------- I ran rake with "--trace" and the following was the result: ------------------------------------------------------------------------------------------------------------------------------------------ C:\Users\Robert\bob-code-repo\ironruby_working\Merlin\Main\Languages\Ruby>rake c ompile --trace (in C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby) ** Invoke compile (first_time) ** Invoke happy (first_time) ** Execute happy rake aborted! undefined method `length' for nil:NilClass C:/ruby/lib/ruby/gems/1.8/gems/pathname2-1.6.1/lib/pathname2.rb:100:in `initiali ze' C:/ruby/lib/ruby/gems/1.8/gems/pathname2-1.6.1/lib/pathname2.rb:665:in `new' C:/ruby/lib/ruby/gems/1.8/gems/pathname2-1.6.1/lib/pathname2.rb:665:in `+' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:30:in `path_exists?' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:29:in `each' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:29:in `path_exists?' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:103 C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:102:in `each' C:/Users/Robert/bob-code-repo/ironruby_working/Merlin/Main/Languages/Ruby/rake/m isc.rake:102 C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_c hain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_c hain' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisit es' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisit es' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_c hain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_c hain' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exceptio n_handling' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exceptio n_handling' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run' C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 c:/ruby/bin/rake:19:in `load' c:/ruby/bin/rake:19 ------------------------------------------------------------------------------------------------------------------------------------------ Does anyone have any idea whats happening ? Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Thu Apr 2 15:08:22 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 2 Apr 2009 12:08:22 -0700 Subject: [Ironruby-core] FYI review - Jirapong's fixes for GzipFile#finish Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608E744@NA-EXMSG-C104.redmond.corp.microsoft.com> FYI review only... This is Jirapong's change. A big thanks to Jirapong for his first contribution to IronRuby! Looking forward to many more! I have pushed it to my fork. The individual commits are shown below, but there will be a bit of noise as Jirapong bounced questions off me. I should probably have squashed his individual commits into one to remove the noise. Might do that for the next round... http://github.com/shri/ironruby/commit/62b0d91e3fdc6c557ed7f698e1026524ee8f7af6 http://github.com/shri/ironruby/commit/88a3902ffa3eb2f6fb145142f144796e7a021602 http://github.com/shri/ironruby/commit/24b069c0a8f1448977dd0f6b1f7ae7f7b556ab18 http://github.com/Jirapong/ironruby/commit/2926dd7452a9e09e269d743a9641131c5a9278bd http://github.com/shri/ironruby/commit/ec7270c2934c81a88dcc4ce274db6404ec2c7153 - My code review http://github.com/shri/ironruby/commit/c71e026eca1134d77a87bd792b1d93c60e32bf81 GitDiff.bat c9a26adb7c443afc192514c72806e95b178d5088 c71e026eca1134d77a87bd792b1d93c60e32bf81 GzipFile#finish should close the GzipReader/GzipWriter, but not the underlying IO object. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Thu Apr 2 16:20:42 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 2 Apr 2009 20:20:42 +0000 Subject: [Ironruby-core] FYI review - Jirapong's fixes for GzipFile#finish In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608E744@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608E744@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD09864854@TK5EX14MBXC101.redmond.corp.microsoft.com> The debugger method shouldn't be in spec_helper.rb. It's a IronRuby specific method and that file is a MSpec file. Also, it's missing an end. Other than that, test looks good. JD From: Shri Borde Sent: Thursday, April 02, 2009 12:08 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: FYI review - Jirapong's fixes for GzipFile#finish FYI review only... This is Jirapong's change. A big thanks to Jirapong for his first contribution to IronRuby! Looking forward to many more! I have pushed it to my fork. The individual commits are shown below, but there will be a bit of noise as Jirapong bounced questions off me. I should probably have squashed his individual commits into one to remove the noise. Might do that for the next round... http://github.com/shri/ironruby/commit/62b0d91e3fdc6c557ed7f698e1026524ee8f7af6 http://github.com/shri/ironruby/commit/88a3902ffa3eb2f6fb145142f144796e7a021602 http://github.com/shri/ironruby/commit/24b069c0a8f1448977dd0f6b1f7ae7f7b556ab18 http://github.com/Jirapong/ironruby/commit/2926dd7452a9e09e269d743a9641131c5a9278bd http://github.com/shri/ironruby/commit/ec7270c2934c81a88dcc4ce274db6404ec2c7153 - My code review http://github.com/shri/ironruby/commit/c71e026eca1134d77a87bd792b1d93c60e32bf81 GitDiff.bat c9a26adb7c443afc192514c72806e95b178d5088 c71e026eca1134d77a87bd792b1d93c60e32bf81 GzipFile#finish should close the GzipReader/GzipWriter, but not the underlying IO object. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Apr 2 18:35:51 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 2 Apr 2009 22:35:51 +0000 Subject: [Ironruby-core] Proposal: Moving IronRuby bugs to CodePlex Message-ID: (I originally planned on sending this yesterday, but I waited until today to remove the "April Fools" possibility =P) I'd like to propose moving IronRuby's bugs off of RubyForge. CodePlex looks like the best option, mainly due to the voting feature for bugs. Here are some possible options for defect tracking, and what I think about them: Lighthouse: http://lighthouseapp.com Sample site: http://silverline.lighthouseapp.com Very usable, nice UI, and I'm a sucker for those types of things. They support multiple projects, so splitting up the project into Compiler, Libraries, Silverlight, etc, would be very clear. There's also a nice UI for milestone progress, making it fairly clear how the progress is going. Also, other Ruby projects are moving here, so a move to Lighthouse would follow the logic of why we started on RubyForge. Lighthouse also has integration with GitHub, keeping our lighthouse page up-to-date with any changes in git. Lighthouse is usually a pay-service, but I believe they have free hosting for open-source projects. However, there might be limits on how many projects can be created, or users can be admins, so it'd be good to find out these details. Unfortunately, there's no good way to prioritize tickets other than milestones, and non-project-admins can't change the milestone, so we can't accomplish any type of user-prioritization (voting) on tickets. RubyForge: http://rubyforge.org Sample site: http://rubyforge.org/projects/ironruby We're on RubyForge currently, so switching to RubyForge would be easy. =P Unfortunately, that's about the only benefit it provides. While RubyForge has been instrumental in shaping the Ruby community, it appears that its heydays have passed, in favor of GitHub and lighthouse. RubyForge also appears to be unmaintained, especially in light of our crazy mailing list delays. File releases are still being used by the Ruby community, mainly because of it being a Ruby Gems repository, so we should keep releasing on it. CodePlex: http://codeplex.com Sample site: http://ironpython.codeplex.com CodePlex has turned into a pretty awesome open-source project site. In the past I wouldn't have wanted to move to CodePlex, but now there defect tracking features seem like the best, and much faster than they use to be. You can use the web interface, the team foundation client, or CodePlex client to look at bugs, which makes it pretty easy to keep on-top of them. Since CodePlex uses TFS underneath to store work-items and bugs, we can use the TFS API to do git commit integration and things like that (though the TFS API isn't the greatest, it exists =P). But mainly the web interface has voting support, so our tickets can be prioritized by community feedback very easily ... this is definitely the killer feature for me. As I said, I'm leaning heavily towards CodePlex, mainly for the voting support. IronPython uses this very successfully, and it would help prioritize IronRuby's work, especially post-1.0. So here's the proposal: 1. Go through open RubyForge bugs, closing bugs as necessary, and narrowing in on a subset to move to CodePlex (jdeville has begun closing bugs). 2. Create http://ironruby.codeplex.com (already reserved, just waiting to set things up and turn it on), and use it for *Issues* and *Releases* only. We will link to http://wiki.github.com/ironruby/ironruby for other developer information, and http://ironruby.net for general users, from the project homepage, and no other wiki pages will be used. 3. Releases will be the only things remaining on RubyForge, as it's still the standard place for Ruby releases, though any release announcements/blogs will point to the CodePlex release. 4. CodePlex discussion forums will not be used, as they and will remain on RubyForge for now (though we need to resolve the crazy delays soon). Thoughts? ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Thu Apr 2 18:44:12 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 3 Apr 2009 00:44:12 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> Message-ID: <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> > > The folder SL is installed into is the version; if you?re using SL2 it > should be C:\Program Files\Microsoft Silverlight\2.0.40115.0\. SL3 Beta is > C:\Program Files\Microsoft Silverlight\3.0.40307.0\. > I'm testing this from my Mac. I'll be searching for the files using find. > > > http://jimmy.schementi.com/silverlight/repro-defined.zip > > > > Unzip that and double-click on the index.html file. The first line of > app.xap is defined?(System::Windows::Forms), and works fine. It also works > in the console. Let me know what happens for you. > Clicking on index.html shows a welcome message and the ironruby console, so it doesn't seem to bang. Editing has some weird behaviour: when I type (, defined? gets erased. Maybe totally unrelated, but this mean I can't test in the console. I'm a bit puzzled as why it fails. I'll try to find some extra time to investigate - may be related to the fact that I'm using Chiron on Mac ? No idea what's happening for the moment. Thanks for the repro, Jimmy. -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Thu Apr 2 18:51:12 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 3 Apr 2009 00:51:12 +0200 Subject: [Ironruby-core] How to instanciate a System::String[] from IronRuby? In-Reply-To: References: <4a68b8cf0904020735x1f55a393x2e985971d6e9e648@mail.gmail.com> <0AB34E2BFBE88245B073D2D83B4245FD098613F1@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0904021551y5281f0fj19c67b4a27c88032@mail.gmail.com> Hi, thanks for the feedback - I'll give these a go. cheers -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Thu Apr 2 19:31:11 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 3 Apr 2009 01:31:11 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> Message-ID: <4a68b8cf0904021631m3386ee0bvc013ac9b23b65dda@mail.gmail.com> Hey, I finally removed all the bits of Silverlight (/Library/Internet Plug-Ins/Silverlight* , /Library/Receipts/Silverlight*.pkg) and reinstalled SL2. It now works as expected. I didn't find some way to understand what really happened, but the issue is solved anyway. thanks for your support, -- Thibaut From Jimmy.Schementi at microsoft.com Thu Apr 2 19:58:56 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 2 Apr 2009 23:58:56 +0000 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904021631m3386ee0bvc013ac9b23b65dda@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> <4a68b8cf0904021631m3386ee0bvc013ac9b23b65dda@mail.gmail.com> Message-ID: Ah, you were on a Mac. Let me know if it happens again. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Thibaut Barr?re > Sent: Thursday, April 02, 2009 4:31 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] defined?(xxx) behaves differently when > called from Silverlight > > Hey, > > I finally removed all the bits of Silverlight (/Library/Internet > Plug-Ins/Silverlight* , /Library/Receipts/Silverlight*.pkg) and > reinstalled SL2. > > It now works as expected. I didn't find some way to understand what > really happened, but the issue is solved anyway. > > thanks for your support, > > -- Thibaut > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Thu Apr 2 20:59:47 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 3 Apr 2009 00:59:47 +0000 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> Message-ID: From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 02, 2009 3:44 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight The folder SL is installed into is the version; if you're using SL2 it should be C:\Program Files\Microsoft Silverlight\2.0.40115.0\. SL3 Beta is C:\Program Files\Microsoft Silverlight\3.0.40307.0\. I'm testing this from my Mac. I'll be searching for the files using find. http://jimmy.schementi.com/silverlight/repro-defined.zip Unzip that and double-click on the index.html file. The first line of app.xap is defined?(System::Windows::Forms), and works fine. It also works in the console. Let me know what happens for you. Clicking on index.html shows a welcome message and the ironruby console, so it doesn't seem to bang. Editing has some weird behaviour: when I type (, defined? gets erased. Maybe totally unrelated, but this mean I can't test in the console. I'm a bit puzzled as why it fails. I'll try to find some extra time to investigate - may be related to the fact that I'm using Chiron on Mac ? No idea what's happening for the moment. Thanks for the repro, Jimmy. -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Thu Apr 2 21:02:28 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 3 Apr 2009 01:02:28 +0000 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <4a68b8cf0904020256y61fa218fqc96e0d8a2c8e889d@mail.gmail.com> <4a68b8cf0904021544t5dc766f7qd48ccf78b1a31ac@mail.gmail.com> Message-ID: Woops, hit send too soon. I just tested it out on a Mac in FF3 and Safari3, and nothing blew up and the console rendered fine. You're future mail said things work, so I guess I'm just confirming that your prior installation was all-sorts-of-crazy. Also, Chiron on the Mac wouldn't cause this, as Chiron simply serves a XAP file, and has nothing to do with the actual running of the SL app. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 02, 2009 3:44 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight The folder SL is installed into is the version; if you're using SL2 it should be C:\Program Files\Microsoft Silverlight\2.0.40115.0\. SL3 Beta is C:\Program Files\Microsoft Silverlight\3.0.40307.0\. I'm testing this from my Mac. I'll be searching for the files using find. http://jimmy.schementi.com/silverlight/repro-defined.zip Unzip that and double-click on the index.html file. The first line of app.xap is defined?(System::Windows::Forms), and works fine. It also works in the console. Let me know what happens for you. Clicking on index.html shows a welcome message and the ironruby console, so it doesn't seem to bang. Editing has some weird behaviour: when I type (, defined? gets erased. Maybe totally unrelated, but this mean I can't test in the console. I'm a bit puzzled as why it fails. I'll try to find some extra time to investigate - may be related to the fact that I'm using Chiron on Mac ? No idea what's happening for the moment. Thanks for the repro, Jimmy. -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri Apr 3 11:25:51 2009 From: lists at ruby-forum.com (Vaibhav Deshpande) Date: Fri, 3 Apr 2009 17:25:51 +0200 Subject: [Ironruby-core] defined?(xxx) behaves differently when called from Silverlight In-Reply-To: <69f7d8470904011535xb7e00e8md284c07903adadb7@mail.gmail.com> References: <4a68b8cf0904011308i5a0ecaf2ta04ad0477dfd200f@mail.gmail.com> <69f7d8470904011535xb7e00e8md284c07903adadb7@mail.gmail.com> Message-ID: <4c8ba835dbe24b39b33d719e2166401d@ruby-forum.com> Jb Evain wrote: > On 4/1/09, Thibaut Barr? wrote: >> Can anyone else reproduce that issue (or is it something known >> already), or is my silverlight install messing up ? > > Well, there's no System.Windows.Froms.Control in silverlight to begin > with. > > defined?(System::Windows::Application) > > does work though. -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Fri Apr 3 12:45:28 2009 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 3 Apr 2009 16:45:28 +0000 Subject: [Ironruby-core] Code Review: Bug Regressions and .NET interop Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD09867B01@TK5EX14MBXC101.redmond.corp.microsoft.com> Some more changes. Mostly closing bugs and adding .NET interop tests. Commit range is 90392fff to a39daeae on git://github.com/jredville/ironruby.git. I rebased this time, so you should be able to just grab that range and see only my diffs. * closing Rubyforge 15060 * [#24589] $PROGRAM_NAME in 'English' not working now fixed * making $0 the same object as $PROGRAM_NAME and adding specs for it. Closes [#24589] $PROGRAM_NAME in 'English' not working * closing Rubyforge [#15061] tracking: create generic interface type * closing RubyForge [#15651] NoMethodError expected when calling the private method 'initialize' of a ruby class * added protected method invocation specs. Closes Rubyforge [#19118] Protected members not available when inheriting from CLR type * adding regression test for [#19872] IComparableOps.CompareTo throws argument error when type is Decimal * added reference support to csc.bat * closing [#17467] Accessing IronRuby method from C# * closing [#19950] Dir.glob doesn't handle ** * closing [#20027] Formatting float to string produces incorrectly &amp;amp;quot;Infinity&amp;amp;quot; * closing [#20043] creating a generic type when the type is an interface * closing [#20052] Calculating 3.0/2.0 produces NaN * closing Rubyforge [#20263] Dir.glob doesn't handle missing folders * closing [#20410] GetKCodeName * adding test to ensure that File.stat returns a File::Stat object * closing Rubyforge [#20640] Calling File.open with an integer (File descriptor overload) causes the File.open site to be unusable * closing Rubyforge [#20664] Respecting visibility of methods. Also fixes a compilation error due to multiple IInterface definitions * Closing RubyForge [#20665] Can't use an indexer on a WPF ResourceDictionary * removing a tag for predefined * closing Rubyforge [#21943] NullRef exception thrown while comparing a list containing elements with overriden == * closing Rubyforge [#21995] kind_of? not working with when extend is used * recommiting some changes that were reverted by the merge. Methinks someone in TFS changed them. This makes describe work with 2 strings for shared behaviors, and it makes csc output #line pragmas * fixing some more errors from the merge * Adding class instantiation specs for regular classes with overloaded constructors * adding regression tests for [#22197] calling super throw Argument Error * adding StringBuilder specs to get rid of test_basic.rb. Also added equal_clr_string matcher * refactor specs to use the equal_clr_string matcher * basic string specs to remove test_basic.rb * added more string specs to get rid of test_basic. Also adds field specs * adding some basic event add and remove specs * added event invocation specs JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Apr 3 13:36:12 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 3 Apr 2009 10:36:12 -0700 Subject: [Ironruby-core] FW: File.executable? always returns false on Windows machine Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EC1B@NA-EXMSG-C104.redmond.corp.microsoft.com> Anyone know what File.executable? is supposed to do? For me, it always returns false. For Jim, Tomas and others, it always returns true no matter what the file extension is. Any idea why we might be getting different results? FWIW, the current IronRuby implementation returns true if the file extension is ".exe". Thanks, Shri From: Shri Borde Sent: Thursday, April 02, 2009 3:59 PM To: ruby-core at ruby-lang.org Subject: File.executable? always returns false on Windows machine On my machine, File.executable? is always returning false. I have tried 1.8p27. I am running on a Windows Vista x86 machine. The file system is NTFS. I can't think of anything unusual about my machine. What are the semantic supposed to be? Most of the people I have asked get a value of true for all of the statements below, even for the File.executable? on the ttf file. puts File.exists?("C:/windows/fonts/wingding.ttf") puts File.readable?("C:/windows/fonts/wingding.ttf") puts File.executable?("C:/windows/fonts/wingding.ttf") # Prints false only for me puts File.exists?("C:/windows/notepad.exe") puts File.readable?("C:/windows/notepad.exe") puts File.executable?("C:/windows/notepad.exe") # Prints false only for me With the 1.9 binaries, File.executable? returns true only if the file extensions is something like .exe. Again, it always returns true for the people I have asked. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Apr 3 13:42:12 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 3 Apr 2009 10:42:12 -0700 Subject: [Ironruby-core] Review: File.chmod Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EC2C@NA-EXMSG-C104.redmond.corp.microsoft.com> http://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 * Implements File.chmod * File.readable? should return false if the given filename does not exist * File.delete should be able to delete a read-only file. This is implemented by making the file writable first. This is the only solution I could find. * Added debugger visualizer for RubyObject so that VS will display the result of to_s in the Watch window. * Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so that the Legacy tests (Ruby\Scripts\test.bat) can pass without any failures. Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Test/Scripts/ir.cmd Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Fri Apr 3 13:53:00 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 3 Apr 2009 10:53:00 -0700 Subject: [Ironruby-core] Review: File.chmod In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608EC2C@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EC2C@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: The comment "// TODO: implement this correctly for windows" could probably be removed; it's hard to envision chmod doing anything differently under Windows than what you've already implemented. From: Shri Borde Sent: Friday, April 03, 2009 10:42 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: File.chmod http://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 * Implements File.chmod * File.readable? should return false if the given filename does not exist * File.delete should be able to delete a read-only file. This is implemented by making the file writable first. This is the only solution I could find. * Added debugger visualizer for RubyObject so that VS will display the result of to_s in the Watch window. * Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so that the Legacy tests (Ruby\Scripts\test.bat) can pass without any failures. Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Test/Scripts/ir.cmd Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri Apr 3 14:00:05 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 3 Apr 2009 11:00:05 -0700 Subject: [Ironruby-core] Review: File.chmod In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E1608EC2C@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: You can use RubyContext.Inspect in the DebugView. Other than that code changes look good. Tomas From: Curt Hagenlocher Sent: Friday, April 03, 2009 10:53 AM To: Shri Borde; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Review: File.chmod The comment "// TODO: implement this correctly for windows" could probably be removed; it's hard to envision chmod doing anything differently under Windows than what you've already implemented. From: Shri Borde Sent: Friday, April 03, 2009 10:42 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: File.chmod http://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 * Implements File.chmod * File.readable? should return false if the given filename does not exist * File.delete should be able to delete a read-only file. This is implemented by making the file writable first. This is the only solution I could find. * Added debugger visualizer for RubyObject so that VS will display the result of to_s in the Watch window. * Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so that the Legacy tests (Ruby\Scripts\test.bat) can pass without any failures. Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Test/Scripts/ir.cmd Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Fri Apr 3 16:02:45 2009 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 3 Apr 2009 20:02:45 +0000 Subject: [Ironruby-core] Review: File.chmod In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E1608EC2C@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD098690C3@TK5EX14MBXC101.redmond.corp.microsoft.com> Test looks good. JD From: Tomas Matousek Sent: Friday, April 03, 2009 11:00 AM To: Curt Hagenlocher; Shri Borde; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Review: File.chmod You can use RubyContext.Inspect in the DebugView. Other than that code changes look good. Tomas From: Curt Hagenlocher Sent: Friday, April 03, 2009 10:53 AM To: Shri Borde; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Review: File.chmod The comment "// TODO: implement this correctly for windows" could probably be removed; it's hard to envision chmod doing anything differently under Windows than what you've already implemented. From: Shri Borde Sent: Friday, April 03, 2009 10:42 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: File.chmod http://github.com/shri/ironruby/commit/9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 GitDiff.bat c71e026eca1134d77a87bd792b1d93c60e32bf81 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 * Implements File.chmod * File.readable? should return false if the given filename does not exist * File.delete should be able to delete a read-only file. This is implemented by making the file writable first. This is the only solution I could find. * Added debugger visualizer for RubyObject so that VS will display the result of to_s in the Watch window. * Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so that the Legacy tests (Ruby\Scripts\test.bat) can pass without any failures. Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/chmod_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/chmod_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/shared/unlink.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/comment_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipfile/orig_name_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/spec_helper.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Test/Scripts/ir.cmd Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Apr 3 16:44:37 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 3 Apr 2009 13:44:37 -0700 Subject: [Ironruby-core] Requesting contributions to IronRuby Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> We are getting closer to the V1 release of IronRuby which is planned for summer this year. The implementation has become fairly complete and usable in a lot of scenarios. Over the last few months, we have also improved our processes to make it easier for the community to contribute to the project. This includes moving the sources to GIT, pushing the sources to GIT daily from our internal repo, adding shortcuts and scripts to make the dev environment easy to use, having the Microsoft team work out of GIT, and finally adding information on http://wiki.github.com/ironruby/ironruby/. Many folks are able to build and run the tests easily. This opens up the opportunity for more of you to contribute to IronRuby and help make the V1 release be more complete and solid. If you have ideas of your own, go for it by all means. If you are looking for suggestions, I have added a few ideas at http://wiki.github.com/ironruby/ironruby/contributing. There are easy tasks like fixing RubySpec bugs and difficult tasks like porting a C# sample. If you are interested in any of the tasks, let us know and we will do our best to help you get started. Every little bit helps, so don't worry if you are not sure how much time you can commit, if you are not sure how hard the tasks will be, etc. I would love to see more people signed up for tasks in the "Who is working on what" section. There are six names there right now. Can we get to a dozen? Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Fri Apr 3 16:47:29 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 3 Apr 2009 20:47:29 +0000 Subject: [Ironruby-core] Code Review: Bug Regressions and .NET interop In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD09867B01@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <0AB34E2BFBE88245B073D2D83B4245FD09867B01@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: Posted comments on github, but here they are also: * 'represents the program name' looks strange, asserting that the splitted string (?) equals a array with two elements, both containing the expanded path the string represented. How does that make sense? Jim explained this one, and now it makes sense. He's adding a comment to explain the witchery * Catching NoMethodError to check for a private method is not enough, you should also ensure that klass.method(:initialize) gives you back a Method object, and that klass.private_methods.include?('initialize'). Given those three pieces of info you can better infer that the method exists and it is private. * Make protected_spec less redundant (see comment on http://github.com/jredville/ironruby/commit/167197cb78cb81590be9ae2fe48a953306070374#comment_18110) * Indent is off on line 10 in Interop/fixtures.generated.cs (and seems to be for all generated C#). * What's the debug("reference", ref) call doing in csc.rb? (that name cracks me up) * To answer the TODO in conversion_spec.rb: it should belong in the tests for using IronRuby through the hosting API. I don't think we have any, and maybe they should exist in our .NET interop? Interop/dlr/... * Is "truncate" the correct terminology in modulo_spec.rb? How about "rounds"? * There's no spec for the obj.my_event { ... } syntax Otherwise, good job =) From: Jim Deville Sent: Friday, April 03, 2009 9:45 AM To: ironruby-core at rubyforge.org; IronRuby External Code Reviewers Subject: Code Review: Bug Regressions and .NET interop Some more changes. Mostly closing bugs and adding .NET interop tests. Commit range is 90392fff to a39daeae on git://github.com/jredville/ironruby.git. I rebased this time, so you should be able to just grab that range and see only my diffs. * closing Rubyforge 15060 * [#24589] $PROGRAM_NAME in 'English' not working now fixed * making $0 the same object as $PROGRAM_NAME and adding specs for it. Closes [#24589] $PROGRAM_NAME in 'English' not working * closing Rubyforge [#15061] tracking: create generic interface type * closing RubyForge [#15651] NoMethodError expected when calling the private method 'initialize' of a ruby class * added protected method invocation specs. Closes Rubyforge [#19118] Protected members not available when inheriting from CLR type * adding regression test for [#19872] IComparableOps.CompareTo throws argument error when type is Decimal * added reference support to csc.bat * closing [#17467] Accessing IronRuby method from C# * closing [#19950] Dir.glob doesn't handle ** * closing [#20027] Formatting float to string produces incorrectly &amp;amp;quot;Infinity&amp;amp;quot; * closing [#20043] creating a generic type when the type is an interface * closing [#20052] Calculating 3.0/2.0 produces NaN * closing Rubyforge [#20263] Dir.glob doesn't handle missing folders * closing [#20410] GetKCodeName * adding test to ensure that File.stat returns a File::Stat object * closing Rubyforge [#20640] Calling File.open with an integer (File descriptor overload) causes the File.open site to be unusable * closing Rubyforge [#20664] Respecting visibility of methods. Also fixes a compilation error due to multiple IInterface definitions * Closing RubyForge [#20665] Can't use an indexer on a WPF ResourceDictionary * removing a tag for predefined * closing Rubyforge [#21943] NullRef exception thrown while comparing a list containing elements with overriden == * closing Rubyforge [#21995] kind_of? not working with when extend is used * recommiting some changes that were reverted by the merge. Methinks someone in TFS changed them. This makes describe work with 2 strings for shared behaviors, and it makes csc output #line pragmas * fixing some more errors from the merge * Adding class instantiation specs for regular classes with overloaded constructors * adding regression tests for [#22197] calling super throw Argument Error * adding StringBuilder specs to get rid of test_basic.rb. Also added equal_clr_string matcher * refactor specs to use the equal_clr_string matcher * basic string specs to remove test_basic.rb * added more string specs to get rid of test_basic. Also adds field specs * adding some basic event add and remove specs * added event invocation specs JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Fri Apr 3 17:09:49 2009 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 3 Apr 2009 21:09:49 +0000 Subject: [Ironruby-core] Code Review: Bug Regressions and .NET interop In-Reply-To: References: <0AB34E2BFBE88245B073D2D83B4245FD09867B01@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD0986977A@TK5EX14MBXC101.redmond.corp.microsoft.com> From: Jimmy Schementi Sent: Friday, April 03, 2009 1:47 PM To: Jim Deville; ironruby-core at rubyforge.org; IronRuby External Code Reviewers Subject: RE: Code Review: Bug Regressions and .NET interop Posted comments on github, but here they are also: * 'represents the program name' looks strange, asserting that the splitted string (?) equals a array with two elements, both containing the expanded path the string represented. How does that make sense? Jim explained this one, and now it makes sense. He's adding a comment to explain the witchery Comment added * Catching NoMethodError to check for a private method is not enough, you should also ensure that klass.method(:initialize) gives you back a Method object, and that klass.private_methods.include?('initialize'). Given those three pieces of info you can better infer that the method exists and it is private. Fixed * Make protected_spec less redundant (see comment on http://github.com/jredville/ironruby/commit/167197cb78cb81590be9ae2fe48a953306070374#comment_18110) I'm going to punt this one, because I want to extract either a shared behavior or a matcher out of these specs. I'll have that in the next push. * Indent is off on line 10 in Interop/fixtures.generated.cs (and seems to be for all generated C#). Yeah, the generated indentation isn't perfect. I'll look into it. * What's the debug("reference", ref) call doing in csc.rb? (that name cracks me up) Glad you like the name. debug(str, obj) is a debug method that prints "#{str}: #{obj.to_s}" to stdout if $DEBUG is true * To answer the TODO in conversion_spec.rb: it should belong in the tests for using IronRuby through the hosting API. I don't think we have any, and maybe they should exist in our .NET interop? Interop/dlr/... I'll think about this and make the move if needed. * Is "truncate" the correct terminology in modulo_spec.rb? How about "rounds"? Fixed * There's no spec for the obj.my_event { ... } syntax Fixed Otherwise, good job =) From: Jim Deville Sent: Friday, April 03, 2009 9:45 AM To: ironruby-core at rubyforge.org; IronRuby External Code Reviewers Subject: Code Review: Bug Regressions and .NET interop Some more changes. Mostly closing bugs and adding .NET interop tests. Commit range is 90392fff to a39daeae on git://github.com/jredville/ironruby.git. I rebased this time, so you should be able to just grab that range and see only my diffs. * closing Rubyforge 15060 * [#24589] $PROGRAM_NAME in 'English' not working now fixed * making $0 the same object as $PROGRAM_NAME and adding specs for it. Closes [#24589] $PROGRAM_NAME in 'English' not working * closing Rubyforge [#15061] tracking: create generic interface type * closing RubyForge [#15651] NoMethodError expected when calling the private method 'initialize' of a ruby class * added protected method invocation specs. Closes Rubyforge [#19118] Protected members not available when inheriting from CLR type * adding regression test for [#19872] IComparableOps.CompareTo throws argument error when type is Decimal * added reference support to csc.bat * closing [#17467] Accessing IronRuby method from C# * closing [#19950] Dir.glob doesn't handle ** * closing [#20027] Formatting float to string produces incorrectly &amp;amp;quot;Infinity&amp;amp;quot; * closing [#20043] creating a generic type when the type is an interface * closing [#20052] Calculating 3.0/2.0 produces NaN * closing Rubyforge [#20263] Dir.glob doesn't handle missing folders * closing [#20410] GetKCodeName * adding test to ensure that File.stat returns a File::Stat object * closing Rubyforge [#20640] Calling File.open with an integer (File descriptor overload) causes the File.open site to be unusable * closing Rubyforge [#20664] Respecting visibility of methods. Also fixes a compilation error due to multiple IInterface definitions * Closing RubyForge [#20665] Can't use an indexer on a WPF ResourceDictionary * removing a tag for predefined * closing Rubyforge [#21943] NullRef exception thrown while comparing a list containing elements with overriden == * closing Rubyforge [#21995] kind_of? not working with when extend is used * recommiting some changes that were reverted by the merge. Methinks someone in TFS changed them. This makes describe work with 2 strings for shared behaviors, and it makes csc output #line pragmas * fixing some more errors from the merge * Adding class instantiation specs for regular classes with overloaded constructors * adding regression tests for [#22197] calling super throw Argument Error * adding StringBuilder specs to get rid of test_basic.rb. Also added equal_clr_string matcher * refactor specs to use the equal_clr_string matcher * basic string specs to remove test_basic.rb * added more string specs to get rid of test_basic. Also adds field specs * adding some basic event add and remove specs * added event invocation specs JD -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Apr 3 17:15:14 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 3 Apr 2009 14:15:14 -0700 Subject: [Ironruby-core] Status of rubygems unit tests In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E0D46769E@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E0D46769E@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EDED@NA-EXMSG-C104.redmond.corp.microsoft.com> Here are the latest results: 728 tests, 2021 assertions, 26 failures, 35 errors, 4 skips Latests results will be available at http://www.ironruby.net/Documentation/How_do_I_install_additional_gems%3f. The total number of tests increased because we moved from RubyGems version 0.9 something to the trunk of 1.3. Jirapong has been tagging with me to help push on this which has been very useful. The issues we have fixed include: * GzipWriter.finish should close the GzipWriter object but not the underlying IO object * File.chmod was a nop before * If a gem supports multiple platforms, the output is non-deterministic since the code iterates a Hash. The keys of a hash are not required to be in any order. Jirapong is going to submit a patch to RubyGems. * Jirapong is working on a fix where File.open(File::EXCL) should not keep the file locked. This could fix 8 errors. Thanks, Shri From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Monday, March 16, 2009 11:10 PM To: 'ironruby-core at rubyforge.org' Subject: [Ironruby-core] Status of rubygems unit tests I have been working on making the rubygem unit tests (from git://github.com/vvs/rubygems.git) pass with IronRuby. When I started, the results looked like this. 707 tests, 1170 assertions, 9 failures, 352 errors, 1 skips Half the tests (9+352/707) were failing (or half were passing depending on how you want to look at it). The main culprits were Zlib::GzipWriter, YAML.quick_emit and Zlib::Deflate. After fixing these issues, the results look like this: 707 tests, 1881 assertions, 40 failures, 53 errors, 4 skips It's a good improvement. Errors (where the tests cannot even run properly) account for 8% (53/707), and failures (functionality defects) can now show through - in 5% (40/707) of the tests, for a pass rate of 87%. The errors are because of the following exceptions in descending order of occurrence. The number at the start is the count of how often the error happened. 9: dump format error(9) 8: ERROR: Failed to build gem native extension. 5: dump format error(8) 5: marshal data too short 4: uninitialized constant OpenSSL::X509 2: uninitialized constant OpenSSL::PKey 2: trying to seek on a non-existent stream? 2: ERROR: Failed to build gem native extension. 2: SSL is not installed on this system 2: SocketError: An established connection was aborted by the software in your host machine I will keep pushing on the tests. The failures will be a bit more work to narrow down as some expectation fails, possibly much after a bug introduced a bad result in the system. If anyone wants to help dig into the failures, let me know, and I can help you get set up. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Fri Apr 3 15:04:12 2009 From: michael.letterle at gmail.com (Michael Letterle) Date: Fri, 3 Apr 2009 15:04:12 -0400 Subject: [Ironruby-core] FW: File.executable? always returns false on Windows machine In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608EC1B@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EC1B@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: On *nix systems it would return true if the executable bit is set and false if it's not. Windows doesn't really have a comparable attribute since files are "categorized" based on extension, hence .exe acting as a sort of "executable bit". On Fri, Apr 3, 2009 at 1:36 PM, Shri Borde wrote: > Anyone know what File.executable? is supposed to do? For me, it always > returns false. For Jim, Tomas and others, it always returns true no matter > what the file extension is. Any idea why we might be getting different > results? > > > > FWIW, the current IronRuby implementation returns true if the file > extension is ?.exe?. > > > > Thanks, > > Shri > > > > *From:* Shri Borde > *Sent:* Thursday, April 02, 2009 3:59 PM > *To:* ruby-core at ruby-lang.org > *Subject:* File.executable? always returns false on Windows machine > > > > On my machine, File.executable? is always returning false. I have tried > 1.8p27. I am running on a Windows Vista x86 machine. The file system is > NTFS. I can?t think of anything unusual about my machine. > > > > What are the semantic supposed to be? Most of the people I have asked get a > value of true for all of the statements below, even for the File.executable? > on the ttf file. > > > > puts File.exists?("C:/windows/fonts/wingding.ttf") > > puts File.readable?("C:/windows/fonts/wingding.ttf") > > puts File.executable?("C:/windows/fonts/wingding.ttf") # Prints false only > for me > > > > puts File.exists?("C:/windows/notepad.exe") > > puts File.readable?("C:/windows/notepad.exe") > > puts File.executable?("C:/windows/notepad.exe") # Prints false only for me > > > > With the 1.9 binaries, File.executable? returns true only if the file > extensions is something like .exe. Again, it always returns true for the > people I have asked. > > > > Thanks, > > Shri > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle IronRuby MVP http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Fri Apr 3 17:36:35 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 3 Apr 2009 21:36:35 +0000 Subject: [Ironruby-core] Status of rubygems unit tests In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608EDED@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E0D46769E@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E1608EDED@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Thanks for the update. I can add this to the runs of http://ironruby.info so we have up-to-date stats about RubyGems. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Friday, April 03, 2009 2:15 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Status of rubygems unit tests Here are the latest results: 728 tests, 2021 assertions, 26 failures, 35 errors, 4 skips Latests results will be available at http://www.ironruby.net/Documentation/How_do_I_install_additional_gems%3f. The total number of tests increased because we moved from RubyGems version 0.9 something to the trunk of 1.3. Jirapong has been tagging with me to help push on this which has been very useful. The issues we have fixed include: * GzipWriter.finish should close the GzipWriter object but not the underlying IO object * File.chmod was a nop before * If a gem supports multiple platforms, the output is non-deterministic since the code iterates a Hash. The keys of a hash are not required to be in any order. Jirapong is going to submit a patch to RubyGems. * Jirapong is working on a fix where File.open(File::EXCL) should not keep the file locked. This could fix 8 errors. Thanks, Shri From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Monday, March 16, 2009 11:10 PM To: 'ironruby-core at rubyforge.org' Subject: [Ironruby-core] Status of rubygems unit tests I have been working on making the rubygem unit tests (from git://github.com/vvs/rubygems.git) pass with IronRuby. When I started, the results looked like this. 707 tests, 1170 assertions, 9 failures, 352 errors, 1 skips Half the tests (9+352/707) were failing (or half were passing depending on how you want to look at it). The main culprits were Zlib::GzipWriter, YAML.quick_emit and Zlib::Deflate. After fixing these issues, the results look like this: 707 tests, 1881 assertions, 40 failures, 53 errors, 4 skips It's a good improvement. Errors (where the tests cannot even run properly) account for 8% (53/707), and failures (functionality defects) can now show through - in 5% (40/707) of the tests, for a pass rate of 87%. The errors are because of the following exceptions in descending order of occurrence. The number at the start is the count of how often the error happened. 9: dump format error(9) 8: ERROR: Failed to build gem native extension. 5: dump format error(8) 5: marshal data too short 4: uninitialized constant OpenSSL::X509 2: uninitialized constant OpenSSL::PKey 2: trying to seek on a non-existent stream? 2: ERROR: Failed to build gem native extension. 2: SSL is not installed on this system 2: SocketError: An established connection was aborted by the software in your host machine I will keep pushing on the tests. The failures will be a bit more work to narrow down as some expectation fails, possibly much after a bug introduced a bad result in the system. If anyone wants to help dig into the failures, let me know, and I can help you get set up. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Fri Apr 3 17:52:22 2009 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 3 Apr 2009 21:52:22 +0000 Subject: [Ironruby-core] FW: File.executable? always returns false on Windows machine In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E1608EC1B@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD09869A72@TK5EX14MBXC101.redmond.corp.microsoft.com> We should probably return true if the extension is in PATHEXT. This should return true for EXE,COM, CMD, BAT, PS1 (if you have Powershell). It would be nice if we could inspect whatever assoc touches, so that if I add an assoc and filetype for RB, it becomes executable. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Friday, April 03, 2009 12:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] FW: File.executable? always returns false on Windows machine On *nix systems it would return true if the executable bit is set and false if it's not. Windows doesn't really have a comparable attribute since files are "categorized" based on extension, hence .exe acting as a sort of "executable bit". On Fri, Apr 3, 2009 at 1:36 PM, Shri Borde > wrote: Anyone know what File.executable? is supposed to do? For me, it always returns false. For Jim, Tomas and others, it always returns true no matter what the file extension is. Any idea why we might be getting different results? FWIW, the current IronRuby implementation returns true if the file extension is ".exe". Thanks, Shri From: Shri Borde Sent: Thursday, April 02, 2009 3:59 PM To: ruby-core at ruby-lang.org Subject: File.executable? always returns false on Windows machine On my machine, File.executable? is always returning false. I have tried 1.8p27. I am running on a Windows Vista x86 machine. The file system is NTFS. I can't think of anything unusual about my machine. What are the semantic supposed to be? Most of the people I have asked get a value of true for all of the statements below, even for the File.executable? on the ttf file. puts File.exists?("C:/windows/fonts/wingding.ttf") puts File.readable?("C:/windows/fonts/wingding.ttf") puts File.executable?("C:/windows/fonts/wingding.ttf") # Prints false only for me puts File.exists?("C:/windows/notepad.exe") puts File.readable?("C:/windows/notepad.exe") puts File.executable?("C:/windows/notepad.exe") # Prints false only for me With the 1.9 binaries, File.executable? returns true only if the file extensions is something like .exe. Again, it always returns true for the people I have asked. Thanks, Shri _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Michael Letterle IronRuby MVP http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Apr 3 18:23:00 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 3 Apr 2009 15:23:00 -0700 Subject: [Ironruby-core] FW: File.executable? always returns false on Windows machine In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD09869A72@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EC1B@NA-EXMSG-C104.redmond.corp.microsoft.com> <0AB34E2BFBE88245B073D2D83B4245FD09869A72@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EE60@NA-EXMSG-C104.redmond.corp.microsoft.com> Yes, Windows does not have a comparable attribute. However, I can't figure out how MRI running on Windows implements this since I am getting a different behavior than what other folks are. IronRuby uses the ".exe" extension as a sort of "executable bit". Don't know what MRI on Windows does though. Like I said before, it always returns false for all file extensions for me. It always returns true for all file extensions for Jim, Tomas and others. We need to try to figure out what MRI does, why MRI might be behaving differently for me, and then use the same logic in IronRuby. Does MRI honor PATHEXT? Thanks, Shri From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Friday, April 03, 2009 2:52 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] FW: File.executable? always returns false on Windows machine We should probably return true if the extension is in PATHEXT. This should return true for EXE,COM, CMD, BAT, PS1 (if you have Powershell). It would be nice if we could inspect whatever assoc touches, so that if I add an assoc and filetype for RB, it becomes executable. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Friday, April 03, 2009 12:04 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] FW: File.executable? always returns false on Windows machine On *nix systems it would return true if the executable bit is set and false if it's not. Windows doesn't really have a comparable attribute since files are "categorized" based on extension, hence .exe acting as a sort of "executable bit". On Fri, Apr 3, 2009 at 1:36 PM, Shri Borde > wrote: Anyone know what File.executable? is supposed to do? For me, it always returns false. For Jim, Tomas and others, it always returns true no matter what the file extension is. Any idea why we might be getting different results? FWIW, the current IronRuby implementation returns true if the file extension is ".exe". Thanks, Shri From: Shri Borde Sent: Thursday, April 02, 2009 3:59 PM To: ruby-core at ruby-lang.org Subject: File.executable? always returns false on Windows machine On my machine, File.executable? is always returning false. I have tried 1.8p27. I am running on a Windows Vista x86 machine. The file system is NTFS. I can't think of anything unusual about my machine. What are the semantic supposed to be? Most of the people I have asked get a value of true for all of the statements below, even for the File.executable? on the ttf file. puts File.exists?("C:/windows/fonts/wingding.ttf") puts File.readable?("C:/windows/fonts/wingding.ttf") puts File.executable?("C:/windows/fonts/wingding.ttf") # Prints false only for me puts File.exists?("C:/windows/notepad.exe") puts File.readable?("C:/windows/notepad.exe") puts File.executable?("C:/windows/notepad.exe") # Prints false only for me With the 1.9 binaries, File.executable? returns true only if the file extensions is something like .exe. Again, it always returns true for the people I have asked. Thanks, Shri _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -- Michael Letterle IronRuby MVP http://blog.prokrams.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Fri Apr 3 18:20:49 2009 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 3 Apr 2009 22:20:49 +0000 Subject: [Ironruby-core] Code Review: gitpull3 Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD09869CD3@TK5EX14MBXC101.redmond.corp.microsoft.com> FYI Code review. tfpt review "/shelveset:gitpull3;REDMOND\jdeville" Comment : Pulls in Shri and Jim's changes from git: Jim: Some more changes. Mostly closing bugs and adding .NET interop tests. Commit range is 90392fff to a39daeae on git://github.com/jredville/ironruby.git. I rebased this time, so you should be able to just grab that range and see only my diffs. * closing Rubyforge 15060 * [#24589] $PROGRAM_NAME in 'English' not working now fixed * making $0 the same object as $PROGRAM_NAME and adding specs for it. Closes [#24589] $PROGRAM_NAME in 'English' not working * closing Rubyforge [#15061] tracking: create generic interface type * closing RubyForge [#15651] NoMethodError expected when calling the private method 'initialize' of a ruby class * added protected method invocation specs. Closes Rubyforge [#19118] Protected members not available when inheriting from CLR type * adding regression test for [#19872] IComparableOps.CompareTo throws argument error when type is Decimal * added reference support to csc.bat * closing [#17467] Accessing IronRuby method from C# * closing [#19950] Dir.glob doesn't handle ** * closing [#20027] Formatting float to string produces incorrectly &amp;amp;quot;Infinity&amp;amp;quot; * closing [#20043] creating a generic type when the type is an interface * closing [#20052] Calculating 3.0/2.0 produces NaN * closing Rubyforge [#20263] Dir.glob doesn't handle missing folders * closing [#20410] GetKCodeName * adding test to ensure that File.stat returns a File::Stat object * closing Rubyforge [#20640] Calling File.open with an integer (File descriptor overload) causes the File.open site to be unusable * closing Rubyforge [#20664] Respecting visibility of methods. Also fixes a compilation error due to multiple IInterface definitions * Closing RubyForge [#20665] Can't use an indexer on a WPF ResourceDictionary * removing a tag for predefined * closing Rubyforge [#21943] NullRef exception thrown while comparing a list containing elements with overriden == * closing Rubyforge [#21995] kind_of? not working with when extend is used * recommiting some changes that were reverted by the merge. Methinks someone in TFS changed them. This makes describe work with 2 strings for shared behaviors, and it makes csc output #line pragmas * fixing some more errors from the merge * Adding class instantiation specs for regular classes with overloaded constructors * adding regression tests for [#22197] calling super throw Argument Error * adding StringBuilder specs to get rid of test_basic.rb. Also added equal_clr_string matcher * refactor specs to use the equal_clr_string matcher * basic string specs to remove test_basic.rb * added more string specs to get rid of test_basic. Also adds field specs * adding some basic event add and remove specs * added event invocation specs JD Shri: YAML should allow spaces. eg the trailing \s\t in YAML.load("!timestamp '2009-03-22 00:00:00\s\t'") is allowed Changed igem.bat, irake.bat, etc to work in dev environment where ir.exe is not in the path File.expand_path("~") should throw ArgumentError is HOME is not set make orig_name, comment, and split close and finish compile error when pull form irmain, merge in zlib spec for finish, close, oriname, and trying to DRY orig_name and comment make orig_name, comment, close, and finish passed spec. Implements File.chmod File.readable? should return false if the given filename does not exist File.delete should be able to delete a read-only file. This is implemented by making the file writable first. This is the only solution I could find. Added debugger visualizer for RubyObject so that VS will display the result of to_s in the Watch window. Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so that the Legacy tests (Ruby\Scripts\test.bat) can pass without any failures. -------------- next part -------------- A non-text attachment was scrubbed... Name: gitpull3.diff Type: application/octet-stream Size: 95693 bytes Desc: gitpull3.diff URL: From Jimmy.Schementi at microsoft.com Fri Apr 3 18:30:36 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 3 Apr 2009 22:30:36 +0000 Subject: [Ironruby-core] Code Review: gitpull3 In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD09869CD3@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <0AB34E2BFBE88245B073D2D83B4245FD09869CD3@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: Hmmm, duplicate code reviews now, one for when they are in a git branch, and one for when we pull it into ironruby? > -----Original Message----- > From: Jim Deville > Sent: Friday, April 03, 2009 3:21 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: Code Review: gitpull3 > > FYI Code review. > > tfpt review "/shelveset:gitpull3;REDMOND\jdeville" > Comment : > Pulls in Shri and Jim's changes from git: > Jim: > Some more changes. Mostly closing bugs and adding .NET interop tests. > Commit range is 90392fff to a39daeae on > git://github.com/jredville/ironruby.git. I rebased this time, so you > should be able to just grab that range and see only my diffs. > > > * closing Rubyforge 15060 > * [#24589] $PROGRAM_NAME in 'English' not working now fixed > * making $0 the same object as $PROGRAM_NAME and adding specs for > it. Closes [#24589] $PROGRAM_NAME in 'English' not working > * closing Rubyforge [#15061] tracking: create generic interface > type > * closing RubyForge [#15651] NoMethodError expected when calling > the private method 'initialize' of a ruby class > * added protected method invocation specs. Closes Rubyforge > [#19118] Protected members not available when inheriting from CLR type > * adding regression test for [#19872] IComparableOps.CompareTo > throws argument error when type is Decimal > * added reference support to csc.bat > * closing [#17467] Accessing IronRuby method from C# > * closing [#19950] Dir.glob doesn't handle ** > * closing [#20027] Formatting float to string produces incorrectly > &amp;amp;quot;Infinity&amp;amp;quot; > * closing [#20043] creating a generic type when the type is an > interface > * closing [#20052] Calculating 3.0/2.0 produces NaN > * closing Rubyforge [#20263] Dir.glob doesn't handle missing > folders > * closing [#20410] GetKCodeName > * adding test to ensure that File.stat returns a File::Stat object > * closing Rubyforge [#20640] Calling File.open with an integer > (File descriptor overload) causes the File.open site to be unusable > * closing Rubyforge [#20664] Respecting visibility of methods. Also > fixes a compilation error due to multiple IInterface definitions > * Closing RubyForge [#20665] Can't use an indexer on a WPF > ResourceDictionary > * removing a tag for predefined > * closing Rubyforge [#21943] NullRef exception thrown while > comparing a list containing elements with overriden == > * closing Rubyforge [#21995] kind_of? not working with when extend > is used > * recommiting some changes that were reverted by the merge. > Methinks someone in TFS changed them. This makes describe work with 2 > strings for shared behaviors, and it makes csc output #line pragmas > * fixing some more errors from the merge > * Adding class instantiation specs for regular classes with > overloaded constructors > * adding regression tests for [#22197] calling super throw Argument > Error > * adding StringBuilder specs to get rid of test_basic.rb. Also > added equal_clr_string matcher > * refactor specs to use the equal_clr_string matcher > * basic string specs to remove test_basic.rb > * added more string specs to get rid of test_basic. Also adds field > specs > * adding some basic event add and remove specs > * added event invocation specs > > JD > > Shri: > YAML should allow spaces. eg the trailing \s\t in > YAML.load("!timestamp '2009-03-22 00:00:00\s\t'") is allowed > Changed igem.bat, irake.bat, etc to work in dev environment where > ir.exe is not in the path > File.expand_path("~") should throw ArgumentError is HOME is not set > > make orig_name, comment, and split close and finish > > compile error when pull form irmain, merge in zlib > > spec for finish, close, oriname, and trying to DRY orig_name and > comment > > make orig_name, comment, close, and finish passed spec. > > Implements File.chmod > File.readable? should return false if the given filename does not > exist > File.delete should be able to delete a read-only file. This is > implemented by making the file writable first. This is the only > solution I could find. > Added debugger visualizer for RubyObject so that VS will display the > result of to_s in the Watch window. > Adds the wrapper script Merlin\Main\Test\Scritps\ir.cmd so that the > Legacy tests (Ruby\Scripts\test.bat) can pass without any failures. > From mark.ryall at gmail.com Sat Apr 4 20:41:59 2009 From: mark.ryall at gmail.com (Mark Ryall) Date: Sun, 5 Apr 2009 10:41:59 +1000 Subject: [Ironruby-core] Requesting contributions to IronRuby In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <43769a4a0904041741m3746c82dk73d5024c0a801410@mail.gmail.com> I've been promising myself for quite a while that i'd like to get involved in the challenge of adding an implementation of mocking and stubbing for CLR objects to ironruby. It'd be really cool to have something equivalent to jtestr for .net development - mocks and stubs are one of the essential missing ingredients. I've worked on a number of java projects now where all of the tests were written in ruby (some MRI+selenium for acceptance tests but others jtestr for unit and integration tests) - it's a very gentle and sensible way to introduce of ruby to 'the enterprise'. That and using rake (on top of msbuild) for building .net applications which seems to be becoming increasingly popular (such as fluent nhibernate). Given the way interop works and how generally unfamilar I am with how the DLR works, perhaps it'd be diving into the deepest end first and I might drown but i'd be keen to at least do some remote pairing (skype, vnc, gobby, whatever - i'm in melbourne, australia) with anyone who's interested in trying to drive out some specific tasks. Mark. On Sat, Apr 4, 2009 at 6:44 AM, Shri Borde wrote: > We are getting closer to the V1 release of IronRuby which is planned for > summer this year. The implementation has become fairly complete and usable > in a lot of scenarios. > > > > Over the last few months, we have also improved our processes to make it > easier for the community to contribute to the project. This includes moving > the sources to GIT, pushing the sources to GIT daily from our internal repo, > adding shortcuts and scripts to make the dev environment easy to use, having > the Microsoft team work out of GIT, and finally adding information on > http://wiki.github.com/ironruby/ironruby/. Many folks are able to build and > run the tests easily. > > > > This opens up the opportunity for more of you to contribute to IronRuby and > help make the V1 release be more complete and solid. If you have ideas of > your own, go for it by all means. If you are looking for suggestions, I have > added a few ideas at http://wiki.github.com/ironruby/ironruby/contributing. > There are easy tasks like fixing RubySpec bugs and difficult tasks like > porting a C# sample. If you are interested in any of the tasks, let us know > and we will do our best to help you get started. > > > > Every little bit helps, so don?t worry if you are not sure how much time you > can commit, if you are not sure how hard the tasks will be, etc. I would > love to see more people signed up for tasks in the ?Who is working on what? > section. There are six names there right now. Can we get to a dozen? > > > > Thanks, > > Shri > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From thibaut.barrere at gmail.com Sun Apr 5 04:07:27 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Sun, 5 Apr 2009 10:07:27 +0200 Subject: [Ironruby-core] Requesting contributions to IronRuby In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0904050107y1fc023c8i623d88a42d391f45@mail.gmail.com> Hi Shri, I'm ready to start contributing (I signed the agreement and am now able to run the specs on my machine). I thought I'd focus on system/popen, but maybe there are simple things that have a higher priority ? cheers, -- Thibaut From Shri.Borde at microsoft.com Mon Apr 6 00:17:10 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sun, 5 Apr 2009 21:17:10 -0700 Subject: [Ironruby-core] Requesting contributions to IronRuby In-Reply-To: <43769a4a0904041741m3746c82dk73d5024c0a801410@mail.gmail.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> <43769a4a0904041741m3746c82dk73d5024c0a801410@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EFBF@NA-EXMSG-C104.redmond.corp.microsoft.com> For mocking static CLR interfaces and abstract types, there is not much the DLR can do. You need to create types on the fly which implement the CLR interface you want to mock. I believe that is what most of the popular mocking frameworks like NMock, Moq, RhinoMocks, etc do. You could take a look at using Test::Unit, RSpec, Bacon, etc for specifying the expectations, and NMock, Moq, RhinoMocks for mocking CLR interfaces. That seems to be what jtestr is doing. Would be cool to flush out the issues involved in using the type families of frameworks. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mark Ryall Sent: Saturday, April 04, 2009 5:42 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Requesting contributions to IronRuby I've been promising myself for quite a while that i'd like to get involved in the challenge of adding an implementation of mocking and stubbing for CLR objects to ironruby. It'd be really cool to have something equivalent to jtestr for .net development - mocks and stubs are one of the essential missing ingredients. I've worked on a number of java projects now where all of the tests were written in ruby (some MRI+selenium for acceptance tests but others jtestr for unit and integration tests) - it's a very gentle and sensible way to introduce of ruby to 'the enterprise'. That and using rake (on top of msbuild) for building .net applications which seems to be becoming increasingly popular (such as fluent nhibernate). Given the way interop works and how generally unfamilar I am with how the DLR works, perhaps it'd be diving into the deepest end first and I might drown but i'd be keen to at least do some remote pairing (skype, vnc, gobby, whatever - i'm in melbourne, australia) with anyone who's interested in trying to drive out some specific tasks. Mark. On Sat, Apr 4, 2009 at 6:44 AM, Shri Borde wrote: > We are getting closer to the V1 release of IronRuby which is planned for > summer this year. The implementation has become fairly complete and usable > in a lot of scenarios. > > > > Over the last few months, we have also improved our processes to make it > easier for the community to contribute to the project. This includes moving > the sources to GIT, pushing the sources to GIT daily from our internal repo, > adding shortcuts and scripts to make the dev environment easy to use, having > the Microsoft team work out of GIT, and finally adding information on > http://wiki.github.com/ironruby/ironruby/. Many folks are able to build and > run the tests easily. > > > > This opens up the opportunity for more of you to contribute to IronRuby and > help make the V1 release be more complete and solid. If you have ideas of > your own, go for it by all means. If you are looking for suggestions, I have > added a few ideas at http://wiki.github.com/ironruby/ironruby/contributing. > There are easy tasks like fixing RubySpec bugs and difficult tasks like > porting a C# sample. If you are interested in any of the tasks, let us know > and we will do our best to help you get started. > > > > Every little bit helps, so don't worry if you are not sure how much time you > can commit, if you are not sure how hard the tasks will be, etc. I would > love to see more people signed up for tasks in the "Who is working on what" > section. There are six names there right now. Can we get to a dozen? > > > > Thanks, > > Shri > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Shri.Borde at microsoft.com Mon Apr 6 00:26:37 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sun, 5 Apr 2009 21:26:37 -0700 Subject: [Ironruby-core] Requesting contributions to IronRuby In-Reply-To: <4a68b8cf0904050107y1fc023c8i623d88a42d391f45@mail.gmail.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> <4a68b8cf0904050107y1fc023c8i623d88a42d391f45@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1608EFC0@NA-EXMSG-C104.redmond.corp.microsoft.com> Fixing the tags for IO.popen sounds fine. Once you get a few changes in, it will be more useful to focus on bugs affecting specific real-world apps since that enables real, useful scenarios. However, starting off fixing RubySpec tags is good too as a ramp-up activity since the problems are narrowed down, and you don't have to debug some large app or framework. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Sunday, April 05, 2009 1:07 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Requesting contributions to IronRuby Hi Shri, I'm ready to start contributing (I signed the agreement and am now able to run the specs on my machine). I thought I'd focus on system/popen, but maybe there are simple things that have a higher priority ? cheers, -- Thibaut _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Mon Apr 6 00:54:03 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 6 Apr 2009 04:54:03 +0000 Subject: [Ironruby-core] Requesting contributions to IronRuby In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608EFBF@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1608EDAD@NA-EXMSG-C104.redmond.corp.microsoft.com> <43769a4a0904041741m3746c82dk73d5024c0a801410@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E1608EFBF@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Mark and I have spoke about this before, and really what we need is to pick a .NET mocking framework and write a RSpec/Mocha-like wrapper around it, as the APIs provided by Moq, NMock, etc need some rubification. As Shri said, the DLR-itself won't help with this. Mark, does this make sense? ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shri Borde > Sent: Sunday, April 05, 2009 9:17 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Requesting contributions to IronRuby > > For mocking static CLR interfaces and abstract types, there is not much > the DLR can do. You need to create types on the fly which implement the > CLR interface you want to mock. I believe that is what most of the > popular mocking frameworks like NMock, Moq, RhinoMocks, etc do. > > You could take a look at using Test::Unit, RSpec, Bacon, etc for > specifying the expectations, and NMock, Moq, RhinoMocks for mocking CLR > interfaces. That seems to be what jtestr is doing. Would be cool to > flush out the issues involved in using the type families of frameworks. > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mark Ryall > Sent: Saturday, April 04, 2009 5:42 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Requesting contributions to IronRuby > > I've been promising myself for quite a while that i'd like to get > involved in the challenge of adding an implementation of mocking and > stubbing for CLR objects to ironruby. > > It'd be really cool to have something equivalent to jtestr for .net > development - mocks and stubs are one of the essential missing > ingredients. I've worked on a number of java projects now where all > of the tests were written in ruby (some MRI+selenium for acceptance > tests but others jtestr for unit and integration tests) - it's a very > gentle and sensible way to introduce of ruby to 'the enterprise'. That > and using rake (on top of msbuild) for building .net applications > which seems to be becoming increasingly popular (such as fluent > nhibernate). > > Given the way interop works and how generally unfamilar I am with how > the DLR works, perhaps it'd be diving into the deepest end first and I > might drown but i'd be keen to at least do some remote pairing (skype, > vnc, gobby, whatever - i'm in melbourne, australia) with anyone who's > interested in trying to drive out some specific tasks. > > Mark. > > On Sat, Apr 4, 2009 at 6:44 AM, Shri Borde > wrote: > > We are getting closer to the V1 release of IronRuby which is planned > for > > summer this year. The implementation has become fairly complete and > usable > > in a lot of scenarios. > > > > > > > > Over the last few months, we have also improved our processes to make > it > > easier for the community to contribute to the project. This includes > moving > > the sources to GIT, pushing the sources to GIT daily from our > internal repo, > > adding shortcuts and scripts to make the dev environment easy to use, > having > > the Microsoft team work out of GIT, and finally adding information on > > http://wiki.github.com/ironruby/ironruby/. Many folks are able to > build and > > run the tests easily. > > > > > > > > This opens up the opportunity for more of you to contribute to > IronRuby and > > help make the V1 release be more complete and solid. If you have > ideas of > > your own, go for it by all means. If you are looking for suggestions, > I have > > added a few ideas at > http://wiki.github.com/ironruby/ironruby/contributing. > > There are easy tasks like fixing RubySpec bugs and difficult tasks > like > > porting a C# sample. If you are interested in any of the tasks, let > us know > > and we will do our best to help you get started. > > > > > > > > Every little bit helps, so don't worry if you are not sure how much > time you > > can commit, if you are not sure how hard the tasks will be, etc. I > would > > love to see more people signed up for tasks in the "Who is working on > what" > > section. There are six names there right now. Can we get to a dozen? > > > > > > > > Thanks, > > > > Shri > > > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From xerxes at bigpond.net.au Mon Apr 6 04:38:41 2009 From: xerxes at bigpond.net.au (Xerxes Battiwalla) Date: Mon, 6 Apr 2009 18:38:41 +1000 Subject: [Ironruby-core] MSpec fails to load dll Message-ID: howdy all, i'm new to ruby and ironruby, and trying to get a simple mspec sample working on my machine. i'm using the 0.3 drop of IR. When i'm running IronRuby for anything OTHER than mspec, it works perfectly fine. The WPF samples, the message box sample - they all work great. In order to play with mspec, i've written a c# dll which returns a string (HelloWorld::HelloClass.SayHello()) and two ruby files to test it out. 1) The first file is a ruby script which requires the DLL and does a puts on the say_hello method. This works, no problem. (eg: ir sayhello.rb) 2) The second file is an mspec script which requires the DLL, requires mspec and has once specification which calls the say_hello method. To run the spec, i've created a batch file which calls ir.exe with the path to c:\ruby\bin\mspec (like the icucumber example). when i run this however, it fails miserably: ---------------- c:\source\ruby\hellodotnet>imspec sayhello_spec.rb ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] 1) An exception occurred during: loading c:/source/ruby/hellodotnet/sayhello_spec.rb ERROR LoadError: 127: The specified procedure could not be found. - Init_HelloWorld ./HelloWorld.dll ./HelloWorld.dll c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' c:/source/ruby/hellodotnet/sayhello_spec.rb:2 Finished in 0.111000 seconds 1 file, 0 examples, 0 expectations, 0 failures, 1 error ----- Not certain, but i suspect that this might have something to do with the fact that it's executing the custom_require.rb file from c:\ruby and not c:\ironruby. The first line from the execution shows it's using ruby 1.8.6. If this indeed the case, what should I do to fix it? i've tried setting the GEM_PATH to various paths with no success. Happy to provide more info if rqd. thanks, Xerx. From jdeville at microsoft.com Mon Apr 6 12:14:18 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 6 Apr 2009 16:14:18 +0000 Subject: [Ironruby-core] MSpec fails to load dll In-Reply-To: References: Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD0987217B@TK5EX14MBXC101.redmond.corp.microsoft.com> MSpec is a special runner geared towards running implementation tests. It's kind of nice right now because it's more light weight than RSpec, so IronRuby can run it reasonably. One of the things this runner has is the ability to start up the runner with one implementation, then have that implementation call a second implementation to run the actual specs. So you can run mspec with MRI, and pass it an option which will tell it to run the specs with IronRuby. This feature appears to be biting you here. You are running with IronRuby, but because you aren't passing that option, it is running your specs with MRI. One option is to pass "-t c:\path\to\ir.exe", the other is to have your wrapper run mspec-run or mspec-ci directly (as opposed to the mspec script). Give that a try and let me know if you have any more questions. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla > Sent: Monday, April 06, 2009 1:39 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] MSpec fails to load dll > > howdy all, > > i'm new to ruby and ironruby, and trying to get a simple mspec sample > working on my machine. i'm using the 0.3 drop of IR. > > When i'm running IronRuby for anything OTHER than mspec, it works > perfectly fine. The WPF samples, the message box sample - they all > work great. > > In order to play with mspec, i've written a c# dll which returns a > string (HelloWorld::HelloClass.SayHello()) and two ruby files to test > it out. > 1) The first file is a ruby script which requires the DLL and does a > puts on the say_hello method. This works, no problem. (eg: ir > sayhello.rb) > > 2) The second file is an mspec script which requires the DLL, requires > mspec and has once specification which calls the say_hello method. To > run the spec, i've created a batch file which calls ir.exe with the > path to c:\ruby\bin\mspec (like the icucumber example). when i run > this however, it fails miserably: > > ---------------- > c:\source\ruby\hellodotnet>imspec sayhello_spec.rb > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > > 1) An exception occurred during: loading > c:/source/ruby/hellodotnet/sayhello_spec.rb ERROR > LoadError: 127: The specified procedure could not be found. - > Init_HelloWorld > ./HelloWorld.dll > ./HelloWorld.dll > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' > c:/source/ruby/hellodotnet/sayhello_spec.rb:2 > > Finished in 0.111000 seconds > > 1 file, 0 examples, 0 expectations, 0 failures, 1 error > > ----- > > Not certain, but i suspect that this might have something to do with > the fact that it's executing the custom_require.rb file from c:\ruby > and not c:\ironruby. The first line from the execution shows it's > using ruby 1.8.6. If this indeed the case, what should I do to fix it? > i've tried setting the GEM_PATH to various paths with no success. > > Happy to provide more info if rqd. > > thanks, > Xerx. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From antti.karanta at napa.fi Tue Apr 7 08:24:57 2009 From: antti.karanta at napa.fi (Antti Karanta) Date: Tue, 07 Apr 2009 15:24:57 +0300 Subject: [Ironruby-core] Problem checking out iron ruby source Message-ID: Hi! I tried to check out iron ruby sources following the instructions in http://www.ironruby.net/Download but bumped into problems: nak at NW32 /cygdrive/c/programs/dotnet/ironruby $ git clone git://github.com/ironruby/ironruby.git Initialized empty Git repository in /cygdrive/c/programs/dotnet/ironruby/ironruby/.git/ remote: Counting objects: 23971, done. remote: Compressing objects: 100% (14767/14767), done. remote: Total 23971 (delta 7698), reused 23764 (delta 7544) Receiving objects: 100% (23971/23971), 33.40 MiB | 242 KiB/s, done. Resolving deltas: 100% (7698/7698), done. error: refs/tags/v0.3.0 does not point to a valid object! error: refs/remotes/origin/master does not point to a valid object! error: Trying to write ref refs/heads/master with nonexistant object 6682b6d658ef11ff52293 b238c681398cc0198f9 fatal: Cannot update the ref 'HEAD'. nak at NW32 /cygdrive/c/programs/dotnet/ironruby $ uname -a CYGWIN_NT-5.1 NW32 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin nak at NW32 /cygdrive/c/programs/dotnet/ironruby $ git --version git version 1.6.1.2 I'm a complete git newbie so I have no idea what's wrong. Any ideas? ::Antti:: From ivan at flanders.co.nz Tue Apr 7 13:03:30 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 7 Apr 2009 19:03:30 +0200 Subject: [Ironruby-core] is this a bug? Message-ID: Hi Given the following (contrived) code: namespace PersonLibrary { public class Person { public int Id { get; set; } public string Name { get; set; } } public class Friend { public Friend(Person person) { Person = person; } public Person Person { get; private set; } } } Wouldn't you expect the following the code to output JoeSchmoe: load_assembly 'PersonLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' class MyFriend < PersonLibrary::Friend def initialize(pers) super @pers = pers end def pers @pers end end person = PersonLibrary::Person.new person.name = "JoeSchmoe" person.id = 1 my_friend = MyFriend.new person puts my_friend.pers.name But instead it gives me: test.rb:0: allocator undefined for MyFriend (TypeError) This happens when I call new on the class Should I file a bug for 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Apr 7 13:23:55 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 7 Apr 2009 17:23:55 +0000 Subject: [Ironruby-core] is this a bug? In-Reply-To: References: Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD0987DCD5@TK5EX14MBXC101.redmond.corp.microsoft.com> Looks like a bug. Please file one against Tomas on Rubyforge. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, April 07, 2009 10:03 AM To: ironruby-core Subject: [Ironruby-core] is this a bug? Hi Given the following (contrived) code: namespace PersonLibrary { public class Person { public int Id { get; set; } public string Name { get; set; } } public class Friend { public Friend(Person person) { Person = person; } public Person Person { get; private set; } } } Wouldn't you expect the following the code to output JoeSchmoe: load_assembly 'PersonLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' class MyFriend < PersonLibrary::Friend def initialize(pers) super @pers = pers end def pers @pers end end person = PersonLibrary::Person.new person.name = "JoeSchmoe" person.id = 1 my_friend = MyFriend.new person puts my_friend.pers.name But instead it gives me: test.rb:0: allocator undefined for MyFriend (TypeError) This happens when I call new on the class Should I file a bug for 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Apr 7 14:06:23 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 7 Apr 2009 20:06:23 +0200 Subject: [Ironruby-core] Linq syntax? Message-ID: Hi What would be the syntax to call Linq methods? for example: I have an IQueryable and I want to get the equivalent out of from user in MyRepository.Users where user.name == "somename" That of course is only one example, I want to do a lot more :) My best guess is that I would have to do something like this only it doesn't work System::Linq::Queryable.where(MyRepository.Users, lambda { |user| user.name== "somename" }) yields wrong number of arguments (2 for 2147483647) So what is the correct way? --- 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Tue Apr 7 14:35:54 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 7 Apr 2009 11:35:54 -0700 Subject: [Ironruby-core] Case of drive letter Message-ID: <710DF26F214D2B4BB94287123FFE980A2E16209FC9@NA-EXMSG-C104.redmond.corp.microsoft.com> Using MRI on Windows, Dir.pwd can use either lower-case or upper-case for the drive letter ("C:/" or "c:/") depending on the Command Prompt it is run from. However, __FILE__ always uses lower-case drive letter. This can cause problems when comparing Dir.pwd and __FILE__. For eg, Pathname#relative_path_from raises an ArgumentError if the arguments use different cases for the drive letter. C:\Users\sborde> cat c:\bugs\rb1.rb require 'pathname' Pathname.new(Dir.pwd).relative_path_from(Pathname.new(__FILE__)) C:\Users\sborde> c:\Ruby\bin\ruby.exe c:\bugs\rb1.rb c:/Ruby/lib/ruby/1.8/pathname.rb:709:in `relative_path_from': different prefix: "C:/" and "c:/bugs/rb1.rb" (ArgumentError) from c:/bugs/rb1.rb:2 I did not find any good documentation on which case is used by Command Prompt, but https://lists.ubuntu.com/archives/bazaar/2006q2/013921.html refers to the issue. I can create Command Prompts with either case by creating a shortcut on the desktop, and specifying a "Start in" folder property for the shortcut. Command Prompt will use the case specified for the "Start in" folder. Does anyone have experience dealing with this issue? What is the recommended solution? I would rather not check the case of the drive letter manually. I looked for APIs which would convert the drive letter to lower-case, but could not find anything. Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Tue Apr 7 14:45:21 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 7 Apr 2009 11:45:21 -0700 Subject: [Ironruby-core] Problem checking out iron ruby source In-Reply-To: References: Message-ID: <710DF26F214D2B4BB94287123FFE980A2E16209FE0@NA-EXMSG-C104.redmond.corp.microsoft.com> No idea. Can you clone any other GIT repo? Did you Google for it? Btw, I found that the GIT tutorial at http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html is very helpful for ramping up on GIT concepts. Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Antti Karanta Sent: Tuesday, April 07, 2009 5:25 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Problem checking out iron ruby source Hi! I tried to check out iron ruby sources following the instructions in http://www.ironruby.net/Download but bumped into problems: nak at NW32 /cygdrive/c/programs/dotnet/ironruby $ git clone git://github.com/ironruby/ironruby.git Initialized empty Git repository in /cygdrive/c/programs/dotnet/ironruby/ironruby/.git/ remote: Counting objects: 23971, done. remote: Compressing objects: 100% (14767/14767), done. remote: Total 23971 (delta 7698), reused 23764 (delta 7544) Receiving objects: 100% (23971/23971), 33.40 MiB | 242 KiB/s, done. Resolving deltas: 100% (7698/7698), done. error: refs/tags/v0.3.0 does not point to a valid object! error: refs/remotes/origin/master does not point to a valid object! error: Trying to write ref refs/heads/master with nonexistant object 6682b6d658ef11ff52293 b238c681398cc0198f9 fatal: Cannot update the ref 'HEAD'. nak at NW32 /cygdrive/c/programs/dotnet/ironruby $ uname -a CYGWIN_NT-5.1 NW32 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin nak at NW32 /cygdrive/c/programs/dotnet/ironruby $ git --version git version 1.6.1.2 I'm a complete git newbie so I have no idea what's wrong. Any ideas? ::Antti:: _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Apr 7 14:47:19 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 7 Apr 2009 11:47:19 -0700 Subject: [Ironruby-core] Code Review: NewMethodBinder Message-ID: Tfpt review /shelveset:NewMethodBinder;tomat Affects outer DLR, Python, Ruby. DLR, Python Redesigns the default method binder: - Merges ParameterBinder into MethodBinder, moves virtual methods related to CLR method binding and parameter conversions from ActionBinder and DefaultBinder to MethodBinder. - MethodBinder is now an abstract class that provides virtuals that languages can override. DefaultMethodBinder provides simple implementation that languages can base their binders on or directly use. - Enables "partially restricted splatting" feature (only implemented in Ruby so far, but should be relatively easy to generalize it and use it by default): - Previous implementation required languages to pass the binder an array of meta-objects including all items of the splatted array. This is not feasible for splatting arrays containing thousands of items (StackOverflow exception occurred in a Ruby library due to an expression of depth greater than 5k constructed as a rule condition). The new implementation allows the binder to only construct such conditions and restrictions that are necessary to decide which overload to select. In the worse case, which occurs e.g. when the overload set is { foo(params int[]), foo(params object[]) } and the call-site is foo(*([1]*10000 + ['x'])) , the condition that decides whether an overload/rule is applicable is implemented using a loop rather than disjunction of 10001 type equality expressions. Usually, the overload could be selected by splatting the array partially, using few items of the array from beginning and/or end of the array. More optimizations to the partial splatting are certainly possible - those should be easy to implement on top of the new method binder architecture if needed. - MethodBinder builds its state in several steps (see ResolveOverload method): 1) TargetSets and MethodCadnidates are built - MethodCandidate represents a CLR method overload tailored to a fixed arity (a follow-up refactoring will merge MethodTarget into MethodCandidate, they map 1:1). TargetSet represents a set of MethodCandidates (CanidateSet would be a better name - will rename in a follow-up change) that match the same arity. Building MethodCandidates involve creating ParameterWrappers and ArgBuilders. This process can be customized by languages. Languages can define their own wrappers and builders, their own dictionary and array splatting mechanisms. 2) The ActualArguments class is created (this is also customizable by languages). ActualArguments instance holds on meta-objects of positional and named arguments, actual argument names, and various indices needed for splatting. 3) TargetSet with arity corresponding to the number of actual arguments is created. If the binder implements partial splatting, the array is splatted to match arities of existing target sets but no more. The rest of the arguments (those that were not extracted from the array) are referred to as "collapsed" and are dealt with separately during overload resolution. The previous implementation of "MakeBindingTarget" is replaced by a new one, which fixes issues with named arguments and also takes collapsed arguments into consideration. It has several steps: a. Match actual names of the arguments with parameter names, calculate permutations that map indices of the former to the latter, and filter out MethodCandidates whose parameter names don't match. The result of this step is a set of ApplicableCandidates, each ApplicableCandidate comprises of a MethodCandidate and a ArgumentBinding permutation. b. Then for each narrowing level: Non-collapsed arguments are tested for convertibility to the parameter types of the applicable overloads. Those overloads that don't match are removed from applicable candidates set. If no overloads remain, it's an error. If a single overload remains we successfully chosen the overload (note that collapsed arguments don't need to be visited in this case). Otherwise we check whether collapsed arguments can all be converted to the element type of the corresponding params-array. Again, if no candidate remains, we failed. If a single one remains we succeeded. Otherwise we continue by comparing various conversions and selecting the best ones based on the current narrowing level. - During these steps the MethodBinder builds its state (candidate sets, actual arguments, etc.) and derived method binders can also remember some additional data/state that is used for building arguments or error reporting (temporary variable that stores the splattee, restrictions/conditions used for splatting, the signature of the call-site, etc.). The MethodBinder should be instantiated with all information that doesn't change during overload resolution (the "input" to the overload resolution). - Renames ParameterBinderWithCodeContext to PythonMethodBinder and moves it to Python. - Moves SiteLocalStorage to Python. Ruby uses a different storage class and it's very simple for languages to define and use their own. - ActionBinder.BindSpecialParameter shouldn't deal with CodeContext and SiteLocalStorage - moved to PythonMethodBinder. - Moved ContextArgBuilder and SiteLocalStorageArgbuilder to Python. - ArgBuilder.CanGenerateDelegate needs to be protected so that custom ArgBuilders can override it. - Improves errors reported by the method binder. - Removes old call, invoke and operation actions and related code. Ruby: - Replaces calls to obsolete methods of default method binder with those using meta-objects. - Implements partially restricted splatting. Fixes http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=18379. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NewMethodBinder.diff Type: application/octet-stream Size: 195886 bytes Desc: NewMethodBinder.diff URL: From Tomas.Matousek at microsoft.com Tue Apr 7 14:50:12 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 7 Apr 2009 11:50:12 -0700 Subject: [Ironruby-core] Linq syntax? In-Reply-To: References: Message-ID: Method of Queryable take expression trees. Ruby lambdas are not convertible to expression trees. You need to build the expression tree yourself. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, April 07, 2009 11:06 AM To: ironruby-core Subject: [Ironruby-core] Linq syntax? Hi What would be the syntax to call Linq methods? for example: I have an IQueryable and I want to get the equivalent out of from user in MyRepository.Users where user.name == "somename" That of course is only one example, I want to do a lot more :) My best guess is that I would have to do something like this only it doesn't work System::Linq::Queryable.where(MyRepository.Users, lambda { |user| user.name == "somename" }) yields wrong number of arguments (2 for 2147483647) So what is the correct way? --- 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.dobrev at gmail.com Tue Apr 7 15:33:48 2009 From: stefan.dobrev at gmail.com (Stefan Dobrev) Date: Tue, 7 Apr 2009 22:33:48 +0300 Subject: [Ironruby-core] Linq syntax? In-Reply-To: References: Message-ID: <928de89c0904071233w3519c51btbf689b6793fe5f83@mail.gmail.com> I was just going to post about this. Currently it is not possible to call the extension methods in System::Linq::Enumerable and System::Linq::Queryable. >>> require 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' => true >>> include System::Linq => Object >>> Queryable => System::Linq::Queryable >>> Queryable.where :0:in `CallSite.Target': wrong number of arguments (1 for 2147483647) (ArgumentError) ... 2009/4/7 Tomas Matousek > Method of Queryable take expression trees. Ruby lambdas are not > convertible to expression trees. > > You need to build the expression tree yourself. > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Tuesday, April 07, 2009 11:06 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] Linq syntax? > > > > Hi > > > > What would be the syntax to call Linq methods? > > > > for example: > > I have an IQueryable and I want to get the equivalent out of > > > > from user in MyRepository.Users > > where user.name == "somename" > > > > That of course is only one example, I want to do a lot more :) > > > > My best guess is that I would have to do something like this only it > doesn't work > > > > System::Linq::Queryable.where(MyRepository.Users, lambda { |user| > user.name == "somename" }) > > > > yields wrong number of arguments (2 for 2147483647) > > > > So what is the correct way? > > --- > 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 at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Tue Apr 7 16:08:57 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 7 Apr 2009 13:08:57 -0700 Subject: [Ironruby-core] Review: GzipWriter.open Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1620A091@NA-EXMSG-C104.redmond.corp.microsoft.com> http://github.com/shri/ironruby/commit/fb6f89146e331a9f20f444d5ca94478dfce7f555 GitDiff.bat 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 fb6f89146e331a9f20f444d5ca94478dfce7f555 * Implemented Zlib::GzipWriter.open * Added Kernel.abort * Mapped Errno::EACCES to System.UnauthorizedAccessException * File.delete catches IOException and rethrows Errno::EACCES to match MRI * Adds Errno::EXDEV * Updated rbconfig.rb to work with the dev environment. Change RbConfig[:ruby_install_name] to "ir". Note that it is not "ironruby" because RubyGems uses this to spawn new processes for running setup scripts, and so it needs to match the executable name (ir.exe). * Added Languages\Ruby\Tests\Interop\uncategorized_spec.rb as a place for devs to add CLR tests. Jim can later move them into the right place in CLR interop test suite. Files modified: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/open_tags.txt * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/kernel/abort_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/open_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipwriter/open_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Libs/rbconfig.rb * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Apr 7 16:24:35 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 7 Apr 2009 20:24:35 +0000 Subject: [Ironruby-core] Review: GzipWriter.open In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1620A091@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1620A091@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD0988016C@TK5EX14MBXC101.redmond.corp.microsoft.com> + it "raises TypeError unless the arguments are exactly a String, Fixnum and Fixnum" do + filename = mock("filename") + filename.should_not_receive(:to_s) + lambda { Zlib::GzipWriter.open(filename) }.should raise_error(TypeError) + + level = mock("level") + level.should_not_receive(:to_int) + lambda { Zlib::GzipWriter.open(@filename, level) }.should raise_error(TypeError) + + strategy = mock("strategy") + strategy.should_not_receive(:to_int) + lambda { Zlib::GzipWriter.open(@filename, 0, strategy) }.should raise_error(TypeError) + end I would check to_i, not to_int in this case. Other than this and the extra file, test looks good. JD From: Shri Borde Sent: Tuesday, April 07, 2009 1:09 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: GzipWriter.open http://github.com/shri/ironruby/commit/fb6f89146e331a9f20f444d5ca94478dfce7f555 GitDiff.bat 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 fb6f89146e331a9f20f444d5ca94478dfce7f555 * Implemented Zlib::GzipWriter.open * Added Kernel.abort * Mapped Errno::EACCES to System.UnauthorizedAccessException * File.delete catches IOException and rethrows Errno::EACCES to match MRI * Adds Errno::EXDEV * Updated rbconfig.rb to work with the dev environment. Change RbConfig[:ruby_install_name] to "ir". Note that it is not "ironruby" because RubyGems uses this to spawn new processes for running setup scripts, and so it needs to match the executable name (ir.exe). * Added Languages\Ruby\Tests\Interop\uncategorized_spec.rb as a place for devs to add CLR tests. Jim can later move them into the right place in CLR interop test suite. Files modified: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/open_tags.txt * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/kernel/abort_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/open_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipwriter/open_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Libs/rbconfig.rb * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Tue Apr 7 16:33:33 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 7 Apr 2009 13:33:33 -0700 Subject: [Ironruby-core] Review: GzipWriter.open In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1620A091@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1620A091@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Looks good. Tomas From: Shri Borde Sent: Tuesday, April 07, 2009 1:09 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: GzipWriter.open http://github.com/shri/ironruby/commit/fb6f89146e331a9f20f444d5ca94478dfce7f555 GitDiff.bat 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 fb6f89146e331a9f20f444d5ca94478dfce7f555 * Implemented Zlib::GzipWriter.open * Added Kernel.abort * Mapped Errno::EACCES to System.UnauthorizedAccessException * File.delete catches IOException and rethrows Errno::EACCES to match MRI * Adds Errno::EXDEV * Updated rbconfig.rb to work with the dev environment. Change RbConfig[:ruby_install_name] to "ir". Note that it is not "ironruby" because RubyGems uses this to spawn new processes for running setup scripts, and so it needs to match the executable name (ir.exe). * Added Languages\Ruby\Tests\Interop\uncategorized_spec.rb as a place for devs to add CLR tests. Jim can later move them into the right place in CLR interop test suite. Files modified: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/open_tags.txt * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/kernel/abort_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/open_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipwriter/open_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Libs/rbconfig.rb * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Tue Apr 7 16:47:13 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 7 Apr 2009 13:47:13 -0700 Subject: [Ironruby-core] Review: GzipWriter.open In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD0988016C@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1620A091@NA-EXMSG-C104.redmond.corp.microsoft.com> <0AB34E2BFBE88245B073D2D83B4245FD0988016C@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1620A0F0@NA-EXMSG-C104.redmond.corp.microsoft.com> The following Ruby code prints "to_int". So checking for to_int seems to be correct, right? class C def to_int puts "to_int" 0 end def to_i puts "to_i" 0 end end [].at(C.new) Thanks, Shri From: Jim Deville Sent: Tuesday, April 07, 2009 1:25 PM To: Shri Borde; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Review: GzipWriter.open + it "raises TypeError unless the arguments are exactly a String, Fixnum and Fixnum" do + filename = mock("filename") + filename.should_not_receive(:to_s) + lambda { Zlib::GzipWriter.open(filename) }.should raise_error(TypeError) + + level = mock("level") + level.should_not_receive(:to_int) + lambda { Zlib::GzipWriter.open(@filename, level) }.should raise_error(TypeError) + + strategy = mock("strategy") + strategy.should_not_receive(:to_int) + lambda { Zlib::GzipWriter.open(@filename, 0, strategy) }.should raise_error(TypeError) + end I would check to_i, not to_int in this case. Other than this and the extra file, test looks good. JD From: Shri Borde Sent: Tuesday, April 07, 2009 1:09 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: GzipWriter.open http://github.com/shri/ironruby/commit/fb6f89146e331a9f20f444d5ca94478dfce7f555 GitDiff.bat 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 fb6f89146e331a9f20f444d5ca94478dfce7f555 * Implemented Zlib::GzipWriter.open * Added Kernel.abort * Mapped Errno::EACCES to System.UnauthorizedAccessException * File.delete catches IOException and rethrows Errno::EACCES to match MRI * Adds Errno::EXDEV * Updated rbconfig.rb to work with the dev environment. Change RbConfig[:ruby_install_name] to "ir". Note that it is not "ironruby" because RubyGems uses this to spawn new processes for running setup scripts, and so it needs to match the executable name (ir.exe). * Added Languages\Ruby\Tests\Interop\uncategorized_spec.rb as a place for devs to add CLR tests. Jim can later move them into the right place in CLR interop test suite. Files modified: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/open_tags.txt * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/kernel/abort_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/open_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipwriter/open_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Libs/rbconfig.rb * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Tue Apr 7 17:01:37 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 7 Apr 2009 21:01:37 +0000 Subject: [Ironruby-core] Review: GzipWriter.open Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD09880469@TK5EX14MBXC101.redmond.corp.microsoft.com> My bad. These look fine as is then. jD -----Original Message----- From: Shri Borde Sent: April 07, 2009 1:47 PM To: Jim Deville ; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Review: GzipWriter.open The following Ruby code prints ?to_int?. So checking for to_int seems to be correct, right? class C def to_int puts "to_int" 0 end def to_i puts "to_i" 0 end end [].at(C.new) Thanks, Shri From: Jim Deville Sent: Tuesday, April 07, 2009 1:25 PM To: Shri Borde; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Review: GzipWriter.open + it "raises TypeError unless the arguments are exactly a String, Fixnum and Fixnum" do + filename = mock("filename") + filename.should_not_receive(:to_s) + lambda { Zlib::GzipWriter.open(filename) }.should raise_error(TypeError) + + level = mock("level") + level.should_not_receive(:to_int) + lambda { Zlib::GzipWriter.open(@filename, level) }.should raise_error(TypeError) + + strategy = mock("strategy") + strategy.should_not_receive(:to_int) + lambda { Zlib::GzipWriter.open(@filename, 0, strategy) }.should raise_error(TypeError) + end I would check to_i, not to_int in this case. Other than this and the extra file, test looks good. JD From: Shri Borde Sent: Tuesday, April 07, 2009 1:09 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: GzipWriter.open http://github.com/shri/ironruby/commit/fb6f89146e331a9f20f444d5ca94478dfce7f555 GitDiff.bat 9fc3048beb4a315ec7ac3dc82908da8f92bf1a07 fb6f89146e331a9f20f444d5ca94478dfce7f555 ? Implemented Zlib::GzipWriter.open ? Added Kernel.abort ? Mapped Errno::EACCES to System.UnauthorizedAccessException ? File.delete catches IOException and rethrows Errno::EACCES to match MRI ? Adds Errno::EXDEV ? Updated rbconfig.rb to work with the dev environment. Change RbConfig[:ruby_install_name] to "ir". Note that it is not "ironruby" because RubyGems uses this to spawn new processes for running setup scripts, and so it needs to match the executable name (ir.exe). ? Added Languages\Ruby\Tests\Interop\uncategorized_spec.rb as a place for devs to add CLR tests. Jim can later move them into the right place in CLR interop test suite. Files modified: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/file/open_tags.txt * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/kernel/abort_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/open_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/library/zlib/gzipwriter/open_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Zlib/zlib.cs * Merlin/Main/Languages/Ruby/Libs/rbconfig.rb * Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyObject.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Tue Apr 7 20:02:19 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 8 Apr 2009 00:02:19 +0000 Subject: [Ironruby-core] Proposal: Moving IronRuby bugs to CodePlex In-Reply-To: References: Message-ID: No objections/concerns/thoughts/concerns/praises/gifts-of-gold-frankincense-and-myrrh? Ok then ... http://ironruby.codeplex.com/ has been created, and once live all bugs will be stored there. Jim is going through RubyForge bugs slowly, closing ones that are fixed, and possibly moving important ones over to CodePlex. I'll let you all know when CodePlex is open for business. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Thursday, April 02, 2009 3:36 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Proposal: Moving IronRuby bugs to CodePlex (I originally planned on sending this yesterday, but I waited until today to remove the "April Fools" possibility =P) I'd like to propose moving IronRuby's bugs off of RubyForge. CodePlex looks like the best option, mainly due to the voting feature for bugs. Here are some possible options for defect tracking, and what I think about them: Lighthouse: http://lighthouseapp.com Sample site: http://silverline.lighthouseapp.com Very usable, nice UI, and I'm a sucker for those types of things. They support multiple projects, so splitting up the project into Compiler, Libraries, Silverlight, etc, would be very clear. There's also a nice UI for milestone progress, making it fairly clear how the progress is going. Also, other Ruby projects are moving here, so a move to Lighthouse would follow the logic of why we started on RubyForge. Lighthouse also has integration with GitHub, keeping our lighthouse page up-to-date with any changes in git. Lighthouse is usually a pay-service, but I believe they have free hosting for open-source projects. However, there might be limits on how many projects can be created, or users can be admins, so it'd be good to find out these details. Unfortunately, there's no good way to prioritize tickets other than milestones, and non-project-admins can't change the milestone, so we can't accomplish any type of user-prioritization (voting) on tickets. RubyForge: http://rubyforge.org Sample site: http://rubyforge.org/projects/ironruby We're on RubyForge currently, so switching to RubyForge would be easy. =P Unfortunately, that's about the only benefit it provides. While RubyForge has been instrumental in shaping the Ruby community, it appears that its heydays have passed, in favor of GitHub and lighthouse. RubyForge also appears to be unmaintained, especially in light of our crazy mailing list delays. File releases are still being used by the Ruby community, mainly because of it being a Ruby Gems repository, so we should keep releasing on it. CodePlex: http://codeplex.com Sample site: http://ironpython.codeplex.com CodePlex has turned into a pretty awesome open-source project site. In the past I wouldn't have wanted to move to CodePlex, but now there defect tracking features seem like the best, and much faster than they use to be. You can use the web interface, the team foundation client, or CodePlex client to look at bugs, which makes it pretty easy to keep on-top of them. Since CodePlex uses TFS underneath to store work-items and bugs, we can use the TFS API to do git commit integration and things like that (though the TFS API isn't the greatest, it exists =P). But mainly the web interface has voting support, so our tickets can be prioritized by community feedback very easily ... this is definitely the killer feature for me. As I said, I'm leaning heavily towards CodePlex, mainly for the voting support. IronPython uses this very successfully, and it would help prioritize IronRuby's work, especially post-1.0. So here's the proposal: 1. Go through open RubyForge bugs, closing bugs as necessary, and narrowing in on a subset to move to CodePlex (jdeville has begun closing bugs). 2. Create http://ironruby.codeplex.com (already reserved, just waiting to set things up and turn it on), and use it for *Issues* and *Releases* only. We will link to http://wiki.github.com/ironruby/ironruby for other developer information, and http://ironruby.net for general users, from the project homepage, and no other wiki pages will be used. 3. Releases will be the only things remaining on RubyForge, as it's still the standard place for Ruby releases, though any release announcements/blogs will point to the CodePlex release. 4. CodePlex discussion forums will not be used, as they and will remain on RubyForge for now (though we need to resolve the crazy delays soon). Thoughts? ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Apr 8 09:33:38 2009 From: lists at ruby-forum.com (Jeff Siebold) Date: Wed, 8 Apr 2009 15:33:38 +0200 Subject: [Ironruby-core] Interop with Excel Message-ID: The following code runs fine: require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' Excel = Microsoft::Office::Interop::Excel but when I try to get the Application object as follows: app = Excel.Application.new I get the following error: excel.rb:0: undefined method `Application' for Microsoft::Office::Interop::Excel:Module (NoMethodError) am I not understanding how this works or is this just not working yet? -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Wed Apr 8 11:49:21 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 8 Apr 2009 08:49:21 -0700 Subject: [Ironruby-core] (no subject) Message-ID: tfpt review "/shelveset:MetaConv1;REDMOND\tomat" Ruby and a simple outer DLR change. Prepares Ruby MetaObjectBuilder for removal of conversions from DLR binder. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MetaConv1.diff Type: application/octet-stream Size: 15639 bytes Desc: MetaConv1.diff URL: From lists at ruby-forum.com Wed Apr 8 12:07:59 2009 From: lists at ruby-forum.com (Jeff Siebold) Date: Wed, 8 Apr 2009 18:07:59 +0200 Subject: [Ironruby-core] Interop with Excel In-Reply-To: References: Message-ID: <2d42c4497ad957def3e1417c4400b0b3@ruby-forum.com> I'm replying to my own post because it looks like I found part of my problem. I changed the code to: require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' include Microsoft::Office::Interop::Excel excel = ApplicationClass.new excel.Visible = true and that works. But I'm still having trouble getting access a Workbook: p excel.ActiveWorkbook workbooks = excel.Workbooks p workbooks.respond_to?('Open') returns: nil false I would be grateful for any help. Thanks, Jeff Jeff Siebold wrote: > The following code runs fine: > > require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, > Culture=neutral, PublicKeyToken=71e9bce111e9429c' > Excel = Microsoft::Office::Interop::Excel > > but when I try to get the Application object as follows: > > app = Excel.Application.new > > I get the following error: > > excel.rb:0: undefined method `Application' for > Microsoft::Office::Interop::Excel:Module (NoMethodError) > > am I not understanding how this works or is this just not working yet? -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Wed Apr 8 13:00:44 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 8 Apr 2009 17:00:44 +0000 Subject: [Ironruby-core] Interop with Excel In-Reply-To: <2d42c4497ad957def3e1417c4400b0b3@ruby-forum.com> References: <2d42c4497ad957def3e1417c4400b0b3@ruby-forum.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD0988517B@TK5EX14MBXC101.redmond.corp.microsoft.com> When I do this, Excel opens up, but it opens up without a workbook. If I open a file manually (via Excel's GUI), then the ActiveWorkbook is populated. I don't know the Excel API, but if excel.workbooks.open("Foo.xls") is supposed to open a workbook in the Excel instance, then you've found a bug. Excel.workbooks.open is being overridden by Ruby's Kernel#open method. If this is the case, can you open a bug at http://rubyforge.org/tracker/?func=browse&group_id=4359&atid=16798 and assign it to Tomas? Thanks, JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jeff Siebold > Sent: Wednesday, April 08, 2009 9:08 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Interop with Excel > > I'm replying to my own post because it looks like I found part of my > problem. I changed the code to: > > require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, > Culture=neutral, PublicKeyToken=71e9bce111e9429c' > include Microsoft::Office::Interop::Excel > excel = ApplicationClass.new > excel.Visible = true > > and that works. But I'm still having trouble getting access a Workbook: > > p excel.ActiveWorkbook > workbooks = excel.Workbooks > p workbooks.respond_to?('Open') > > returns: > nil > false > > I would be grateful for any help. Thanks, Jeff > > > Jeff Siebold wrote: > > The following code runs fine: > > > > require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, > > Culture=neutral, PublicKeyToken=71e9bce111e9429c' > > Excel = Microsoft::Office::Interop::Excel > > > > but when I try to get the Application object as follows: > > > > app = Excel.Application.new > > > > I get the following error: > > > > excel.rb:0: undefined method `Application' for > > Microsoft::Office::Interop::Excel:Module (NoMethodError) > > > > am I not understanding how this works or is this just not working > yet? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Wed Apr 8 13:57:29 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 8 Apr 2009 10:57:29 -0700 Subject: [Ironruby-core] Interop with Excel In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD0988517B@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <2d42c4497ad957def3e1417c4400b0b3@ruby-forum.com> <0AB34E2BFBE88245B073D2D83B4245FD0988517B@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: It's arathe a missing feature. We don't support COM yet. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Wednesday, April 08, 2009 10:01 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Interop with Excel When I do this, Excel opens up, but it opens up without a workbook. If I open a file manually (via Excel's GUI), then the ActiveWorkbook is populated. I don't know the Excel API, but if excel.workbooks.open("Foo.xls") is supposed to open a workbook in the Excel instance, then you've found a bug. Excel.workbooks.open is being overridden by Ruby's Kernel#open method. If this is the case, can you open a bug at http://rubyforge.org/tracker/?func=browse&group_id=4359&atid=16798 and assign it to Tomas? Thanks, JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jeff Siebold > Sent: Wednesday, April 08, 2009 9:08 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Interop with Excel > > I'm replying to my own post because it looks like I found part of my > problem. I changed the code to: > > require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, > Culture=neutral, PublicKeyToken=71e9bce111e9429c' > include Microsoft::Office::Interop::Excel > excel = ApplicationClass.new > excel.Visible = true > > and that works. But I'm still having trouble getting access a Workbook: > > p excel.ActiveWorkbook > workbooks = excel.Workbooks > p workbooks.respond_to?('Open') > > returns: > nil > false > > I would be grateful for any help. Thanks, Jeff > > > Jeff Siebold wrote: > > The following code runs fine: > > > > require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, > > Culture=neutral, PublicKeyToken=71e9bce111e9429c' > > Excel = Microsoft::Office::Interop::Excel > > > > but when I try to get the Application object as follows: > > > > app = Excel.Application.new > > > > I get the following error: > > > > excel.rb:0: undefined method `Application' for > > Microsoft::Office::Interop::Excel:Module (NoMethodError) > > > > am I not understanding how this works or is this just not working > yet? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jirapong.nanta at gmail.com Wed Apr 8 23:28:22 2009 From: jirapong.nanta at gmail.com (jirapong.nanta at gmail.com) Date: Thu, 9 Apr 2009 10:28:22 +0700 Subject: [Ironruby-core] Kernel.open Message-ID: Hi, This snippet seems to be a bug in IronRuby. file = Kernel.open("test.bin", "wb", 0444) Error: wrong number of arguments (5 for 3) (ArgumentError) which due to KernelOps.cs - open method doesn't have overload to take a permission parameter. Open bug at - http://rubyforge.org/tracker/index.php?func=detail&aid=25308&group_id=4359&atid=16798 Thank you, -Jirapong From Shri.Borde at microsoft.com Thu Apr 9 15:05:48 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 9 Apr 2009 12:05:48 -0700 Subject: [Ironruby-core] Review: String#% and File.rename Message-ID: <710DF26F214D2B4BB94287123FFE980A2E162FC005@NA-EXMSG-C104.redmond.corp.microsoft.com> http://github.com/Jirapong/ironruby/commit/1eb5b389d849c5464f8d89090c7476a96f05c21e (Jirapong's fix) http://github.com/shri/ironruby/commit/2cb2802a316c48721875204aa83cf5d0fa85cf3f (my fixes) http://github.com/shri/ironruby/commit/e8f840f5c800fa62f4987b8904569491ae9a8ba0 (merge with irmain HEAD) GitDiff.bat fb6f89146e331a9f20f444d5ca94478dfce7f555 2cb2802a316c48721875204aa83cf5d0fa85cf3f * Jirapong's fix for File.new when file already exists * Fixed another bug in String#% * Bugs in File.rename * Ruby should exit when main thread exits, even if other threads are still alive * Mapped Errno::ENOENT to FleNotFoundException, and ENOTDIR to DirectoryNotFoundException Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/string/modulo_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/rename_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/string/modulo_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/thread/new_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb * Merlin/Users/sborde/Dev.bat Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Apr 9 15:43:11 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 9 Apr 2009 12:43:11 -0700 Subject: [Ironruby-core] Review: String#% and File.rename In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E162FC005@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E162FC005@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: Looks good. Tomas From: Shri Borde Sent: Thursday, April 09, 2009 12:06 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: String#% and File.rename http://github.com/Jirapong/ironruby/commit/1eb5b389d849c5464f8d89090c7476a96f05c21e (Jirapong's fix) http://github.com/shri/ironruby/commit/2cb2802a316c48721875204aa83cf5d0fa85cf3f (my fixes) http://github.com/shri/ironruby/commit/e8f840f5c800fa62f4987b8904569491ae9a8ba0 (merge with irmain HEAD) GitDiff.bat fb6f89146e331a9f20f444d5ca94478dfce7f555 2cb2802a316c48721875204aa83cf5d0fa85cf3f * Jirapong's fix for File.new when file already exists * Fixed another bug in String#% * Bugs in File.rename * Ruby should exit when main thread exits, even if other threads are still alive * Mapped Errno::ENOENT to FleNotFoundException, and ENOTDIR to DirectoryNotFoundException Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/string/modulo_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/rename_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/string/modulo_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/thread/new_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb * Merlin/Users/sborde/Dev.bat Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Thu Apr 9 16:17:00 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 9 Apr 2009 20:17:00 +0000 Subject: [Ironruby-core] Review: String#% and File.rename In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E162FC005@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E162FC005@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD0988DBEC@TK5EX14MBXC101.redmond.corp.microsoft.com> I would suggest using FileUtils.rm_rf instead of remove_dir at http://github.com/shri/ironruby/commit/2cb2802a316c48721875204aa83cf5d0fa85cf3f#L1R13 You also don't need to require fileutils as it is required as part of MSpec. JD From: Shri Borde Sent: Thursday, April 09, 2009 12:06 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Review: String#% and File.rename http://github.com/Jirapong/ironruby/commit/1eb5b389d849c5464f8d89090c7476a96f05c21e (Jirapong's fix) http://github.com/shri/ironruby/commit/2cb2802a316c48721875204aa83cf5d0fa85cf3f (my fixes) http://github.com/shri/ironruby/commit/e8f840f5c800fa62f4987b8904569491ae9a8ba0 (merge with irmain HEAD) GitDiff.bat fb6f89146e331a9f20f444d5ca94478dfce7f555 2cb2802a316c48721875204aa83cf5d0fa85cf3f * Jirapong's fix for File.new when file already exists * Fixed another bug in String#% * Bugs in File.rename * Ruby should exit when main thread exits, even if other threads are still alive * Mapped Errno::ENOENT to FleNotFoundException, and ENOTDIR to DirectoryNotFoundException Files changed: * Merlin/External/Languages/IronRuby/mspec/ironruby-tags/core/string/modulo_tags.txt * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/file/rename_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/string/modulo_spec.rb * Merlin/External/Languages/IronRuby/mspec/rubyspec/core/thread/new_spec.rb * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Dir.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/Errno.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/FileOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/KernelOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/StringFormatter.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ThreadOps.cs * Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_spec.rb * Merlin/Main/Languages/Ruby/Tests/Interop/uncategorized_specs.rb * Merlin/Users/sborde/Dev.bat Thanks, Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Apr 9 18:58:12 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 9 Apr 2009 15:58:12 -0700 Subject: [Ironruby-core] Code Review: OverloadResolver Message-ID: tfpt review "/shelveset:OverloadResolver;REDMOND\tomat" Outer DLR, Ruby. OverloadResolver follow-up changes: Merges MethodTarget into MethodCandidate, moves methods from MethodCandidate and ParameterWrapper to OverloadResolver, renames TargetSet to CandidateSet. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: OverloadResolver.diff Type: application/octet-stream Size: 32140 bytes Desc: OverloadResolver.diff URL: From Jimmy.Schementi at microsoft.com Thu Apr 9 19:38:43 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 9 Apr 2009 23:38:43 +0000 Subject: [Ironruby-core] Proposal: Moving IronRuby bugs to CodePlex In-Reply-To: References: Message-ID: http://ironruby.codeplex.com is live. Please direct any bug submissions and downloads of IronRuby to this site, rather than RubyForge. RubyForge bugs will be moved (as appropriate) to CodePlex over time, and v0.3 is on CodePlex, along with sources. Releases may be posted to both sites, simply for exposure, but please link to the CodePlex copy (as http://ironruby.net/Download does). RubyForge's only use is now the mailing list, though I'm looking to move that as well (with minimal downtime to this list). I'll keep you all posted. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Tuesday, April 07, 2009 5:02 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Proposal: Moving IronRuby bugs to CodePlex No objections/concerns/thoughts/concerns/praises/gifts-of-gold-frankincense-and-myrrh? Ok then ... http://ironruby.codeplex.com/ has been created, and once live all bugs will be stored there. Jim is going through RubyForge bugs slowly, closing ones that are fixed, and possibly moving important ones over to CodePlex. I'll let you all know when CodePlex is open for business. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Thursday, April 02, 2009 3:36 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Proposal: Moving IronRuby bugs to CodePlex (I originally planned on sending this yesterday, but I waited until today to remove the "April Fools" possibility =P) I'd like to propose moving IronRuby's bugs off of RubyForge. CodePlex looks like the best option, mainly due to the voting feature for bugs. Here are some possible options for defect tracking, and what I think about them: Lighthouse: http://lighthouseapp.com Sample site: http://silverline.lighthouseapp.com Very usable, nice UI, and I'm a sucker for those types of things. They support multiple projects, so splitting up the project into Compiler, Libraries, Silverlight, etc, would be very clear. There's also a nice UI for milestone progress, making it fairly clear how the progress is going. Also, other Ruby projects are moving here, so a move to Lighthouse would follow the logic of why we started on RubyForge. Lighthouse also has integration with GitHub, keeping our lighthouse page up-to-date with any changes in git. Lighthouse is usually a pay-service, but I believe they have free hosting for open-source projects. However, there might be limits on how many projects can be created, or users can be admins, so it'd be good to find out these details. Unfortunately, there's no good way to prioritize tickets other than milestones, and non-project-admins can't change the milestone, so we can't accomplish any type of user-prioritization (voting) on tickets. RubyForge: http://rubyforge.org Sample site: http://rubyforge.org/projects/ironruby We're on RubyForge currently, so switching to RubyForge would be easy. =P Unfortunately, that's about the only benefit it provides. While RubyForge has been instrumental in shaping the Ruby community, it appears that its heydays have passed, in favor of GitHub and lighthouse. RubyForge also appears to be unmaintained, especially in light of our crazy mailing list delays. File releases are still being used by the Ruby community, mainly because of it being a Ruby Gems repository, so we should keep releasing on it. CodePlex: http://codeplex.com Sample site: http://ironpython.codeplex.com CodePlex has turned into a pretty awesome open-source project site. In the past I wouldn't have wanted to move to CodePlex, but now there defect tracking features seem like the best, and much faster than they use to be. You can use the web interface, the team foundation client, or CodePlex client to look at bugs, which makes it pretty easy to keep on-top of them. Since CodePlex uses TFS underneath to store work-items and bugs, we can use the TFS API to do git commit integration and things like that (though the TFS API isn't the greatest, it exists =P). But mainly the web interface has voting support, so our tickets can be prioritized by community feedback very easily ... this is definitely the killer feature for me. As I said, I'm leaning heavily towards CodePlex, mainly for the voting support. IronPython uses this very successfully, and it would help prioritize IronRuby's work, especially post-1.0. So here's the proposal: 1. Go through open RubyForge bugs, closing bugs as necessary, and narrowing in on a subset to move to CodePlex (jdeville has begun closing bugs). 2. Create http://ironruby.codeplex.com (already reserved, just waiting to set things up and turn it on), and use it for *Issues* and *Releases* only. We will link to http://wiki.github.com/ironruby/ironruby for other developer information, and http://ironruby.net for general users, from the project homepage, and no other wiki pages will be used. 3. Releases will be the only things remaining on RubyForge, as it's still the standard place for Ruby releases, though any release announcements/blogs will point to the CodePlex release. 4. CodePlex discussion forums will not be used, as they and will remain on RubyForge for now (though we need to resolve the crazy delays soon). Thoughts? ~Jimmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Mon Apr 13 22:29:19 2009 From: lists at ruby-forum.com (Aaron Clauson) Date: Tue, 14 Apr 2009 04:29:19 +0200 Subject: [Ironruby-core] Namespace Conflict System.Linq Message-ID: <39caedc98d9d79bfcb4958bead42d75f@ruby-forum.com> Hi, I host an IronRuby engine in my app and get a lot of compiler warnings about duplicate definitions for classes in System.Linq. In the past it wasn't much of an issue but now that I have started using some Linq functionality I have found myself having to add and remove System.Linq and Microsoft.Scripting.Core to get my app to compile. It seems that when there is a conflict the assembly reference added last wins. Is there a better way to solve this? Are the DLR and main .Net Linq namespaces going to merge in the future? Thanks, Aaron -- Posted via http://www.ruby-forum.com/. From antti.karanta at napa.fi Tue Apr 14 03:49:22 2009 From: antti.karanta at napa.fi (Antti Karanta) Date: Tue, 14 Apr 2009 10:49:22 +0300 Subject: [Ironruby-core] Problem checking out iron ruby source References: <710DF26F214D2B4BB94287123FFE980A2E16209FE0@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: On Tue, 07 Apr 2009 21:45:21 +0300, Shri Borde wrote: > No idea. Can you clone any other GIT repo? No, iron ruby is my first contact with git. Now that you mentioned it I tried to clone a random project from github and it gives the same error, so the problem is probably with my git installation. > Did you Google for it? Yes, but didn't find anything that would solve the problem. There were some reports of the same problem on different projects, but no solution. > Btw, I found that the GIT tutorial at > http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html is very > helpful for ramping up on GIT concepts. Thanks. I'll take a look once I get the basic cloning working... ::Antti:: From suppakilla at gmail.com Tue Apr 14 10:45:50 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Tue, 14 Apr 2009 16:45:50 +0200 Subject: [Ironruby-core] [patch] Fixes for Array#[]= Message-ID: <3bf20550904140745i17bba30yb7bef9eec0742823@mail.gmail.com> Hi, I've just committed my first patch to IronRuby on my forked repository, this is the URL for the diff: http://github.com/nrk/ironruby/commit/7b819d65bd26c0642f88ab30e8ccc17d9e625fcf This patch fixes 4 failures in core/array/element_set_spec.rb, namely: Array#[]= inserts the given elements with [range] which the range is zero-width Array#[]= inserts the given elements with [start, length] which length is zero Array#[]= inserts the given elements with [range] which the range has negative width Array#[]= with [index, count] inserts other section in place defined by idx The patch itself is nothing special, but it is needed to run ironruby-hpricot out of the box on IronRuby. Thanks, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Shri.Borde at microsoft.com Tue Apr 14 17:18:33 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 14 Apr 2009 14:18:33 -0700 Subject: [Ironruby-core] [patch] Fixes for Array#[]= In-Reply-To: <3bf20550904140745i17bba30yb7bef9eec0742823@mail.gmail.com> References: <3bf20550904140745i17bba30yb7bef9eec0742823@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19A77D4D@NA-EXMSG-C104.redmond.corp.microsoft.com> Changes look good! Thanks for the patch, Daniele! Note that the tags should be deleted once the bug is fixed. That way, running irtests.bat will run the specs you have just enabled and ensure that you really have fixed the issue. Deleting the tags should be in the same commit as the source code fix. I have deleted the tags and pushed it to http://github.com/shri/ironruby/commit/95d1a8410d2bbabd37e27314da1c504cc486a711 Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Tuesday, April 14, 2009 7:46 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] [patch] Fixes for Array#[]= Hi, I've just committed my first patch to IronRuby on my forked repository, this is the URL for the diff: http://github.com/nrk/ironruby/commit/7b819d65bd26c0642f88ab30e8ccc17d9e625fcf This patch fixes 4 failures in core/array/element_set_spec.rb, namely: Array#[]= inserts the given elements with [range] which the range is zero-width Array#[]= inserts the given elements with [start, length] which length is zero Array#[]= inserts the given elements with [range] which the range has negative width Array#[]= with [index, count] inserts other section in place defined by idx The patch itself is nothing special, but it is needed to run ironruby-hpricot out of the box on IronRuby. Thanks, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Tue Apr 14 18:16:02 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 14 Apr 2009 22:16:02 +0000 Subject: [Ironruby-core] Namespace Conflict System.Linq In-Reply-To: <39caedc98d9d79bfcb4958bead42d75f@ruby-forum.com> References: <39caedc98d9d79bfcb4958bead42d75f@ruby-forum.com> Message-ID: Yes, they are going to merge. However, I'm pretty sure there's no good way to get rid of the warnings without us having to rewrite the namespaces of Microsoft.Scripting.Core.dll. If you really want to get rid of those warnings, you can grab IronRuby from http://dlr.codeplex.com, which has current IronRuby bits working against a rewritten version of Microsoft.Scripting.Core.dll. ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Aaron Clauson > Sent: Monday, April 13, 2009 7:29 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Namespace Conflict System.Linq > > Hi, > > I host an IronRuby engine in my app and get a lot of compiler warnings > about duplicate definitions for classes in System.Linq. In the past it > wasn't much of an issue but now that I have started using some Linq > functionality I have found myself having to add and remove System.Linq > and Microsoft.Scripting.Core to get my app to compile. It seems that > when there is a conflict the assembly reference added last wins. > > Is there a better way to solve this? Are the DLR and main .Net Linq > namespaces going to merge in the future? > > Thanks, > > Aaron > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Tue Apr 14 19:25:42 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 14 Apr 2009 23:25:42 +0000 Subject: [Ironruby-core] Problem checking out iron ruby source In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E16209FE0@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD16F3BFE5@TK5EX14MBXC101.redmond.corp.microsoft.com> If the cygwin installation keeps messing up, try the Msysgit one at http://code.google.com/p/msysgit. If you select the second option when it asks you where to run Git from, you can use it from CMD. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Antti Karanta > Sent: Tuesday, April 14, 2009 12:49 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Problem checking out iron ruby source > > > On Tue, 07 Apr 2009 21:45:21 +0300, Shri Borde > wrote: > > > No idea. Can you clone any other GIT repo? > > No, iron ruby is my first contact with git. Now that you mentioned > it I > tried to clone a random project from github and it gives the same > error, > so the problem is probably with my git installation. > > > > Did you Google for it? > > Yes, but didn't find anything that would solve the problem. There > were > some reports of the same problem on different projects, but no > solution. > > > > Btw, I found that the GIT tutorial at > > http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html is > very > > helpful for ramping up on GIT concepts. > > Thanks. I'll take a look once I get the basic cloning working... > > > > > ::Antti:: > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From antti.karanta at napa.fi Wed Apr 15 00:52:49 2009 From: antti.karanta at napa.fi (Antti Karanta) Date: Wed, 15 Apr 2009 07:52:49 +0300 Subject: [Ironruby-core] Problem checking out iron ruby source References: <710DF26F214D2B4BB94287123FFE980A2E16209FE0@NA-EXMSG-C104.redmond.corp.microsoft.com> <0AB34E2BFBE88245B073D2D83B4245FD16F3BFE5@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: On Wed, 15 Apr 2009 02:25:42 +0300, Jim Deville wrote: > If the cygwin installation keeps messing up, try the Msysgit one at > http://code.google.com/p/msysgit. If you select the second option when > it asks you where to run Git from, you can use it from CMD. Thanks for the tip. I actually already tried it, but it gives the same error. :/ There is something very strange about this: two different versions of git (cygwin and mingw) both fail on all the git projects I tried to clone (iron ruby, jruby and some random one I picked from github). This seems to indicate there is something wrong with my environment, but I can't think what it could be - I'm running a quite regular win xp sp 2. I also tried disabling windows defender and symantec firewall (as I found someone suggesting this in a similar issue I found when googling) but that made no difference. ::Antti:: From lists at ruby-forum.com Wed Apr 15 01:28:57 2009 From: lists at ruby-forum.com (Chamini Gallage) Date: Wed, 15 Apr 2009 07:28:57 +0200 Subject: [Ironruby-core] =?utf-8?q?Error_when_running_Cucumber_examples_wi?= =?utf-8?q?th=09IronRuby?= In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <5189c5ce4143ec4739b6de5f9e156206@ruby-forum.com> Hi, I have been trying the same task with the latest ironruby source and continuously get the same error. Can some one please guide me how and where to apply the snippet mentioned in Shri's post; Shri Borde wrote: > Its an IronRuby bug with "break" in eval'ed code. The problem can be > reproed with the snippet below. Tomas, do you want to take a look? > > def f > yield > end > > f { break } # This works with both MRI and IronRuby > > eval "f { break }" # This throws LocalJumpError with IronRuby only > > Thanks, > Shri Thanks in advance.. Chamini -- Posted via http://www.ruby-forum.com/. From suppakilla at gmail.com Wed Apr 15 05:02:53 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Wed, 15 Apr 2009 11:02:53 +0200 Subject: [Ironruby-core] [patch] Fixes for Array#[]= In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E19A77D4D@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <3bf20550904140745i17bba30yb7bef9eec0742823@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19A77D4D@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <3bf20550904150202w625bf07eu1f3196eb38e5dde1@mail.gmail.com> Cool. More patches to come :-) I'll make sure to include changes/removals of the tags files in the next commits. On Tue, Apr 14, 2009 at 23:18, Shri Borde wrote: > Changes look good! Thanks for the patch, Daniele! > > Note that the tags should be deleted once the bug is fixed. That way, running irtests.bat will run the specs you have just enabled and ensure that you really have fixed the issue. Deleting the tags should be in the same commit as the source code fix. > > I have deleted the tags and pushed it to > http://github.com/shri/ironruby/commit/95d1a8410d2bbabd37e27314da1c504cc486a711 > > Thanks, > Shri > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From ivan at flanders.co.nz Wed Apr 15 06:44:01 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 15 Apr 2009 12:44:01 +0200 Subject: [Ironruby-core] What works for you when you use git on windows ? In-Reply-To: <4a68b8cf0904150314x13fa22dfx488d128932798348@mail.gmail.com> References: <4a68b8cf0904150314x13fa22dfx488d128932798348@mail.gmail.com> Message-ID: I use msysgit with openssl.. that works properly for me. The thing is that when the installer asks you how much it can mess with your system. that you choose the second option so you can use it with powershell or cmd --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) Sent from Antwerp, Flemish Region, Belgium On Wed, Apr 15, 2009 at 12:14 PM, Thibaut Barr?re wrote: > Hi, > I'm having bad times trying to just pull my fork on Windows. So far I > always pulled from the Mac, and used a shared folder inside a Parallels VM > to run what I needed. Now that I want to edit the IronRuby code under > VisualStudio, Parallels is just too slow on my machine for that. I need to > be able to pull from BootCamp directly. > > So for those forking and patching on windows, what's your current git setup > ? Do you use msysgit ? Passphrase or not ? Plink ? > > Any idea of what is supposed to work will be helpful. > > cheers, > > -- Thibaut > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Wed Apr 15 07:38:58 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Wed, 15 Apr 2009 13:38:58 +0200 Subject: [Ironruby-core] What works for you when you use git on windows ? In-Reply-To: References: <4a68b8cf0904150314x13fa22dfx488d128932798348@mail.gmail.com> Message-ID: <4a68b8cf0904150438u398fa2fbib61277cafdd63c9c@mail.gmail.com> Hi Ivan, thanks - based on your input I could narrow the issue and managed to pull the code out. In case that's useful to someone else: if you have accents in your name and have trouble pulling from git, check out c:\documents and settings - I had 3 folders instead of one here ("Barr?re" and corrupted versions). The fix was to: - remove all duplicate folders - uninstall cygwin, tortoisegit and msysgit - reinstall msysgit - add the following line at the top of c:\program files\git\etc\profile export HOME="/c/program files/git/home" - create the git/home folder - recreate the ssh key following github guidelines at http://github.com/guides/providing-your-ssh-key#msysGit cheers, thanks again, -- Thibaut On Wed, Apr 15, 2009 at 12:44 PM, Ivan Porto Carrero wrote: > I use msysgit with openssl.. that works properly for me. > The thing is that when the installer asks you how much it can mess with your > system. that you choose the second option so you can use it with powershell > or cmd > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > GSM: +32.486.787.582 > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > Sent from Antwerp, Flemish Region, Belgium > > On Wed, Apr 15, 2009 at 12:14 PM, Thibaut Barr?re > wrote: >> >> Hi, >> I'm having bad times trying to just pull my fork on Windows. So far I >> always pulled from the Mac, and used a shared folder inside a Parallels VM >> to run what I needed. Now that I want to edit the IronRuby code under >> VisualStudio, Parallels is just too slow on my machine for that. I need to >> be able to pull from BootCamp directly. >> So for those forking and patching on windows, what's your current git >> setup ? Do you use msysgit ? Passphrase or not ? Plink ? >> Any idea of what is supposed to work will be helpful. >> cheers, >> -- Thibaut >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From suppakilla at gmail.com Wed Apr 15 08:15:25 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Wed, 15 Apr 2009 14:15:25 +0200 Subject: [Ironruby-core] What works for you when you use git on windows ? In-Reply-To: <4a68b8cf0904150314x13fa22dfx488d128932798348@mail.gmail.com> References: <4a68b8cf0904150314x13fa22dfx488d128932798348@mail.gmail.com> Message-ID: <3bf20550904150515x2586ae3dh60c92cd18e57db15@mail.gmail.com> Hi Thibaut, I use msysgit 1.6.2 configured to run with openssl (plink gave me problems in the past with msysgit < 1.6) and I choose "Run Git from the windows command prompt" when asked for adjustments of the PATH. Also, I choose "Commit line endings as they are" just to have control of what and how I am committing. -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN On Wed, Apr 15, 2009 at 12:14, Thibaut Barr?re wrote: > Hi, > I'm having bad times trying to just pull my fork on Windows. So far I always > pulled from the Mac, and used a shared folder inside a Parallels VM to run > what I needed. Now that I want to edit the IronRuby code under VisualStudio, > Parallels is just too slow on my machine for that. I need to be able to pull > from BootCamp directly. > So for those forking and patching on windows, what's your current git setup > ? Do you use msysgit ? Passphrase or not ? Plink ? > Any idea of what is supposed to work will be helpful. > cheers, > -- Thibaut From thibaut.barrere at gmail.com Wed Apr 15 09:14:05 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Wed, 15 Apr 2009 15:14:05 +0200 Subject: [Ironruby-core] What works for you when you use git on windows ? In-Reply-To: <3bf20550904150515x2586ae3dh60c92cd18e57db15@mail.gmail.com> References: <4a68b8cf0904150314x13fa22dfx488d128932798348@mail.gmail.com> <3bf20550904150515x2586ae3dh60c92cd18e57db15@mail.gmail.com> Message-ID: <4a68b8cf0904150614n71198800s779d2926ef5bfa43@mail.gmail.com> Hi Daniele, thanks for the feedback! cheers, -- Thibaut From thibaut.barrere at gmail.com Wed Apr 15 09:15:57 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Wed, 15 Apr 2009 15:15:57 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process Message-ID: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> Some notes as I go though the contributing process, in hope that will be useful to make it smoother: - after a clean checkout and launching dev.bat, brbd would not compile (today). I believe it reported a missing microsoft.scripting.dll issue. - opening the solution in VS2008 shows 14 warnings about referenced components that cannot be found (System, mscorlib, System.Net), not sure if that's an issue or not - compiling through VS2008 makes the compile using brbd works afterwards. - first pass at launching irtests opens a bunch of windows - most of them fail with failure to load default.mspec (see [1]) - after searching, the message was caused by an old .mspecrc that was sitting in my home folder. Removing it solved the issue. - I noticed a runfirst.cmd, should I actually run it or is it obsolete ? It seems to have an error in it (references default.mspec.rb which has been renamed to default.mspec since). - on a french machine, the MiscTests/NumericLiterals1 fails see [2] - sounds like a missing InvariantCulture in a float ToString call. I'll look into it unless someone fixes it in between. On irtests execution: the end of irtests launches irtest.bat, run.bat and 4 mspec in parallels ("start" calls). Is there a need for that (ie one process that monitors the others) or could it be run sequentially if it's more comfortable for me ? The load is putting my machine down on its knees. cheers, -- Thibaut ===== [1] mspec error ===== IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 :0:in `load': no such file to load -- C:\git\ironruby\Merlin\Main\..\External\Languages\IronRuby\mspec\default.mspec (LoadError) ===== [2] NumericLiterals1 failure ===== 1) NumericLiterals1 c:\git\ironruby\Merlin\Main\Languages\Ruby\IronRuby.Tests\Runtime\MiscTests.cs : 411 Unexpected output: '1\r\n-1\r\n1\r\n1,1\r\n-1,1\r\n1,1\r\n2.0\r\n2.0\r\n2,156\r\n'. First difference (8): actual = ',' expected = '.' Repro: C:\git\ironruby\Merlin\Main\bin\debug\IronRuby.Tests.exe NumericLiterals1 From thibaut.barrere at gmail.com Wed Apr 15 09:57:15 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Wed, 15 Apr 2009 15:57:15 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> Message-ID: <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> A couple of steps later: I meet the following failures while running irtests on an unmodified fork (by window title, see matching commands at the end of the mail): - smoke tests => 1 failure - library rubyspec tests => 4 failures, 15 errors in various places - core rubyspec tests => 1 failure, 1 error I suspect some of these are linked to the fact that I use a french culture on my machine. Just do get a point of comparison and know what needs fixing, are all these supposed to pass, or are some known to fail and that would be normal ? cheers, -- Thibaut C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Smoke Tests" C:\git\ironruby\Merlin\Main\Languages\Ruby\Tests\Scripts\irtest.bat C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Legacy Tests" C:\git\ironruby\Merlin\Main\Languages\Ruby\Tests\run.bat C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Core RubySpec tests" mspec ci -fd -V :core C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Language RubySpec tests" mspec ci -fd -V :lang C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Library RubySpec tests" mspec ci -fd -V :lib C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Command Line RubySpec tests" mspec ci -fd -V :cli :netinterop From Jimmy.Schementi at microsoft.com Wed Apr 15 10:09:55 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 15 Apr 2009 14:09:55 +0000 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> Message-ID: > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Thibaut Barr?re > Sent: Wednesday, April 15, 2009 6:16 AM > To: ironruby-core > Subject: [Ironruby-core] Some feedback on the compile/test process > > Some notes as I go though the contributing process, in hope that will > be useful to make it smoother: > - after a clean checkout and launching dev.bat, brbd would not compile > (today). I believe it reported a missing microsoft.scripting.dll > issue. Please remove the ClrAssembly.csproj file from the solution ... then all will build fine. That will be removed shortly. > - opening the solution in VS2008 shows 14 warnings about referenced > components that cannot be found (System, mscorlib, System.Net), not > sure if that's an issue or not Hmm, weird. The build configuration was definitely Debug, not "Silverlight Debug" or something like that? > - compiling through VS2008 makes the compile using brbd works > afterwards. > - first pass at launching irtests opens a bunch of windows - most of > them fail with failure to load default.mspec (see [1]) - after > searching, the message was caused by an old .mspecrc that was sitting > in my home folder. Removing it solved the issue. If you run dev.bat first, this problem should go away. Irtest opens a bunch of windows, one for each test runner, simply for parallelism. > - I noticed a runfirst.cmd, should I actually run it or is it obsolete > ? It seems to have an error in it (references default.mspec.rb which > has been renamed to default.mspec since). Runfirst.cmd should be removed, dev.bat is what you want > - on a french machine, the MiscTests/NumericLiterals1 fails see [2] - > sounds like a missing InvariantCulture in a float ToString call. I'll > look into it unless someone fixes it in between. Please track this with a bug on codeplex, someone else might have context. > On irtests execution: the end of irtests launches irtest.bat, run.bat > and 4 mspec in parallels ("start" calls). Is there a need for that (ie > one process that monitors the others) or could it be run sequentially > if it's more comfortable for me ? The load is putting my machine down > on its knees. You could make a version of irtest that does them sequentially > cheers, > > -- Thibaut > > ===== [1] mspec error ===== > > IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 > :0:in `load': no such file to load -- > C:\git\ironruby\Merlin\Main\..\External\Languages\IronRuby\mspec\defaul > t.mspec > (LoadError) > > ===== [2] NumericLiterals1 failure ===== > > 1) NumericLiterals1 > c:\git\ironruby\Merlin\Main\Languages\Ruby\IronRuby.Tests\Runtime\MiscT > ests.cs > : 411 > Unexpected output: > > '1\r\n-1\r\n1\r\n1,1\r\n-1,1\r\n1,1\r\n2.0\r\n2.0\r\n2,156\r\n'. > > First difference (8): > actual = ',' > expected = '.' > > Repro: C:\git\ironruby\Merlin\Main\bin\debug\IronRuby.Tests.exe > NumericLiterals1 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 15 10:47:54 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 15 Apr 2009 14:47:54 +0000 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> Message-ID: Yes, these are all suppose to pass ... they run "mspec ci" which is the continuous integration mode ... which omits "critical" or "fails" tagged tests. It'd be good to know where IronRuby falls over in different cultures, so feel free to report bugs on codeplex about these things. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Thibaut Barr?re > Sent: Wednesday, April 15, 2009 6:57 AM > To: ironruby-core > Subject: Re: [Ironruby-core] Some feedback on the compile/test process > > A couple of steps later: I meet the following failures while running > irtests on an unmodified fork (by window title, see matching commands > at the end of the mail): > - smoke tests => 1 failure > - library rubyspec tests => 4 failures, 15 errors in various places > - core rubyspec tests => 1 failure, 1 error > > I suspect some of these are linked to the fact that I use a french > culture on my machine. > > Just do get a point of comparison and know what needs fixing, are all > these supposed to pass, or are some known to fail and that would be > normal ? > > cheers, > > -- Thibaut > > C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Smoke Tests" > C:\git\ironruby\Merlin\Main\Languages\Ruby\Tests\Scripts\irtest.bat > C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Legacy Tests" > C:\git\ironruby\Merlin\Main\Languages\Ruby\Tests\run.bat > C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Core RubySpec tests" > mspec ci -fd -V :core > C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Language RubySpec > tests" mspec ci -fd -V :lang > C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Library RubySpec > tests" mspec ci -fd -V :lib > C:\Git\ironruby\Merlin\Main\Languages\Ruby>start "Command Line > RubySpec tests" mspec ci -fd -V :cli :netinterop > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 15 10:49:07 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 15 Apr 2009 14:49:07 +0000 Subject: [Ironruby-core] Error when running Cucumber examples with IronRuby In-Reply-To: <5189c5ce4143ec4739b6de5f9e156206@ruby-forum.com> References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> <5189c5ce4143ec4739b6de5f9e156206@ruby-forum.com> Message-ID: That's because the bug still exist ... http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=578 ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Chamini Gallage > Sent: Tuesday, April 14, 2009 10:29 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Error when running Cucumber examples with > IronRuby > > Hi, > > I have been trying the same task with the latest ironruby source and > continuously get the same error. Can some one please guide me how and > where to apply the snippet mentioned in Shri's post; > > Shri Borde wrote: > > Its an IronRuby bug with "break" in eval'ed code. The problem can be > > reproed with the snippet below. Tomas, do you want to take a look? > > > > def f > > yield > > end > > > > f { break } # This works with both MRI and IronRuby > > > > eval "f { break }" # This throws LocalJumpError with IronRuby only > > > > Thanks, > > Shri > > Thanks in advance.. > > Chamini > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From suppakilla at gmail.com Wed Apr 15 12:30:34 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Wed, 15 Apr 2009 18:30:34 +0200 Subject: [Ironruby-core] [patch] More fixes for Array (IListOps.cs) Message-ID: <3bf20550904150930g472bfc3q72f9083c421df656@mail.gmail.com> Hi, I've committed more fixes for a few methods of the Array class that were failing to pass the specs: http://github.com/nrk/ironruby/commit/b754ddcd3bdd2c4513e456c9cf3933772e8541f9 These are the specs affected by this patch: * core/array/compact - Array#compact keeps tainted status even if all elements are removed * core/array/delete - Array#delete may be given a block that is executed if no element matches object * core/array/first - Array#first does not return subclass instance when passed count on Array subclasses * core/array/last - Array#last does not return subclass instance on Array subclasses * core/array/flatten - Array#flatten returns subclass instance for Array subclasses - Array#flatten does not call flatten on elements * core/array/fetch - Array#fetch passes the original index argument object to the block, not the converted Integer I hope I haven't forgotten anything important this time, changes to the tags files are included in the commit :-) Regards, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From thibaut.barrere at gmail.com Thu Apr 16 03:57:48 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 16 Apr 2009 09:57:48 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> Message-ID: <4a68b8cf0904160057i609e533ege3a4ee1e71998bc4@mail.gmail.com> Hi Jimmy, thanks for the feedback - comments inlined below: > Please remove the ClrAssembly.csproj file from the solution ... then all will build fine. That will be removed shortly. thanks. >> - opening the solution in VS2008 shows 14 warnings about referenced >> components that cannot be found (System, mscorlib, System.Net), not >> sure if that's an issue or not > > Hmm, weird. The build configuration was definitely Debug, not "Silverlight Debug" or something like that? It is Debug, not Silverlight Debug. I looked at the .csproj and saw conditional references to these dll when SilverlightDebug is set. It seems that the condition is not evaluated properly. Not a big deal though, it seems to work, but could lead to weird things I guess. >> - I noticed a runfirst.cmd, should I actually run it or is it obsolete >> ? It seems to have an error in it (references default.mspec.rb which >> has been renamed to default.mspec since). > > Runfirst.cmd should be removed, dev.bat is what you want ok, thanks. > >> - on a french machine, the MiscTests/NumericLiterals1 fails see [2] - >> sounds like a missing InvariantCulture in a float ToString call. I'll >> look into it unless someone fixes it in between. > > Please track this with a bug on codeplex, someone else might have context. Done: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 >> On irtests execution: the end of irtests launches irtest.bat, run.bat >> and 4 mspec in parallels ("start" calls). Is there a need for that (ie >> one process that monitors the others) or could it be run sequentially >> if it's more comfortable for me ? The load is putting my machine down >> on its knees. > > You could make a version of irtest that does them sequentially Thanks - much faster. -- Thibaut From thibaut.barrere at gmail.com Thu Apr 16 03:58:30 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 16 Apr 2009 09:58:30 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> Message-ID: <4a68b8cf0904160058i1d92207dm31f49cb73ff3c224@mail.gmail.com> > Yes, these are all suppose to pass ... they run "mspec ci" which is the continuous integration mode ... which omits "critical" or "fails" tagged tests. > > It'd be good to know where IronRuby falls over in different cultures, so feel free to report bugs on codeplex about these things. thanks - I added the first one here: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 and will add or fix more as I go. -- Thibaut From thibaut.barrere at gmail.com Thu Apr 16 04:23:24 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 16 Apr 2009 10:23:24 +0200 Subject: [Ironruby-core] "mspec ci" throws an exception Message-ID: <4a68b8cf0904160123v5e53ba91rcb9d8d130ff13c69@mail.gmail.com> Hi, should I open a bug on codeplex for that ? Is anyone else meeting the same issue ? (details below) C:\Git\ironruby\Merlin\Main\Languages\Ruby>mspec ci IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 script.rb:172:in `files': undefined method `inject' for nil:NilClass (NoMethodError) from mspec-ci.rb:11:in `options' from script.rb:189:in `main' from mspec-ci:0 I had a closer look and saw that the files methods in script.rb is passed a nil files argument. This is caused by C:\git\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\lib\mspec\commands\mspec-ci.rb line 54: patterns = config[:ci_files] if patterns.empty? config[:ci_files] is nil. I searched for ci_files on all the files but can't find anything that would set this key in the hash (except for tests). -- Thibaut From suppakilla at gmail.com Thu Apr 16 05:28:23 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 16 Apr 2009 11:28:23 +0200 Subject: [Ironruby-core] [patch] More fixes for Array (IListOps.cs) In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E19EDEAC0@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <3bf20550904150930g472bfc3q72f9083c421df656@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEAC0@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <3bf20550904160228m4e4ab77fq60016230bec33cd4@mail.gmail.com> On Thu, Apr 16, 2009 at 01:14, Shri Borde wrote: > In IListOps.Fetch, instead of doing the protocol conversion manually, you > should calls Protocols. ConvertToInteger. Tomas, can you double-check this? Hmm, right, and the code looks much more cleaner too. I think I should just use Protocols.CastToFixnum then: we don't really care about bignums here, they can't be used as indexes for arrays anyway and in fact MRI throws a RangeError "bignum too big to convert into `long'". > In IListOps.First, you can get rid of the allocateStorage argument as its > not being used anymore. (You can batch this fix with your next commit) Same for IListOps.Last, it just slipped away. I removed allocateStorage on both. > Btw, could you please increase the diff context size to 15-20 so more of the > surrounding lines are included? That makes it easier to understand what the > fix is doing when using the url below, without having to map that back to > the correct line number in the actual file. I guess there is no way to increase the lines range of a diff viewed via the github web interface, but I can generate and attach custom diff patches to my mails if you think it could be useful, just like the one attached to this mail and generated with "git diff HEAD~1 -U15 > patch.diff" (PS: I have not yet pushed this commit on my remote repository). -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs index f6a6fd8..955836e 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs @@ -723,51 +723,45 @@ namespace IronRuby.Builtins { if (block.Yield(i, out result)) { return result; } i++; } return self; } #endregion #region fetch [RubyMethod("fetch")] public static object Fetch( - RespondToStorage/*!*/ respondToStorage, - CallSiteStorage>/*!*/ toIntStorage, + ConversionStorage/*!*/ fixnumCast, BlockParam outOfRangeValueProvider, IList/*!*/ list, object/*!*/ index, [Optional]object defaultValue) { - if (!Protocols.RespondTo(respondToStorage, index, "to_int")) { - throw RubyExceptions.CannotConvertTypeToTargetType(respondToStorage.Context, index, "Integer"); - } - - var toInt = toIntStorage.GetCallSite("to_int", 0); - int convertedIndex = toInt.Target(toInt, index); + int convertedIndex = Protocols.CastToFixnum(fixnumCast, index); if (InRangeNormalized(list, ref convertedIndex)) { return list[convertedIndex]; } if (outOfRangeValueProvider != null) { if (defaultValue != Missing.Value) { - respondToStorage.Context.ReportWarning("block supersedes default value argument"); + fixnumCast.Context.ReportWarning("block supersedes default value argument"); } object result; outOfRangeValueProvider.Yield(index, out result); return result; } if (defaultValue == Missing.Value) { throw RubyExceptions.CreateIndexError("index " + convertedIndex + " out of array"); } return defaultValue; } #endregion @@ -875,48 +869,46 @@ namespace IronRuby.Builtins { int length = Math.Max(0, end - begin + (range.ExcludeEnd ? 0 : 1)); return Fill(fixnumCast.Context, block, self, begin, length); } #endregion #region first, last [RubyMethod("first")] public static object First(IList/*!*/ self) { return self.Count == 0 ? null : self[0]; } [RubyMethod("first")] - public static IList/*!*/ First(CallSiteStorage>/*!*/ allocateStorage, - IList/*!*/ self, [DefaultProtocol]int count) { + public static IList/*!*/ First(IList/*!*/ self, [DefaultProtocol]int count) { if (count < 0) { throw RubyExceptions.CreateArgumentError("negative array size (or size too big)"); } count = count > self.Count ? self.Count : count; return RubyArray.Create(self as IList, 0, count); } [RubyMethod("last")] public static object Last(IList/*!*/ self) { return self.Count == 0 ? null : self[self.Count - 1]; } [RubyMethod("last")] - public static IList/*!*/ Last(CallSiteStorage>/*!*/ allocateStorage, - IList/*!*/ self, [DefaultProtocol]int count) { + public static IList/*!*/ Last(IList/*!*/ self, [DefaultProtocol]int count) { if (count < 0) { throw RubyExceptions.CreateArgumentError("negative array size (or size too big)"); } count = count > self.Count ? self.Count : count; return RubyArray.Create(self as IList, self.Count - count, count); } #endregion #region flatten, flatten! [MultiRuntimeAware] private static RubyUtils.RecursionTracker _infiniteFlattenTracker = new RubyUtils.RecursionTracker(); diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs index 213c2b2..0a6ad6b 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs @@ -5059,47 +5059,47 @@ namespace IronRuby.Builtins { ); module.DefineLibraryMethod("each_index", 0x51, new System.Func(IronRuby.Builtins.IListOps.EachIndex) ); module.DefineLibraryMethod("empty?", 0x51, new System.Func(IronRuby.Builtins.IListOps.Empty) ); module.DefineLibraryMethod("eql?", 0x51, new System.Func(IronRuby.Builtins.IListOps.HashEquals) ); module.DefineLibraryMethod("fetch", 0x51, - new System.Func>, IronRuby.Runtime.BlockParam, System.Collections.IList, System.Object, System.Object, System.Object>(IronRuby.Builtins.IListOps.Fetch) + new System.Func, IronRuby.Runtime.BlockParam, System.Collections.IList, System.Object, System.Object, System.Object>(IronRuby.Builtins.IListOps.Fetch) ); module.DefineLibraryMethod("fill", 0x51, new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func, System.Collections.IList, System.Object, System.Object, System.Object, System.Collections.IList>(IronRuby.Builtins.IListOps.Fill), new System.Func, System.Collections.IList, System.Object, IronRuby.Builtins.Range, System.Collections.IList>(IronRuby.Builtins.IListOps.Fill), new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func, IronRuby.Runtime.BlockParam, System.Collections.IList, System.Object, System.Object, System.Object>(IronRuby.Builtins.IListOps.Fill), new System.Func, IronRuby.Runtime.BlockParam, System.Collections.IList, IronRuby.Builtins.Range, System.Object>(IronRuby.Builtins.IListOps.Fill) ); module.DefineLibraryMethod("first", 0x51, new System.Func(IronRuby.Builtins.IListOps.First), - new System.Func>, System.Collections.IList, System.Int32, System.Collections.IList>(IronRuby.Builtins.IListOps.First) + new System.Func(IronRuby.Builtins.IListOps.First) ); module.DefineLibraryMethod("flatten", 0x51, new System.Func>, IronRuby.Runtime.ConversionStorage, IronRuby.Runtime.RubyContext, System.Collections.IList, System.Collections.IList>(IronRuby.Builtins.IListOps.Flatten) ); module.DefineLibraryMethod("flatten!", 0x51, new System.Func>, IronRuby.Runtime.ConversionStorage, IronRuby.Runtime.RubyContext, System.Collections.IList, System.Collections.IList>(IronRuby.Builtins.IListOps.FlattenInPlace) ); module.DefineLibraryMethod("hash", 0x51, new System.Func(IronRuby.Builtins.IListOps.GetHashCode) ); module.DefineLibraryMethod("include?", 0x51, @@ -5125,31 +5125,31 @@ namespace IronRuby.Builtins { module.DefineLibraryMethod("insert", 0x51, new System.Func(IronRuby.Builtins.IListOps.Insert) ); module.DefineLibraryMethod("inspect", 0x51, new System.Func(IronRuby.Builtins.IListOps.Inspect) ); module.DefineLibraryMethod("join", 0x51, new System.Func, System.Collections.IList, IronRuby.Builtins.MutableString>(IronRuby.Builtins.IListOps.Join), new System.Func, System.Collections.IList, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.IListOps.Join) ); module.DefineLibraryMethod("last", 0x51, new System.Func(IronRuby.Builtins.IListOps.Last), - new System.Func>, System.Collections.IList, System.Int32, System.Collections.IList>(IronRuby.Builtins.IListOps.Last) + new System.Func(IronRuby.Builtins.IListOps.Last) ); module.DefineLibraryMethod("length", 0x51, new System.Func(IronRuby.Builtins.IListOps.Length) ); module.DefineLibraryMethod("map!", 0x51, new System.Func(IronRuby.Builtins.IListOps.CollectInPlace) ); module.DefineLibraryMethod("nitems", 0x51, new System.Func(IronRuby.Builtins.IListOps.NumberOfNonNilItems) ); module.DefineLibraryMethod("pop", 0x51, From suppakilla at gmail.com Thu Apr 16 05:59:25 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 16 Apr 2009 11:59:25 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <4a68b8cf0904160058i1d92207dm31f49cb73ff3c224@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> <4a68b8cf0904160058i1d92207dm31f49cb73ff3c224@mail.gmail.com> Message-ID: <3bf20550904160259p7ca605f3uaab96de87b9d5f65@mail.gmail.com> I confirm that I can reproduce this bug on my system too (it-IT). See below for a simpler test case: >>> puts 1.1 1,1 => nil >>> p 1.1 1.1 => nil The problem is in IoOps.ToPrintedString, where there is indeed an obj.ToString() for doubles. Converting it with Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture) seems to fix the issue, but I have just tried it in the REPL without running the test suite yet. If you want, I can commit this fix in my repository if it passes the tests. On Thu, Apr 16, 2009 at 09:58, Thibaut Barr?re wrote: >> Yes, these are all suppose to pass ... they run "mspec ci" which is the continuous integration mode ... which omits "critical" or "fails" tagged tests. >> >> It'd be good to know where IronRuby falls over in different cultures, so feel free to report bugs on codeplex about these things. > > thanks - I added the first one here: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 > > and will add or fix more as I go. > > -- Thibaut > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From thibaut.barrere at gmail.com Thu Apr 16 06:10:30 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Thu, 16 Apr 2009 12:10:30 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <3bf20550904160259p7ca605f3uaab96de87b9d5f65@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> <4a68b8cf0904160058i1d92207dm31f49cb73ff3c224@mail.gmail.com> <3bf20550904160259p7ca605f3uaab96de87b9d5f65@mail.gmail.com> Message-ID: <4a68b8cf0904160310yfc592b3o460f6bb76cf0573d@mail.gmail.com> Haya, > The problem is in IoOps.ToPrintedString, where there is indeed an > obj.ToString() for doubles. Converting it with Convert.ToString(obj, > System.Globalization.CultureInfo.InvariantCulture) seems to fix the > issue, but I have just tried it in the REPL without running the test > suite yet. If you want, I can commit this fix in my repository if it > passes the tests. puts 1.1 gives 1,1 here too. Please commit the fix, this way I'll be able to see if this solves other failing tests in french too (I suppose it will). I'll have to figure out how to cherry pick one commit from your branch, the git way :) -- Thibaut From jirapong.nanta at gmail.com Thu Apr 16 07:36:12 2009 From: jirapong.nanta at gmail.com (jirapong.nanta at gmail.com) Date: Thu, 16 Apr 2009 18:36:12 +0700 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> Message-ID: <6C42AD11-DBED-4C18-8F4D-C6029B6566D9@gmail.com> I got 14 warning as well, My workaround was to change a Target Framework to .NET 3.5 Thanks, -Jirapong On Apr 15, 2009, at 8:15 PM, Thibaut Barr?re wrote: > Some notes as I go though the contributing process, in hope that will > be useful to make it smoother: > - after a clean checkout and launching dev.bat, brbd would not compile > (today). I believe it reported a missing microsoft.scripting.dll > issue. > - opening the solution in VS2008 shows 14 warnings about referenced > components that cannot be found (System, mscorlib, System.Net), not > sure if that's an issue or not > - compiling through VS2008 makes the compile using brbd works > afterwards. > - first pass at launching irtests opens a bunch of windows - most of > them fail with failure to load default.mspec (see [1]) - after > searching, the message was caused by an old .mspecrc that was sitting > in my home folder. Removing it solved the issue. > - I noticed a runfirst.cmd, should I actually run it or is it obsolete > ? It seems to have an error in it (references default.mspec.rb which > has been renamed to default.mspec since). > - on a french machine, the MiscTests/NumericLiterals1 fails see [2] - > sounds like a missing InvariantCulture in a float ToString call. I'll > look into it unless someone fixes it in between. > > On irtests execution: the end of irtests launches irtest.bat, run.bat > and 4 mspec in parallels ("start" calls). Is there a need for that (ie > one process that monitors the others) or could it be run sequentially > if it's more comfortable for me ? The load is putting my machine down > on its knees. > > cheers, > > -- Thibaut > > ===== [1] mspec error ===== > > IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 > :0:in `load': no such file to load -- > C:\git\ironruby\Merlin\Main\..\External\Languages\IronRuby\mspec > \default.mspec > (LoadError) > > ===== [2] NumericLiterals1 failure ===== > > 1) NumericLiterals1 > c:\git\ironruby\Merlin\Main\Languages\Ruby\IronRuby.Tests\Runtime > \MiscTests.cs > : 411 > Unexpected output: > > '1\r\n-1\r\n1\r\n1,1\r\n-1,1\r\n1,1\r\n2.0\r\n2.0\r\n2,156\r\n'. > > First difference (8): > actual = ',' > expected = '.' > > Repro: C:\git\ironruby\Merlin\Main\bin\debug\IronRuby.Tests.exe > NumericLiterals1 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Thu Apr 16 11:30:07 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 16 Apr 2009 15:30:07 +0000 Subject: [Ironruby-core] "mspec ci" throws an exception Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD16F4785B@TK5EX14MBXC101.redmond.corp.microsoft.com> Please file a bug against me. I need to add a ci_files set in the config. JD -----Original Message----- From: Thibaut Barr?re Sent: April 16, 2009 1:27 AM To: ironruby-core Subject: [Ironruby-core] "mspec ci" throws an exception Hi, should I open a bug on codeplex for that ? Is anyone else meeting the same issue ? (details below) C:\Git\ironruby\Merlin\Main\Languages\Ruby>mspec ci IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 script.rb:172:in `files': undefined method `inject' for nil:NilClass (NoMethodError) from mspec-ci.rb:11:in `options' from script.rb:189:in `main' from mspec-ci:0 I had a closer look and saw that the files methods in script.rb is passed a nil files argument. This is caused by C:\git\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\lib\mspec\commands\mspec-ci.rb line 54: patterns = config[:ci_files] if patterns.empty? config[:ci_files] is nil. I searched for ci_files on all the files but can't find anything that would set this key in the hash (except for tests). -- Thibaut _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From suppakilla at gmail.com Thu Apr 16 11:14:16 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 16 Apr 2009 17:14:16 +0200 Subject: [Ironruby-core] Some feedback on the compile/test process In-Reply-To: <4a68b8cf0904160335x44100e04u90420a072cfe9374@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904150657v65a07275se35a31e08fb64ec6@mail.gmail.com> <4a68b8cf0904160058i1d92207dm31f49cb73ff3c224@mail.gmail.com> <3bf20550904160259p7ca605f3uaab96de87b9d5f65@mail.gmail.com> <4a68b8cf0904160310yfc592b3o460f6bb76cf0573d@mail.gmail.com> <4a68b8cf0904160335x44100e04u90420a072cfe9374@mail.gmail.com> Message-ID: <3bf20550904160814hef3b792l5992d521f632f843@mail.gmail.com> On Thu, Apr 16, 2009 at 12:35, Thibaut Barr?re wrote: > I ran the whole irtests suite after applying the attached patch, based > on what Daniel described. You can find a slightly modified patch attached to this mail, this is what I'm going to push on my repository. I think this one is better than the first one as it removes the overhead of Convert.ToString and it reduces the number of unboxing operations from object to double. -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs index 6da6a3d..0d18961 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs @@ -621,22 +621,23 @@ namespace IronRuby.Builtins { if ((list = obj as List) != null) { return IListOps.Join(tosConversion, list, NewLine); } else if ((hash = obj as IDictionary) != null) { return IDictionaryOps.ToMutableString(tosConversion, hash); } else if (obj == null) { return MutableString.Create("nil"); } else if (obj is bool) { return MutableString.Create((bool)obj ? "true" : "false"); } else if (obj is double) { - var result = MutableString.Create(obj.ToString()); - if ((double)(int)(double)obj == (double)obj) { + double value = (double)obj; + var result = MutableString.Create(value.ToString(System.Globalization.CultureInfo.InvariantCulture)); + if ((double)(int)value == value) { result.Append(".0"); } return result; } else if ((str = obj as MutableString) != null) { return str; } else { return Protocols.ConvertToString(tosConversion, obj); } } From ben2004uk at googlemail.com Thu Apr 16 11:59:12 2009 From: ben2004uk at googlemail.com (Ben Hall) Date: Thu, 16 Apr 2009 16:59:12 +0100 Subject: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string? Message-ID: Hello, Just hosted the DLR within an application to allow users some scripting functionality. Part of the functionality is that you can call a C# method and have a string returned. However, the string is always being returned as a ClrString which means methods like << don't work which is annoying. Having to write to_s after every call isn't great for my nice clean DSL :) How can I get around this? I want my C# method to return Ruby string. Thanks Ben From ivan at flanders.co.nz Thu Apr 16 12:12:07 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 16 Apr 2009 18:12:07 +0200 Subject: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string? In-Reply-To: References: Message-ID: Monkey patch ClrString with the methods you need? Or make your C# method return MutableString if you are able to --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Apr 16, 2009 at 5:59 PM, Ben Hall wrote: > Hello, > > Just hosted the DLR within an application to allow users some > scripting functionality. Part of the functionality is that you can > call a C# method and have a string returned. However, the string is > always being returned as a ClrString which means methods like << don't > work which is annoying. Having to write to_s after every call isn't > great for my nice clean DSL :) > > How can I get around this? I want my C# method to return Ruby string. > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Thu Apr 16 13:27:06 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 16 Apr 2009 10:27:06 -0700 Subject: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string? In-Reply-To: References: Message-ID: Do you have the latest build of IronRuby? Non-mutable Ruby methods are implemented there on CLR strings. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, April 16, 2009 9:12 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string? Monkey patch ClrString with the methods you need? Or make your C# method return MutableString if you are able to --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Apr 16, 2009 at 5:59 PM, Ben Hall > wrote: Hello, Just hosted the DLR within an application to allow users some scripting functionality. Part of the functionality is that you can call a C# method and have a string returned. However, the string is always being returned as a ClrString which means methods like << don't work which is annoying. Having to write to_s after every call isn't great for my nice clean DSL :) How can I get around this? I want my C# method to return Ruby string. Thanks Ben _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Thu Apr 16 13:44:01 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 16 Apr 2009 10:44:01 -0700 Subject: [Ironruby-core] [patch] More fixes for Array (IListOps.cs) In-Reply-To: <3bf20550904160228m4e4ab77fq60016230bec33cd4@mail.gmail.com> References: <3bf20550904150930g472bfc3q72f9083c421df656@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEAC0@NA-EXMSG-C104.redmond.corp.microsoft.com> <3bf20550904160228m4e4ab77fq60016230bec33cd4@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19EDED85@NA-EXMSG-C104.redmond.corp.microsoft.com> Result of "git diff HEAD~1 -U15" would be nice if you can remember to include it, but don?t worry about it too much. I will try to deal with the github.com web view and see if it bothers me too much. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Thursday, April 16, 2009 2:28 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [patch] More fixes for Array (IListOps.cs) On Thu, Apr 16, 2009 at 01:14, Shri Borde wrote: > In IListOps.Fetch, instead of doing the protocol conversion manually, > you should calls Protocols. ConvertToInteger. Tomas, can you double-check this? Hmm, right, and the code looks much more cleaner too. I think I should just use Protocols.CastToFixnum then: we don't really care about bignums here, they can't be used as indexes for arrays anyway and in fact MRI throws a RangeError "bignum too big to convert into `long'". > In IListOps.First, you can get rid of the allocateStorage argument as > its not being used anymore. (You can batch this fix with your next > commit) Same for IListOps.Last, it just slipped away. I removed allocateStorage on both. > Btw, could you please increase the diff context size to 15-20 so more > of the surrounding lines are included? That makes it easier to > understand what the fix is doing when using the url below, without > having to map that back to the correct line number in the actual file. I guess there is no way to increase the lines range of a diff viewed via the github web interface, but I can generate and attach custom diff patches to my mails if you think it could be useful, just like the one attached to this mail and generated with "git diff HEAD~1 -U15 > patch.diff" (PS: I have not yet pushed this commit on my remote repository). -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Shri.Borde at microsoft.com Thu Apr 16 13:51:09 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 16 Apr 2009 10:51:09 -0700 Subject: [Ironruby-core] irtests.bat spawning multiple processes In-Reply-To: <4a68b8cf0904160057i609e533ege3a4ee1e71998bc4@mail.gmail.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904160057i609e533ege3a4ee1e71998bc4@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19EDED97@NA-EXMSG-C104.redmond.corp.microsoft.com> Thibaut, I have a change to irtests.bat which will give an option to run the tests in series or in parallel. I will push this through in my next commit so folks can chose how they want to run the tests... The one issue with running in series is that if a task fails, you want to run the remaining tasks as well so that you can have the full list of failures. However, if you just keep running all tasks in series, the output of the failing task can scroll out, and then you lose the information of which test failed. The right solution is to redirect the output of all the tasks so that you can inspect the log files to see the details of the failure. Setting up the output redirection, etc, is more work. A rake task would be nice so that all the logic can be written in Ruby rather than in irtests.bat. I will leave this for another day. Let's see how far irtests.bat can scale... Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 16, 2009 12:58 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Some feedback on the compile/test process Hi Jimmy, thanks for the feedback - comments inlined below: > Please remove the ClrAssembly.csproj file from the solution ... then all will build fine. That will be removed shortly. thanks. >> - opening the solution in VS2008 shows 14 warnings about referenced >> components that cannot be found (System, mscorlib, System.Net), not >> sure if that's an issue or not > > Hmm, weird. The build configuration was definitely Debug, not "Silverlight Debug" or something like that? It is Debug, not Silverlight Debug. I looked at the .csproj and saw conditional references to these dll when SilverlightDebug is set. It seems that the condition is not evaluated properly. Not a big deal though, it seems to work, but could lead to weird things I guess. >> - I noticed a runfirst.cmd, should I actually run it or is it obsolete >> ? It seems to have an error in it (references default.mspec.rb which >> has been renamed to default.mspec since). > > Runfirst.cmd should be removed, dev.bat is what you want ok, thanks. > >> - on a french machine, the MiscTests/NumericLiterals1 fails see [2] - >> sounds like a missing InvariantCulture in a float ToString call. I'll >> look into it unless someone fixes it in between. > > Please track this with a bug on codeplex, someone else might have context. Done: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 >> On irtests execution: the end of irtests launches irtest.bat, run.bat >> and 4 mspec in parallels ("start" calls). Is there a need for that (ie >> one process that monitors the others) or could it be run sequentially >> if it's more comfortable for me ? The load is putting my machine down >> on its knees. > > You could make a version of irtest that does them sequentially Thanks - much faster. -- Thibaut _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Thu Apr 16 14:01:56 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 16 Apr 2009 18:01:56 +0000 Subject: [Ironruby-core] irtests.bat spawning multiple processes Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD16F48198@TK5EX14MBXC101.redmond.corp.microsoft.com> Mspec will output to a file with the -o parameter (I believe) JD -----Original Message----- From: Shri Borde Sent: April 16, 2009 10:56 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] irtests.bat spawning multiple processes Thibaut, I have a change to irtests.bat which will give an option to run the tests in series or in parallel. I will push this through in my next commit so folks can chose how they want to run the tests... The one issue with running in series is that if a task fails, you want to run the remaining tasks as well so that you can have the full list of failures. However, if you just keep running all tasks in series, the output of the failing task can scroll out, and then you lose the information of which test failed. The right solution is to redirect the output of all the tasks so that you can inspect the log files to see the details of the failure. Setting up the output redirection, etc, is more work. A rake task would be nice so that all the logic can be written in Ruby rather than in irtests.bat. I will leave this for another day. Let's see how far irtests.bat can scale... Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Thursday, April 16, 2009 12:58 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Some feedback on the compile/test process Hi Jimmy, thanks for the feedback - comments inlined below: > Please remove the ClrAssembly.csproj file from the solution ... then all will build fine. That will be removed shortly. thanks. >> - opening the solution in VS2008 shows 14 warnings about referenced >> components that cannot be found (System, mscorlib, System.Net), not >> sure if that's an issue or not > > Hmm, weird. The build configuration was definitely Debug, not "Silverlight Debug" or something like that? It is Debug, not Silverlight Debug. I looked at the .csproj and saw conditional references to these dll when SilverlightDebug is set. It seems that the condition is not evaluated properly. Not a big deal though, it seems to work, but could lead to weird things I guess. >> - I noticed a runfirst.cmd, should I actually run it or is it obsolete >> ? It seems to have an error in it (references default.mspec.rb which >> has been renamed to default.mspec since). > > Runfirst.cmd should be removed, dev.bat is what you want ok, thanks. > >> - on a french machine, the MiscTests/NumericLiterals1 fails see [2] - >> sounds like a missing InvariantCulture in a float ToString call. I'll >> look into it unless someone fixes it in between. > > Please track this with a bug on codeplex, someone else might have context. Done: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=597 >> On irtests execution: the end of irtests launches irtest.bat, run.bat >> and 4 mspec in parallels ("start" calls). Is there a need for that (ie >> one process that monitors the others) or could it be run sequentially >> if it's more comfortable for me ? The load is putting my machine down >> on its knees. > > You could make a version of irtest that does them sequentially Thanks - much faster. -- Thibaut _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ben2004uk at googlemail.com Thu Apr 16 16:53:19 2009 From: ben2004uk at googlemail.com (Ben Hall) Date: Thu, 16 Apr 2009 21:53:19 +0100 Subject: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string? In-Reply-To: References: Message-ID: I am using 0.3 build but I can grab the latest tomorrow. If that fails I will give MutableString strings a try - thanks for the responses :) On Thu, Apr 16, 2009 at 6:27 PM, Tomas Matousek wrote: > Do you have the latest build of IronRuby? > > Non-mutable Ruby methods are implemented there on CLR strings. > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero > Sent: Thursday, April 16, 2009 9:12 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] C# method returns string to IronRuby - how it > automatically be a IronRuby string? > > > > Monkey patch ClrString with the methods you need? > Or make your C# method return MutableString if you are able to > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > GSM: +32.486.787.582 > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > On Thu, Apr 16, 2009 at 5:59 PM, Ben Hall wrote: > > Hello, > > Just hosted the DLR within an application to allow users some > scripting functionality. ?Part of the functionality is that you can > call a C# method and have a string returned. However, the string is > always being returned as a ClrString which means methods like << don't > work which is annoying. ?Having to write to_s after every call isn't > great for my nice clean DSL :) > > How can I get around this? I want my C# method to return Ruby string. > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From suppakilla at gmail.com Thu Apr 16 17:20:29 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 16 Apr 2009 23:20:29 +0200 Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Message-ID: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> Hi, I have just filed this bug on CodePlex: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=605 It is actually pretty easy to fix with a bunch of lines of code in RubyArray.GetHashCode (just tested, too bad IronRuby.dll is not open to contributions) and, as a result, this would resolve the following 4 critical failures for the array core specs: Array#hash properly handles recursive arrays Array#| properly handles recursive arrays Array#uniq properly handles recursive arrays Array#uniq! properly handles recursive arrays Regards -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Shri.Borde at microsoft.com Thu Apr 16 18:05:48 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 16 Apr 2009 15:05:48 -0700 Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays In-Reply-To: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> References: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19EDEF63@NA-EXMSG-C104.redmond.corp.microsoft.com> I can fix RubyArray.GetHashCode to handle the simple case of an array containing itself. However, the simple fix wont deal with the case where the array is indirectly recursive as in this snippet. a = [] b = [a] a< References: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF63@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19EDEF88@NA-EXMSG-C104.redmond.corp.microsoft.com> Curt pointed out a way to fix the recursive case using RubyUtils.RecursionTracker... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Thursday, April 16, 2009 3:06 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays I can fix RubyArray.GetHashCode to handle the simple case of an array containing itself. However, the simple fix wont deal with the case where the array is indirectly recursive as in this snippet. a = [] b = [a] a< References: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF63@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF88@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <3bf20550904161528n11f3d24claafba5d8e1ff0b41@mail.gmail.com> Great, that's exactly what I used :-) Thanks On Fri, Apr 17, 2009 at 00:22, Shri Borde wrote: > Curt pointed out a way to fix the recursive case using RubyUtils.RecursionTracker... > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde > Sent: Thursday, April 16, 2009 3:06 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > I can fix RubyArray.GetHashCode to handle the simple case of an array containing itself. > > However, the simple fix wont deal with the case where the array is indirectly recursive as in this snippet. > ?a = [] > ?b = [a] > ?a< > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Thursday, April 16, 2009 2:20 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > Hi, > > I have just filed this bug on CodePlex: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=605 > > It is actually pretty easy to fix with a bunch of lines of code in > RubyArray.GetHashCode (just tested, too bad IronRuby.dll is not open > to contributions) and, as a result, this would resolve the following 4 > critical failures for the array core specs: > > Array#hash properly handles recursive arrays > Array#| properly handles recursive arrays > Array#uniq properly handles recursive arrays > Array#uniq! properly handles recursive arrays > > Regards > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Tomas.Matousek at microsoft.com Thu Apr 16 19:05:34 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 16 Apr 2009 16:05:34 -0700 Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays In-Reply-To: <3bf20550904161528n11f3d24claafba5d8e1ff0b41@mail.gmail.com> References: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF63@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF88@NA-EXMSG-C104.redmond.corp.microsoft.com> <3bf20550904161528n11f3d24claafba5d8e1ff0b41@mail.gmail.com> Message-ID: Does Ruby call "hash" dynamically on each element of the array? If not then there is no need for RecursionTracker. A simple non-recursive DFS with a dictionary that remembers visited objects should do. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Thursday, April 16, 2009 3:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Great, that's exactly what I used :-) Thanks On Fri, Apr 17, 2009 at 00:22, Shri Borde wrote: > Curt pointed out a way to fix the recursive case using RubyUtils.RecursionTracker... > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde > Sent: Thursday, April 16, 2009 3:06 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > I can fix RubyArray.GetHashCode to handle the simple case of an array containing itself. > > However, the simple fix wont deal with the case where the array is indirectly recursive as in this snippet. > ?a = [] > ?b = [a] > ?a< > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Thursday, April 16, 2009 2:20 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > Hi, > > I have just filed this bug on CodePlex: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=605 > > It is actually pretty easy to fix with a bunch of lines of code in > RubyArray.GetHashCode (just tested, too bad IronRuby.dll is not open > to contributions) and, as a result, this would resolve the following 4 > critical failures for the array core specs: > > Array#hash properly handles recursive arrays > Array#| properly handles recursive arrays > Array#uniq properly handles recursive arrays > Array#uniq! properly handles recursive arrays > > Regards > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Thu Apr 16 19:07:53 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 16 Apr 2009 16:07:53 -0700 Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays References: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF63@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF88@NA-EXMSG-C104.redmond.corp.microsoft.com> <3bf20550904161528n11f3d24claafba5d8e1ff0b41@mail.gmail.com> Message-ID: See RubyFileOps.Join for an example. Tomas -----Original Message----- From: Tomas Matousek Sent: Thursday, April 16, 2009 4:06 PM To: ironruby-core at rubyforge.org Subject: RE: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Does Ruby call "hash" dynamically on each element of the array? If not then there is no need for RecursionTracker. A simple non-recursive DFS with a dictionary that remembers visited objects should do. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Thursday, April 16, 2009 3:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Great, that's exactly what I used :-) Thanks On Fri, Apr 17, 2009 at 00:22, Shri Borde wrote: > Curt pointed out a way to fix the recursive case using RubyUtils.RecursionTracker... > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde > Sent: Thursday, April 16, 2009 3:06 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > I can fix RubyArray.GetHashCode to handle the simple case of an array containing itself. > > However, the simple fix wont deal with the case where the array is indirectly recursive as in this snippet. > ?a = [] > ?b = [a] > ?a< > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Thursday, April 16, 2009 2:20 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > Hi, > > I have just filed this bug on CodePlex: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=605 > > It is actually pretty easy to fix with a bunch of lines of code in > RubyArray.GetHashCode (just tested, too bad IronRuby.dll is not open > to contributions) and, as a result, this would resolve the following 4 > critical failures for the array core specs: > > Array#hash properly handles recursive arrays > Array#| properly handles recursive arrays > Array#uniq properly handles recursive arrays > Array#uniq! properly handles recursive arrays > > Regards > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Thu Apr 16 22:00:22 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Thu, 16 Apr 2009 19:00:22 -0700 Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays In-Reply-To: References: <3bf20550904161420s13f95353o8c91b84b09214e60@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF63@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E19EDEF88@NA-EXMSG-C104.redmond.corp.microsoft.com> <3bf20550904161528n11f3d24claafba5d8e1ff0b41@mail.gmail.com> Message-ID: The simple test I did suggested that MRI dynamically calls hash on each element of the array. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Thursday, April 16, 2009 4:08 PM To: Tomas Matousek; ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays See RubyFileOps.Join for an example. Tomas -----Original Message----- From: Tomas Matousek Sent: Thursday, April 16, 2009 4:06 PM To: ironruby-core at rubyforge.org Subject: RE: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Does Ruby call "hash" dynamically on each element of the array? If not then there is no need for RecursionTracker. A simple non-recursive DFS with a dictionary that remembers visited objects should do. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Thursday, April 16, 2009 3:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Great, that's exactly what I used :-) Thanks On Fri, Apr 17, 2009 at 00:22, Shri Borde wrote: > Curt pointed out a way to fix the recursive case using RubyUtils.RecursionTracker... > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde > Sent: Thursday, April 16, 2009 3:06 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > I can fix RubyArray.GetHashCode to handle the simple case of an array containing itself. > > However, the simple fix wont deal with the case where the array is indirectly recursive as in this snippet. > ?a = [] > ?b = [a] > ?a< > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Thursday, April 16, 2009 2:20 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays > > Hi, > > I have just filed this bug on CodePlex: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=605 > > It is actually pretty easy to fix with a bunch of lines of code in > RubyArray.GetHashCode (just tested, too bad IronRuby.dll is not open > to contributions) and, as a result, this would resolve the following 4 > critical failures for the array core specs: > > Array#hash properly handles recursive arrays > Array#| properly handles recursive arrays > Array#uniq properly handles recursive arrays > Array#uniq! properly handles recursive arrays > > Regards > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From thibaut.barrere at gmail.com Fri Apr 17 09:13:59 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 17 Apr 2009 15:13:59 +0200 Subject: [Ironruby-core] irtests.bat spawning multiple processes In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E19EDED97@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <4a68b8cf0904150615n3ea0a59q79067cf74e66fc38@mail.gmail.com> <4a68b8cf0904160057i609e533ege3a4ee1e71998bc4@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDED97@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0904170613q7832f9b9h838eef22187674bf@mail.gmail.com> Hi Shri, > Thibaut, I have a change to irtests.bat which will give an option to run the tests in series or in parallel. I will push this through in my next commit so folks can chose how they want to run the tests... > > The one issue with running in series is that if a task fails, you want to run the remaining tasks as well so that you can have the full list of failures. However, if you just keep running all tasks in series, the output of the failing task can scroll out, and then you lose the information of which test failed. The right solution is to redirect the output of all the tasks so that you can inspect the log files to see the details of the failure. > > Setting up the output redirection, etc, is more work. A rake task would be nice so that all the logic can be written in Ruby rather than in irtests.bat. I will leave this for another day. Let's see how far irtests.bat can scale... thanks for the change! And yeah, let's see how the batch can scale. If it gets boring, I'll try to take a stab at redirecting output. cheers -- Thibaut From thibaut.barrere at gmail.com Fri Apr 17 09:20:51 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 17 Apr 2009 15:20:51 +0200 Subject: [Ironruby-core] "mspec ci" throws an exception In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD16F4785B@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <0AB34E2BFBE88245B073D2D83B4245FD16F4785B@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0904170620y7d7109adh65bf31f43135393f@mail.gmail.com> Hi Jim, > Please file a bug against me. I need to add a ci_files set in the config. Added bug "ci files set needed in mspec config" (http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=614) It seems that I can't assign it to you though. -- Thibaut From lists at ruby-forum.com Fri Apr 17 12:51:34 2009 From: lists at ruby-forum.com (Eoin Hennessy) Date: Fri, 17 Apr 2009 18:51:34 +0200 Subject: [Ironruby-core] Silverlight B3 - Positioning an element within a Canvas Message-ID: <9a643dbd3bd363b5b662747d36ad0288@ruby-forum.com> Hi there, I have a very simple hello-world type IronRuby+Silverlight application based on the AGDLR samples. It consists of a Canvas containing a single Rectangle. I am attempting to position the Rectangle within the Canvas as follows: layout_root.rect.set_value(Canvas.TopProperty, 0.0) However, this is leading to the following exception: MethodAccessException: System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, Double) MethodAccessException at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags) ... The full trace is at: http://gist.github.com/97116 What is the preferred method of positioning an element at a Point within a Canvas? Thanks. -- Posted via http://www.ruby-forum.com/. From thibaut.barrere at gmail.com Fri Apr 17 15:37:56 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 17 Apr 2009 21:37:56 +0200 Subject: [Ironruby-core] Silverlight B3 - Positioning an element within a Canvas In-Reply-To: <9a643dbd3bd363b5b662747d36ad0288@ruby-forum.com> References: <9a643dbd3bd363b5b662747d36ad0288@ruby-forum.com> Message-ID: <4a68b8cf0904171237ve6a6783q347689274591d3e8@mail.gmail.com> Hi, > ?layout_root.rect.set_value(Canvas.TopProperty, 0.0) I've been experimenting the same error a couple of weeks ago. I'm not sure why these specific property types calls fail. I'd love to have a solution for that, or at least a workaround. -- Thibaut From thibaut.barrere at gmail.com Fri Apr 17 16:08:23 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 17 Apr 2009 22:08:23 +0200 Subject: [Ironruby-core] platform_is fix needed ? Message-ID: <4a68b8cf0904171308l1d1a4390ka1eddada4281a8ff@mail.gmail.com> Hi, system_spec.rb fails all its tests because the before(:each) calls platform_is(:windows) without a block, while it appears to require one. Can I just fix this specific spec by using platform_is + platform_is_not instead, or is it better to fix platform_is to allow calls without blocks ? I'd prefer the former because it sounds simpler. what do you think ? -- Thibaut From jdeville at microsoft.com Fri Apr 17 16:38:40 2009 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 17 Apr 2009 20:38:40 +0000 Subject: [Ironruby-core] platform_is fix needed ? Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD18410157@TK5EX14MBXC102.redmond.corp.microsoft.com> I'm doing an update to the specs right now, so can we wait until that goes through, then see if it is still an issue? Thanks -----Original Message----- From: Thibaut Barr?re Sent: April 17, 2009 1:09 PM To: ironruby-core Subject: [Ironruby-core] platform_is fix needed ? Hi, system_spec.rb fails all its tests because the before(:each) calls platform_is(:windows) without a block, while it appears to require one. Can I just fix this specific spec by using platform_is + platform_is_not instead, or is it better to fix platform_is to allow calls without blocks ? I'd prefer the former because it sounds simpler. what do you think ? -- Thibaut _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From thibaut.barrere at gmail.com Fri Apr 17 16:45:33 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 17 Apr 2009 22:45:33 +0200 Subject: [Ironruby-core] platform_is fix needed ? In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD18410157@TK5EX14MBXC102.redmond.corp.microsoft.com> References: <0AB34E2BFBE88245B073D2D83B4245FD18410157@TK5EX14MBXC102.redmond.corp.microsoft.com> Message-ID: <4a68b8cf0904171345p1acee7f7k1386eb137e9d99ea@mail.gmail.com> > I'm doing an update to the specs right now, so can we wait until that goes through, then see if it is still an issue? Sure. If it still fails after the update, I pushed a fix here: http://github.com/thbar/ironruby/commit/87a9613939942ab50ae5a152c2f84a61e55d99f5 (one remaining failure after that). -- Thibaut From suppakilla at gmail.com Sat Apr 18 07:31:19 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Sat, 18 Apr 2009 13:31:19 +0200 Subject: [Ironruby-core] More fixes for core/array specs Message-ID: <3bf20550904180431k2bd15d59paaf6b9c05f242f67@mail.gmail.com> Hi, http://github.com/nrk/ironruby/commit/4afc7f1bc44b007a9dca30e6330eca35d487f165 This commit resolves the following failing specs: Array#<=> properly handles recursive arrays (critical) Array#initialize with (size, object=nil) uses the block value instead of using the default value Array#to_a does not return subclass instance on Array subclasses Array#uniq! raises a TypeError on a frozen array if modification would take place Array#values_at returns an array of elements in the ranges when passes ranges >From the commit message: * Removed unused allocateStorage argument from IListOps.First and IListOps.Last; Removed the manual protocol conversion bits in IListOps.Fetch * Fix IoOps.ToPrintedString to output a double converted to string using an invariant culture (Issue #597 NumericLiterals1 test fails under french culture) * IListOps.ValuesAt adds a null value to the result if the begin value of the specified range instance(s) is <= the length of the array and the end value is >= the length of the array. * Array#uniq! raises a TypeError on a frozen array if modification would take place. * Fixed ArrayOps.ToArray to return a new RubyArray instance with the elements of self if self is a RubyArray.Subclass. * Array#initialize with (size, object=nil) uses the block value instead of using the default value * Fixed IListOps.Compare to work with recursive arrays. A diff is attached to this mail. PS: This completes my previous commit by removing unused allocateStorage arguments from IListOps.First and IListOps.Last. Thanks, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/comparison_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/comparison_tags.txt deleted file mode 100644 index d0121c0..0000000 --- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/comparison_tags.txt +++ /dev/null @@ -1 +0,0 @@ -critical:Array#<=> properly handles recursive arrays diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/initialize_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/initialize_tags.txt index 35d6855..1177323 100644 --- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/initialize_tags.txt +++ b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/initialize_tags.txt @@ -1,2 +1 @@ fails:Array#initialize with (size, object=nil) raises an ArgumentError if size is too large -fails:Array#initialize with (size, object=nil) uses the block value instead of using the default value diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to_a_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to_a_tags.txt deleted file mode 100644 index 9bf9c4a..0000000 --- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/to_a_tags.txt +++ /dev/null @@ -1 +0,0 @@ -fails:Array#to_a does not return subclass instance on Array subclasses diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/uniq_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/uniq_tags.txt index f6f226d..8cad6e1 100644 --- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/uniq_tags.txt +++ b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/uniq_tags.txt @@ -1,3 +1,2 @@ critical:Array#uniq properly handles recursive arrays critical:Array#uniq! properly handles recursive arrays -fails:Array#uniq! raises a TypeError on a frozen array if modification would take place diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/values_at_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/values_at_tags.txt deleted file mode 100644 index 96856f9..0000000 --- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/array/values_at_tags.txt +++ /dev/null @@ -1 +0,0 @@ -fails:Array#values_at returns an array of elements in the ranges when passes ranges diff --git a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/critical_tags.txt b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/critical_tags.txt index ea9f7cf..4ecf865 100644 --- a/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/critical_tags.txt +++ b/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/critical_tags.txt @@ -4,31 +4,30 @@ core\argf\eof_tags.txt:0:critical:ARGF.eof returns true when reaching the end of core\argf\file_tags.txt:0:critical:ARGF.file returns the current file object on each file core\argf\filename_tags.txt:0:critical:ARGF.filename returns the current file name on each file core\argf\filename_tags.txt:0:critical:ARGF.filename it sets the $FILENAME global variable with the current file name on each file core\argf\fileno_tags.txt:0:critical:ARGF.fileno returns the current file number on each file core\argf\gets_tags.txt:0:critical:ARGF.gets reads one line of a file core\argf\gets_tags.txt:0:critical:ARGF.gets reads all lines of a file core\argf\gets_tags.txt:0:critical:ARGF.gets reads all lines of two files core\argf\gets_tags.txt:0:critical:ARGF.gets returns nil when reaching end of files core\argf\gets_tags.txt:0:critical:ARGF.gets sets $_ global variable with each line read core\argf\lineno_tags.txt:0:critical:ARGF.lineno returns the current line number on each file core\argf\path_tags.txt:0:critical:ARGF.path returns the current file name on each file core\argf\path_tags.txt:0:critical:ARGF.path it sets the $FILENAME global variable with the current file name on each file core\argf\rewind_tags.txt:0:critical:ARGF.rewind goes back to beginning of current file core\argf\to_i_tags.txt:0:critical:ARGF.to_i returns the current file number on each file core\argf\to_io_tags.txt:0:critical:ARGF.to_io returns the IO of the current file -core\array\comparison_tags.txt:0:critical:Array#<=> properly handles recursive arrays core\array\eql_tags.txt:0:critical:Array#eql? properly handles recursive arrays core\array\equal_value_tags.txt:0:critical:Array#== properly handles recursive arrays core\array\hash_tags.txt:0:critical:Array#hash properly handles recursive arrays core\array\hash_tags.txt:0:critical:Array#hash properly handles recursive arrays core\array\intersection_tags.txt:0:critical:Array#& properly handles recursive arrays core\array\join_tags.txt:0:critical:Array#join raises a NoMethodError if an element does not respond to #to_s core\array\join_tags.txt:0:critical:Array#join does not separates elements when the passed separator is nil core\array\union_tags.txt:0:critical:Array#| properly handles recursive arrays core\array\uniq_tags.txt:0:critical:Array#uniq properly handles recursive arrays core\array\uniq_tags.txt:0:critical:Array#uniq! properly handles recursive arrays core\kernel\sleep_tags.txt:3:critical:Kernel#sleep pauses execution indefinitely if not given a duration core\process\times_tags.txt:0:unstable:Process.times returns current cpu times core\string\process\wait_tags.txt:0:critical:Process.wait core\string\process\wait2_tags.txt:0:critical:Process.wait2 core\string\process\waitall_tags.txt:0:critical:Process.waitall diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArrayOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArrayOps.cs index 10fb9ec..8b72440 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArrayOps.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArrayOps.cs @@ -94,30 +94,42 @@ namespace IronRuby.Builtins { } private static RubyArray/*!*/ Reinitialize(RubyArray/*!*/ self, IList/*!*/ other) { Assert.NotNull(self, other); if (other != self) { self.Clear(); IListOps.AddRange(self, other); } return self; } private static object CreateArray(BlockParam/*!*/ block, int size) { return Reinitialize(block, new RubyArray(), size); } + [RubyConstructor] + public static RubyArray/*!*/ CreateArray(BlockParam/*!*/ block, RubyClass/*!*/ self, [DefaultProtocol]int size, object value) { + return Reinitialize(block, new RubyArray(), size, value); + } + + [RubyMethod("initialize", RubyMethodAttributes.PrivateInstance)] + public static RubyArray/*!*/ Reinitialize(BlockParam/*!*/ block, RubyArray/*!*/ self, int size, object value) { + block.RubyContext.ReportWarning("block supersedes default value argument"); + Reinitialize(block, self, size); + return self; + } + private static object Reinitialize(BlockParam/*!*/ block, RubyArray/*!*/ self, int size) { if (size < 0) { throw RubyExceptions.CreateArgumentError("negative array size"); } self.Clear(); for (int i = 0; i < size; i++) { object item; if (block.Yield(i, out item)) { return item; } self.Add(item); } return self; @@ -149,31 +161,31 @@ namespace IronRuby.Builtins { [RubyMethod("[]", RubyMethodAttributes.PublicSingleton)] public static RubyArray/*!*/ MakeArray(RubyClass/*!*/ self, params object[] args) { // neither "new" nor "initialize" is called: RubyArray result = RubyArray.CreateInstance(self); foreach (object obj in args) { result.Add(obj); } return result; } #endregion [RubyMethod("to_a")] [RubyMethod("to_ary")] public static RubyArray/*!*/ ToArray(RubyArray/*!*/ self) { - return self; + return self is RubyArray.Subclass ? new RubyArray(self) : self; } #region class FormatDirective is used by Array.pack and String.unpack internal struct FormatDirective { internal readonly char Directive; internal readonly int? Count; private static readonly Dictionary _native; static FormatDirective() { bool is64bit = (IntPtr.Size == 8); _native = new Dictionary(6); _native['s'] = 's'; _native['S'] = 'S'; _native['i'] = 'i'; diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs index 6da6a3d..0d18961 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/IoOps.cs @@ -616,32 +616,33 @@ namespace IronRuby.Builtins { public static MutableString/*!*/ ToPrintedString(ConversionStorage/*!*/ tosConversion, object obj) { IDictionary hash; List list; MutableString str; if ((list = obj as List) != null) { return IListOps.Join(tosConversion, list, NewLine); } else if ((hash = obj as IDictionary) != null) { return IDictionaryOps.ToMutableString(tosConversion, hash); } else if (obj == null) { return MutableString.Create("nil"); } else if (obj is bool) { return MutableString.Create((bool)obj ? "true" : "false"); } else if (obj is double) { - var result = MutableString.Create(obj.ToString()); - if ((double)(int)(double)obj == (double)obj) { + double value = (double)obj; + var result = MutableString.Create(value.ToString(System.Globalization.CultureInfo.InvariantCulture)); + if ((double)(int)value == value) { result.Append(".0"); } return result; } else if ((str = obj as MutableString) != null) { return str; } else { return Protocols.ConvertToString(tosConversion, obj); } } [RubyMethod("puts")] public static void PutsEmptyLine(BinaryOpStorage/*!*/ writeStorage, object self) { Protocols.Write(writeStorage, self, MutableString.CreateMutable("\n")); } diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs index f6a6fd8..8dd37de 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Extensions/IListOps.cs @@ -261,44 +261,52 @@ namespace IronRuby.Builtins { } if (self.Count != other.Count) { return false; } for (int i = 0; i < self.Count; ++i) { bool result = Protocols.IsEqual(equals, self[i], other[i]); if (!result) { return false; } } return true; } + [MultiRuntimeAware] + private static RubyUtils.RecursionTracker _infiniteComparisonTracker = new RubyUtils.RecursionTracker(); + [RubyMethod("<=>")] public static object Compare(BinaryOpStorage/*!*/ comparisonStorage, IList/*!*/ self, [DefaultProtocol, NotNull]IList/*!*/ other) { + using (IDisposable handle = _infiniteComparisonTracker.TrackObject(self)) { + if (handle == null) { + return 0; + } - int limit = Math.Min(self.Count, other.Count); - var compare = comparisonStorage.GetCallSite("<=>"); + int limit = Math.Min(self.Count, other.Count); + var compare = comparisonStorage.GetCallSite("<=>"); - for (int i = 0; i < limit; i++) { - object result = compare.Target(compare, self[i], other[i]); - if (!(result is int) || (int)result != 0) { - return result; + for (int i = 0; i < limit; i++) { + object result = compare.Target(compare, self[i], other[i]); + if (!(result is int) || (int)result != 0) { + return result; + } } - } - return ScriptingRuntimeHelpers.Int32ToObject(Math.Sign(self.Count - other.Count)); + return ScriptingRuntimeHelpers.Int32ToObject(Math.Sign(self.Count - other.Count)); + } } [RubyMethod("eql?")] public static bool HashEquals(IList/*!*/ self, object other) { return RubyArray.Equals(self, other); } [RubyMethod("hash")] public static int GetHashCode(IList/*!*/ self) { return RubyArray.GetHashCode(self); } #endregion #region slice, [], at @@ -723,51 +731,45 @@ namespace IronRuby.Builtins { if (block.Yield(i, out result)) { return result; } i++; } return self; } #endregion #region fetch [RubyMethod("fetch")] public static object Fetch( - RespondToStorage/*!*/ respondToStorage, - CallSiteStorage>/*!*/ toIntStorage, + ConversionStorage/*!*/ fixnumCast, BlockParam outOfRangeValueProvider, IList/*!*/ list, object/*!*/ index, [Optional]object defaultValue) { - if (!Protocols.RespondTo(respondToStorage, index, "to_int")) { - throw RubyExceptions.CannotConvertTypeToTargetType(respondToStorage.Context, index, "Integer"); - } - - var toInt = toIntStorage.GetCallSite("to_int", 0); - int convertedIndex = toInt.Target(toInt, index); + int convertedIndex = Protocols.CastToFixnum(fixnumCast, index); if (InRangeNormalized(list, ref convertedIndex)) { return list[convertedIndex]; } if (outOfRangeValueProvider != null) { if (defaultValue != Missing.Value) { - respondToStorage.Context.ReportWarning("block supersedes default value argument"); + fixnumCast.Context.ReportWarning("block supersedes default value argument"); } object result; outOfRangeValueProvider.Yield(index, out result); return result; } if (defaultValue == Missing.Value) { throw RubyExceptions.CreateIndexError("index " + convertedIndex + " out of array"); } return defaultValue; } #endregion @@ -875,48 +877,46 @@ namespace IronRuby.Builtins { int length = Math.Max(0, end - begin + (range.ExcludeEnd ? 0 : 1)); return Fill(fixnumCast.Context, block, self, begin, length); } #endregion #region first, last [RubyMethod("first")] public static object First(IList/*!*/ self) { return self.Count == 0 ? null : self[0]; } [RubyMethod("first")] - public static IList/*!*/ First(CallSiteStorage>/*!*/ allocateStorage, - IList/*!*/ self, [DefaultProtocol]int count) { + public static IList/*!*/ First(IList/*!*/ self, [DefaultProtocol]int count) { if (count < 0) { throw RubyExceptions.CreateArgumentError("negative array size (or size too big)"); } count = count > self.Count ? self.Count : count; return RubyArray.Create(self as IList, 0, count); } [RubyMethod("last")] public static object Last(IList/*!*/ self) { return self.Count == 0 ? null : self[self.Count - 1]; } [RubyMethod("last")] - public static IList/*!*/ Last(CallSiteStorage>/*!*/ allocateStorage, - IList/*!*/ self, [DefaultProtocol]int count) { + public static IList/*!*/ Last(IList/*!*/ self, [DefaultProtocol]int count) { if (count < 0) { throw RubyExceptions.CreateArgumentError("negative array size (or size too big)"); } count = count > self.Count ? self.Count : count; return RubyArray.Create(self as IList, self.Count - count, count); } #endregion #region flatten, flatten! [MultiRuntimeAware] private static RubyUtils.RecursionTracker _infiniteFlattenTracker = new RubyUtils.RecursionTracker(); @@ -1033,33 +1033,40 @@ namespace IronRuby.Builtins { } return result; } [RubyMethod("values_at")] public static RubyArray/*!*/ ValuesAt(ConversionStorage/*!*/ fixnumCast, CallSiteStorage>/*!*/ allocateStorage, IList/*!*/ self, [NotNull]params object[]/*!*/ values) { RubyArray result = new RubyArray(); for (int i = 0; i < values.Length; i++) { Range range = values[i] as Range; if (range != null) { - IList fragment = GetElement(fixnumCast, allocateStorage, self, range); - if (fragment != null) { - result.AddRange(fragment); + int start, count; + if (!NormalizeRange(fixnumCast, self.Count, range, out start, out count)) { + continue; + } + + if (count > 0) { + result.AddRange(GetElements(allocateStorage, self, start, count)); + if (start + count >= self.Count) { + result.Add(null); + } } } else { result.Add(GetElement(self, Protocols.CastToFixnum(fixnumCast, values[i]))); } } return result; } #endregion #region join, to_s, inspect public static void RecursiveJoin(ConversionStorage/*!*/ tosConversion, IList/*!*/ list, MutableString/*!*/ separator, MutableString/*!*/ result, Dictionary/*!*/ seen) { @@ -1381,34 +1388,38 @@ namespace IronRuby.Builtins { var seen = new Dictionary(allocateStorage.Context.EqualityComparer); foreach (object item in self) { if (!seen.ContainsKey(item)) { result.Add(item); seen.Add(item, true); } } return result; } [RubyMethod("uniq!")] public static IList UniqueSelf(RubyContext/*!*/ context, IList/*!*/ self) { var seen = new Dictionary(context.EqualityComparer); + bool frozen = context.IsObjectFrozen(self); bool modified = false; int i = 0; while (i < self.Count) { object key = self[i]; if (!seen.ContainsKey(key)) { seen.Add(key, true); i++; } else { + if (frozen) { + throw RubyExceptions.CreateTypeError("can't modify frozen array"); + } self.RemoveAt(i); modified = true; } } return modified ? self : null; } #endregion } } diff --git a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs index 213c2b2..f7538a4 100644 --- a/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs +++ b/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs @@ -87,30 +87,31 @@ namespace IronRuby.Builtins { new System.Func(IronRuby.Builtins.CharOps.Create), new System.Func(IronRuby.Builtins.CharOps.Create) ); ExtendModule(typeof(System.Collections.Generic.IDictionary), LoadSystem__Collections__Generic__IDictionary_Instance, null, null, def29); ExtendModule(typeof(System.Collections.IEnumerable), LoadSystem__Collections__IEnumerable_Instance, null, null, def29); ExtendModule(typeof(System.Collections.IList), LoadSystem__Collections__IList_Instance, null, null, def29); ExtendModule(typeof(System.IComparable), LoadSystem__IComparable_Instance, null, null, def38); ExtendClass(typeof(System.String), null, null, null, null, new IronRuby.Builtins.RubyModule[] {def6, def29, def38}, new System.Func(IronRuby.Builtins.ClrStringOps.Create), new System.Func(IronRuby.Builtins.ClrStringOps.Create), new System.Func(IronRuby.Builtins.ClrStringOps.Create) ); DefineGlobalClass("Array", typeof(IronRuby.Builtins.RubyArray), false, Context.ObjectClass, LoadArray_Instance, LoadArray_Class, null, new IronRuby.Builtins.RubyModule[] {def29}, new System.Func(IronRuby.Builtins.ArrayOps.CreateArray), new System.Func>, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyClass, System.Object, System.Object>(IronRuby.Builtins.ArrayOps.CreateArray), + new System.Func(IronRuby.Builtins.ArrayOps.CreateArray), new System.Func(IronRuby.Builtins.ArrayOps.CreateArray) ); DefineGlobalClass("Binding", typeof(IronRuby.Builtins.Binding), false, Context.ObjectClass, null, null, null, IronRuby.Builtins.RubyModule.EmptyArray); DefineGlobalClass("Dir", typeof(IronRuby.Builtins.RubyDir), true, Context.ObjectClass, LoadDir_Instance, LoadDir_Class, null, new IronRuby.Builtins.RubyModule[] {def29}); #if !SILVERLIGHT if (Context.RubyOptions.Compatibility >= RubyCompatibility.Ruby19) { DefineGlobalClass("Encoding", typeof(IronRuby.Builtins.RubyEncoding), false, Context.ObjectClass, LoadEncoding_Instance, LoadEncoding_Class, null, IronRuby.Builtins.RubyModule.EmptyArray); } #endif IronRuby.Builtins.RubyClass def39 = Context.ExceptionClass = DefineGlobalClass("Exception", typeof(System.Exception), false, Context.ObjectClass, LoadException_Instance, LoadException_Class, null, IronRuby.Builtins.RubyModule.EmptyArray, new System.Func(BuiltinsLibraryInitializer.ExceptionFactory__Exception)); Context.FalseClass = DefineGlobalClass("FalseClass", typeof(IronRuby.Builtins.FalseClass), true, Context.ObjectClass, LoadFalseClass_Instance, null, null, IronRuby.Builtins.RubyModule.EmptyArray); #if !SILVERLIGHT IronRuby.Builtins.RubyClass def28 = DefineClass("File::Stat", typeof(System.IO.FileSystemInfo), false, Context.ObjectClass, LoadFile__Stat_Instance, null, null, new IronRuby.Builtins.RubyModule[] {def38}, new System.Func(IronRuby.Builtins.RubyFileOps.RubyStatOps.Create) @@ -387,30 +388,31 @@ namespace IronRuby.Builtins { new System.Func(IronRuby.Builtins.ArgFilesSingletonOps.GetCurrentFileName) ); } #endif private static void LoadArgumentError_Instance(IronRuby.Builtins.RubyModule/*!*/ module) { module.HideMethod("message"); } private static void LoadArray_Instance(IronRuby.Builtins.RubyModule/*!*/ module) { LoadSystem__Collections__IList_Instance(module); module.DefineLibraryMethod("initialize", 0x52, new System.Func(IronRuby.Builtins.ArrayOps.Reinitialize), new System.Func>, IronRuby.Runtime.BlockParam, IronRuby.Builtins.RubyArray, System.Object, System.Object>(IronRuby.Builtins.ArrayOps.Reinitialize), + new System.Func(IronRuby.Builtins.ArrayOps.Reinitialize), new System.Func(IronRuby.Builtins.ArrayOps.ReinitializeByRepeatedValue) ); module.DefineLibraryMethod("pack", 0x51, new System.Func, IronRuby.Runtime.ConversionStorage, IronRuby.Runtime.RubyContext, IronRuby.Builtins.RubyArray, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArrayOps.Pack) ); module.DefineLibraryMethod("reverse!", 0x51, new System.Func(IronRuby.Builtins.ArrayOps.InPlaceReverse) ); module.DefineLibraryMethod("reverse_each", 0x51, new System.Func(IronRuby.Builtins.ArrayOps.ReverseEach) ); @@ -5059,47 +5061,47 @@ namespace IronRuby.Builtins { ); module.DefineLibraryMethod("each_index", 0x51, new System.Func(IronRuby.Builtins.IListOps.EachIndex) ); module.DefineLibraryMethod("empty?", 0x51, new System.Func(IronRuby.Builtins.IListOps.Empty) ); module.DefineLibraryMethod("eql?", 0x51, new System.Func(IronRuby.Builtins.IListOps.HashEquals) ); module.DefineLibraryMethod("fetch", 0x51, - new System.Func>, IronRuby.Runtime.BlockParam, System.Collections.IList, System.Object, System.Object, System.Object>(IronRuby.Builtins.IListOps.Fetch) + new System.Func, IronRuby.Runtime.BlockParam, System.Collections.IList, System.Object, System.Object, System.Object>(IronRuby.Builtins.IListOps.Fetch) ); module.DefineLibraryMethod("fill", 0x51, new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func, System.Collections.IList, System.Object, System.Object, System.Object, System.Collections.IList>(IronRuby.Builtins.IListOps.Fill), new System.Func, System.Collections.IList, System.Object, IronRuby.Builtins.Range, System.Collections.IList>(IronRuby.Builtins.IListOps.Fill), new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func(IronRuby.Builtins.IListOps.Fill), new System.Func, IronRuby.Runtime.BlockParam, System.Collections.IList, System.Object, System.Object, System.Object>(IronRuby.Builtins.IListOps.Fill), new System.Func, IronRuby.Runtime.BlockParam, System.Collections.IList, IronRuby.Builtins.Range, System.Object>(IronRuby.Builtins.IListOps.Fill) ); module.DefineLibraryMethod("first", 0x51, new System.Func(IronRuby.Builtins.IListOps.First), - new System.Func>, System.Collections.IList, System.Int32, System.Collections.IList>(IronRuby.Builtins.IListOps.First) + new System.Func(IronRuby.Builtins.IListOps.First) ); module.DefineLibraryMethod("flatten", 0x51, new System.Func>, IronRuby.Runtime.ConversionStorage, IronRuby.Runtime.RubyContext, System.Collections.IList, System.Collections.IList>(IronRuby.Builtins.IListOps.Flatten) ); module.DefineLibraryMethod("flatten!", 0x51, new System.Func>, IronRuby.Runtime.ConversionStorage, IronRuby.Runtime.RubyContext, System.Collections.IList, System.Collections.IList>(IronRuby.Builtins.IListOps.FlattenInPlace) ); module.DefineLibraryMethod("hash", 0x51, new System.Func(IronRuby.Builtins.IListOps.GetHashCode) ); module.DefineLibraryMethod("include?", 0x51, @@ -5125,31 +5127,31 @@ namespace IronRuby.Builtins { module.DefineLibraryMethod("insert", 0x51, new System.Func(IronRuby.Builtins.IListOps.Insert) ); module.DefineLibraryMethod("inspect", 0x51, new System.Func(IronRuby.Builtins.IListOps.Inspect) ); module.DefineLibraryMethod("join", 0x51, new System.Func, System.Collections.IList, IronRuby.Builtins.MutableString>(IronRuby.Builtins.IListOps.Join), new System.Func, System.Collections.IList, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.IListOps.Join) ); module.DefineLibraryMethod("last", 0x51, new System.Func(IronRuby.Builtins.IListOps.Last), - new System.Func>, System.Collections.IList, System.Int32, System.Collections.IList>(IronRuby.Builtins.IListOps.Last) + new System.Func(IronRuby.Builtins.IListOps.Last) ); module.DefineLibraryMethod("length", 0x51, new System.Func(IronRuby.Builtins.IListOps.Length) ); module.DefineLibraryMethod("map!", 0x51, new System.Func(IronRuby.Builtins.IListOps.CollectInPlace) ); module.DefineLibraryMethod("nitems", 0x51, new System.Func(IronRuby.Builtins.IListOps.NumberOfNonNilItems) ); module.DefineLibraryMethod("pop", 0x51, From suppakilla at gmail.com Sat Apr 18 18:38:59 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Sun, 19 Apr 2009 00:38:59 +0200 Subject: [Ironruby-core] More fixes for core/array specs In-Reply-To: <3bf20550904180431k2bd15d59paaf6b9c05f242f67@mail.gmail.com> References: <3bf20550904180431k2bd15d59paaf6b9c05f242f67@mail.gmail.com> Message-ID: <3bf20550904181538l6067f57au7e8d34507a1eeaf1@mail.gmail.com> Hi, just a self-reply to point out that the changes in ArrayOps.ToArray introduced a regression for Array#to_ary (reported by core/array/to_ary) due to the different behaviour of Array#to_a and Array#to_ary on subclasses of Array. I have already fixed this on my local repository, I'm just waiting to have a few more commits to rebase and push the next set of changes on github. On Sat, Apr 18, 2009 at 13:31, Daniele Alessandri wrote: > Hi, > > http://github.com/nrk/ironruby/commit/4afc7f1bc44b007a9dca30e6330eca35d487f165 > > This commit resolves the following failing specs: > > Array#<=> properly handles recursive arrays (critical) > Array#initialize with (size, object=nil) uses the block value instead > of using the default value > Array#to_a does not return subclass instance on Array subclasses > Array#uniq! raises a TypeError on a frozen array if modification would > take place > Array#values_at returns an array of elements in the ranges when passes ranges > > From the commit message: > > * Removed unused allocateStorage argument from IListOps.First and > IListOps.Last; Removed the manual protocol conversion bits in > IListOps.Fetch > * Fix IoOps.ToPrintedString to output a double converted to string > using an invariant culture (Issue #597 NumericLiterals1 test fails > under french culture) > * IListOps.ValuesAt adds a null value to the result if the begin value > of the specified range instance(s) is <= the length of the array and > the end value is >= the length of the array. > * Array#uniq! raises a TypeError on a frozen array if modification > would take place. > * Fixed ArrayOps.ToArray to return a new RubyArray instance with the > elements of self if self is a RubyArray.Subclass. > * Array#initialize with (size, object=nil) uses the block value > instead of using the default value > * Fixed IListOps.Compare to work with recursive arrays. > > A diff is attached to this mail. > > PS: This completes my previous commit by removing unused > allocateStorage arguments from IListOps.First and IListOps.Last. > > Thanks, > Daniele > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Shri.Borde at microsoft.com Sat Apr 18 19:10:13 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sat, 18 Apr 2009 16:10:13 -0700 Subject: [Ironruby-core] More fixes for core/array specs In-Reply-To: <3bf20550904181538l6067f57au7e8d34507a1eeaf1@mail.gmail.com> References: <3bf20550904180431k2bd15d59paaf6b9c05f242f67@mail.gmail.com> <3bf20550904181538l6067f57au7e8d34507a1eeaf1@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19EDF5A8@NA-EXMSG-C104.redmond.corp.microsoft.com> Looks good! In IListOps.UniqueSelf, any reason you do "bool frozen = context.IsObjectFrozen(self);" upfront instead doing IsObjectFrozen when you actually need it? If uniq! Is called on a System.Collections.Generic.List, IsObjectFrozen will be expensive since we have to keep the "frozen" bit on the side. (For RubyArray, we will keep the bit as an instance field which will be cheap to access). So for List objects which are already unique, it will be faster if you can avoid doing IsObjectFrozen. Note that simplicity trumps optimization unless you have hard data that the optimization is required. I am only suggesting this optimization as its trivial, and the code is as simple in either case... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Saturday, April 18, 2009 3:39 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] More fixes for core/array specs Hi, just a self-reply to point out that the changes in ArrayOps.ToArray introduced a regression for Array#to_ary (reported by core/array/to_ary) due to the different behaviour of Array#to_a and Array#to_ary on subclasses of Array. I have already fixed this on my local repository, I'm just waiting to have a few more commits to rebase and push the next set of changes on github. On Sat, Apr 18, 2009 at 13:31, Daniele Alessandri wrote: > Hi, > > http://github.com/nrk/ironruby/commit/4afc7f1bc44b007a9dca30e6330eca35d487f165 > > This commit resolves the following failing specs: > > Array#<=> properly handles recursive arrays (critical) > Array#initialize with (size, object=nil) uses the block value instead > of using the default value > Array#to_a does not return subclass instance on Array subclasses > Array#uniq! raises a TypeError on a frozen array if modification would > take place > Array#values_at returns an array of elements in the ranges when passes ranges > > From the commit message: > > * Removed unused allocateStorage argument from IListOps.First and > IListOps.Last; Removed the manual protocol conversion bits in > IListOps.Fetch > * Fix IoOps.ToPrintedString to output a double converted to string > using an invariant culture (Issue #597 NumericLiterals1 test fails > under french culture) > * IListOps.ValuesAt adds a null value to the result if the begin value > of the specified range instance(s) is <= the length of the array and > the end value is >= the length of the array. > * Array#uniq! raises a TypeError on a frozen array if modification > would take place. > * Fixed ArrayOps.ToArray to return a new RubyArray instance with the > elements of self if self is a RubyArray.Subclass. > * Array#initialize with (size, object=nil) uses the block value > instead of using the default value > * Fixed IListOps.Compare to work with recursive arrays. > > A diff is attached to this mail. > > PS: This completes my previous commit by removing unused > allocateStorage arguments from IListOps.First and IListOps.Last. > > Thanks, > Daniele > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sun Apr 19 17:55:27 2009 From: lists at ruby-forum.com (Zach Shewmaker) Date: Sun, 19 Apr 2009 23:55:27 +0200 Subject: [Ironruby-core] =?utf-8?q?Error_when_running_Cucumber_examples_wi?= =?utf-8?q?th=09IronRuby?= In-Reply-To: References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> <5189c5ce4143ec4739b6de5f9e156206@ruby-forum.com> Message-ID: <9cab4ef363aa6b8e49cb22b894f0d99e@ruby-forum.com> Is there a workaround that we can use in the time being? I found where the exception was being thrown and tried to figure it out myself, but the codebase is just too foreign me. Thanks, Zach Jimmy Schementi wrote: > That's because the bug still exist ... > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=578 > > ~js -- Posted via http://www.ruby-forum.com/. From Shri.Borde at microsoft.com Mon Apr 20 02:58:06 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sun, 19 Apr 2009 23:58:06 -0700 Subject: [Ironruby-core] Error when running Cucumber examples with IronRuby In-Reply-To: <9cab4ef363aa6b8e49cb22b894f0d99e@ruby-forum.com> References: <710DF26F214D2B4BB94287123FFE980A2E15EEC7EF@NA-EXMSG-C104.redmond.corp.microsoft.com> <710DF26F214D2B4BB94287123FFE980A2E1608E49E@NA-EXMSG-C104.redmond.corp.microsoft.com> <5189c5ce4143ec4739b6de5f9e156206@ruby-forum.com> <9cab4ef363aa6b8e49cb22b894f0d99e@ruby-forum.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E19EDF630@NA-EXMSG-C104.redmond.corp.microsoft.com> Could you modify the cucumber Ruby sources so that it does not use "break" in evaled code (unless the break is in a loop or a block)? From the output Chamini had sent before, it looks like "_nt_keyword_space" is a method defined using eval, and it has the break that is not in a loop or a block. You could modify the eval code to use some other control flow instead of a break - like throwing an exception. This will allow you to find other problems that may be hidden behind this one. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Zach Shewmaker Sent: Sunday, April 19, 2009 2:55 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Error when running Cucumber examples with IronRuby Is there a workaround that we can use in the time being? I found where the exception was being thrown and tried to figure it out myself, but the codebase is just too foreign me. Thanks, Zach Jimmy Schementi wrote: > That's because the bug still exist ... > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=578 > > ~js -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From suppakilla at gmail.com Mon Apr 20 04:51:41 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Mon, 20 Apr 2009 10:51:41 +0200 Subject: [Ironruby-core] More fixes for core/array specs In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E19EDF5A8@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <3bf20550904180431k2bd15d59paaf6b9c05f242f67@mail.gmail.com> <3bf20550904181538l6067f57au7e8d34507a1eeaf1@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E19EDF5A8@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <3bf20550904200151m7e5b070fs40b5a2ce24146b7e@mail.gmail.com> Good point, and I guess there is no real reason for doing that... it wasn't really an attempt to achieve optimization, it just turned out like that as I honestly totally missed the case of already unique lists :-) Adjustments scheduled for the next push of my commits. On Sun, Apr 19, 2009 at 01:10, Shri Borde wrote: > Looks good! > > In IListOps.UniqueSelf, any reason you do "bool frozen = context.IsObjectFrozen(self);" upfront instead doing IsObjectFrozen when you actually need it? If uniq! Is called on a System.Collections.Generic.List, IsObjectFrozen will be expensive since we have to keep the "frozen" bit on the side. (For RubyArray, we will keep the bit as an instance field which will be cheap to access). So for List objects which are already unique, it will be faster if you can avoid doing IsObjectFrozen. > > Note that simplicity trumps optimization unless you have hard data that the optimization is required. I am only suggesting this optimization as its trivial, and the code is as simple in either case... > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Saturday, April 18, 2009 3:39 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] More fixes for core/array specs > > Hi, > > just a self-reply to point out that the changes in ArrayOps.ToArray > introduced a regression for Array#to_ary (reported by > core/array/to_ary) due to the different behaviour of Array#to_a and > Array#to_ary on subclasses of Array. I have already fixed this on my > local repository, I'm just waiting to have a few more commits to > rebase and push the next set of changes on github. > > > On Sat, Apr 18, 2009 at 13:31, Daniele Alessandri wrote: >> Hi, >> >> http://github.com/nrk/ironruby/commit/4afc7f1bc44b007a9dca30e6330eca35d487f165 >> >> This commit resolves the following failing specs: >> >> Array#<=> properly handles recursive arrays (critical) >> Array#initialize with (size, object=nil) uses the block value instead >> of using the default value >> Array#to_a does not return subclass instance on Array subclasses >> Array#uniq! raises a TypeError on a frozen array if modification would >> take place >> Array#values_at returns an array of elements in the ranges when passes ranges >> >> From the commit message: >> >> * Removed unused allocateStorage argument from IListOps.First and >> IListOps.Last; Removed the manual protocol conversion bits in >> IListOps.Fetch >> * Fix IoOps.ToPrintedString to output a double converted to string >> using an invariant culture (Issue #597 NumericLiterals1 test fails >> under french culture) >> * IListOps.ValuesAt adds a null value to the result if the begin value >> of the specified range instance(s) is <= the length of the array and >> the end value is >= the length of the array. >> * Array#uniq! raises a TypeError on a frozen array if modification >> would take place. >> * Fixed ArrayOps.ToArray to return a new RubyArray instance with the >> elements of self if self is a RubyArray.Subclass. >> * Array#initialize with (size, object=nil) uses the block value >> instead of using the default value >> * Fixed IListOps.Compare to work with recursive arrays. >> >> A diff is attached to this mail. >> >> PS: This completes my previous commit by removing unused >> allocateStorage arguments from IListOps.First and IListOps.Last. >> >> Thanks, >> Daniele >> >> -- >> Daniele Alessandri >> http://www.clorophilla.net/blog/ >> http://twitter.com/JoL1hAHN >> > > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From suppakilla at gmail.com Mon Apr 20 15:46:15 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Mon, 20 Apr 2009 21:46:15 +0200 Subject: [Ironruby-core] More fixes for core/array specs (again) Message-ID: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> Hi, I have attached a diff with new fixes for a whole bunch of failing expectations in the core/array specs. * Slightly modified IListOps.UniqueSelf as suggested upon review. * Fixed IListOps.ReverseIndex as Array#rindex should not fail if elements are removed from the array during the iteration over its elements. * Changed IListOps.Reverse to return IList instances of the same type of the given self argument (this change also fixes the following failing spec: "Array#reverse returns subclass instance on Array subclasses") * Changed IListOps.SetElement to make it try to invoke #to_ary on its argument for multi-element sets. * Changed one overload of IListOps.Equals to make it try to call #to_ary on the object argument of Array#== and use the resulting array as the actual argument for the equality check. * Cleaning up tags removing expectations that do not fail anymore. * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave differently on subclasses of arrays. * Various changes to IListOps.Join to clear all of the remaining tags for the specs of Array#join. The tags marked as critical in join_tags.txt are not related to pending bugs for Array#join. * Changed IListOps.Repetition to return IList instances of the same type of the given self argument (this fixes also "Array#* with an integer returns subclass instance with Array subclasses") * Modified IListOps.RecursiveJoin to make it flag the resulting string as tainted if the given array, at least one of its elements or the separator string are tainted. * IListOps.Difference now uses Object#hash and Object#eql? to check for object equality, this fixes the failing spec "Array#- acts as if using an intermediate hash to collect values" These changes directly clear the following failing expectations: Array#[]= calls to_ary on its rhs argument for multi-element sets Array#== calls to_ary on its argument Array#join tries to convert the passed seperator to a String using #to_str Array#join checks whether the passed seperator responds to #to_str Array#join handles recursive arrays Array#join does not consider taint of either the array or the separator when the array is empty Array#join returns a string which would be infected with taint of the array, its elements or the separator when the array is not empty Array#join does not process the separator if the array is empty Array#join raises a TypeError if the passed separator is not a string and does not respond to #to_str Array#- acts as if using an intermediate hash to collect values Array#* with an integer returns subclass instance with Array subclasses Array#* with an integer copies the taint status of the original array even if the array is empty Array#* with an integer copies the taint status of the original array if the passed count is not 0 Array#* with a string returns a string which would be infected with taint of the array, its elements or the separator when the array is not empty Array#reverse returns subclass instance on Array subclasses Array#rindex does not fail when removing elements from block I have only a question: I've made changes to IListOps.Reverse and IListOps.Repetition in order to make them return IList instead of RubyArray. In ruby, Array#reverse and Array#* maintain the same type of self for the returning object (that is, if self is a RubyArray.Subclass then it is returned a new object of the same type). With these changes we would actually be able to do something like this: >>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) => [1, 2, 3, 4, 5] >>> multiplied_arraylist = arraylist * 2 => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] >>> multiplied_arraylist.class => System::Collections::ArrayList Would it be a consistent behaviour? On a (partially) unrelated note, I've just noticed that List.Reverse is more like Array#reverse! but it actually take the precedence over IListOps.Reverse. I'm just thinking if this could lead to some sort of confusion (ohan I'm not sure if anything can be done about this. Thanks, Daniele PS: I'm waiting to push these changes on my remote repository, Jim told he is going to pull today but I would like to wait for a review first (and yeah, today I'm too lazy to actually start off a new branch :-)). -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- A non-text attachment was scrubbed... Name: core-array_fixes090420.diff Type: application/octet-stream Size: 53958 bytes Desc: not available URL: From Shri.Borde at microsoft.com Tue Apr 21 00:57:53 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 20 Apr 2009 21:57:53 -0700 Subject: [Ironruby-core] More fixes for core/array specs (again) In-Reply-To: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> References: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> Looks great! Could you copy the comment "# MRI follows hashing semantics here, so doesn't actually call eql?/hash for Fixnum/Symbol" from core\array\minus_spec.rb to IListOps.Difference as its not obvious why the code in IListOps.Difference does the complicated checks. Yes, it seems OK that you can call all the Array methods on System::Collections::ArrayList (and any System::Collectinos::IList object in general). We are exposing Ruby String methods on System::String, and it would be consistent with that approach. About List.Reverse, you could argue that if you use Ruby casing of "reverse", IListOps should get precedence. Could you open a bug for this please? If you use "Reverse", then the CLR method should get precedence, and there would be a possibility of confusion, but as you say, there is not much that can be done. It does not seem worth special-casing. Thanks, Shri -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Monday, April 20, 2009 12:46 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] More fixes for core/array specs (again) Hi, I have attached a diff with new fixes for a whole bunch of failing expectations in the core/array specs. * Slightly modified IListOps.UniqueSelf as suggested upon review. * Fixed IListOps.ReverseIndex as Array#rindex should not fail if elements are removed from the array during the iteration over its elements. * Changed IListOps.Reverse to return IList instances of the same type of the given self argument (this change also fixes the following failing spec: "Array#reverse returns subclass instance on Array subclasses") * Changed IListOps.SetElement to make it try to invoke #to_ary on its argument for multi-element sets. * Changed one overload of IListOps.Equals to make it try to call #to_ary on the object argument of Array#== and use the resulting array as the actual argument for the equality check. * Cleaning up tags removing expectations that do not fail anymore. * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave differently on subclasses of arrays. * Various changes to IListOps.Join to clear all of the remaining tags for the specs of Array#join. The tags marked as critical in join_tags.txt are not related to pending bugs for Array#join. * Changed IListOps.Repetition to return IList instances of the same type of the given self argument (this fixes also "Array#* with an integer returns subclass instance with Array subclasses") * Modified IListOps.RecursiveJoin to make it flag the resulting string as tainted if the given array, at least one of its elements or the separator string are tainted. * IListOps.Difference now uses Object#hash and Object#eql? to check for object equality, this fixes the failing spec "Array#- acts as if using an intermediate hash to collect values" These changes directly clear the following failing expectations: Array#[]= calls to_ary on its rhs argument for multi-element sets Array#== calls to_ary on its argument Array#join tries to convert the passed seperator to a String using #to_str Array#join checks whether the passed seperator responds to #to_str Array#join handles recursive arrays Array#join does not consider taint of either the array or the separator when the array is empty Array#join returns a string which would be infected with taint of the array, its elements or the separator when the array is not empty Array#join does not process the separator if the array is empty Array#join raises a TypeError if the passed separator is not a string and does not respond to #to_str Array#- acts as if using an intermediate hash to collect values Array#* with an integer returns subclass instance with Array subclasses Array#* with an integer copies the taint status of the original array even if the array is empty Array#* with an integer copies the taint status of the original array if the passed count is not 0 Array#* with a string returns a string which would be infected with taint of the array, its elements or the separator when the array is not empty Array#reverse returns subclass instance on Array subclasses Array#rindex does not fail when removing elements from block I have only a question: I've made changes to IListOps.Reverse and IListOps.Repetition in order to make them return IList instead of RubyArray. In ruby, Array#reverse and Array#* maintain the same type of self for the returning object (that is, if self is a RubyArray.Subclass then it is returned a new object of the same type). With these changes we would actually be able to do something like this: >>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) => [1, 2, 3, 4, 5] >>> multiplied_arraylist = arraylist * 2 => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] >>> multiplied_arraylist.class => System::Collections::ArrayList Would it be a consistent behaviour? On a (partially) unrelated note, I've just noticed that List.Reverse is more like Array#reverse! but it actually take the precedence over IListOps.Reverse. I'm just thinking if this could lead to some sort of confusion (ohan I'm not sure if anything can be done about this. Thanks, Daniele PS: I'm waiting to push these changes on my remote repository, Jim told he is going to pull today but I would like to wait for a review first (and yeah, today I'm too lazy to actually start off a new branch :-)). -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From jdeville at microsoft.com Tue Apr 21 02:39:58 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Apr 2009 06:39:58 +0000 Subject: [Ironruby-core] More fixes for core/array specs (again) In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD1843571B@TK5EX14MBXC101.redmond.corp.microsoft.com> Daniele, If you push this out tonight, I'll pull it in tomorrow. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shri Borde > Sent: Monday, April 20, 2009 9:58 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] More fixes for core/array specs (again) > > Looks great! > > Could you copy the comment "# MRI follows hashing semantics here, so > doesn't actually call eql?/hash for Fixnum/Symbol" from > core\array\minus_spec.rb to IListOps.Difference as its not obvious why > the code in IListOps.Difference does the complicated checks. > > Yes, it seems OK that you can call all the Array methods on > System::Collections::ArrayList (and any System::Collectinos::IList > object in general). We are exposing Ruby String methods on > System::String, and it would be consistent with that approach. > > About List.Reverse, you could argue that if you use Ruby casing of > "reverse", IListOps should get precedence. Could you open a bug for > this please? If you use "Reverse", then the CLR method should get > precedence, and there would be a possibility of confusion, but as you > say, there is not much that can be done. It does not seem worth > special-casing. > > Thanks, > Shri > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Monday, April 20, 2009 12:46 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] More fixes for core/array specs (again) > > Hi, > I have attached a diff with new fixes for a whole bunch of failing > expectations in the core/array specs. > > * Slightly modified IListOps.UniqueSelf as suggested upon review. > * Fixed IListOps.ReverseIndex as Array#rindex should not fail if > elements are removed from the array during the iteration over its > elements. > * Changed IListOps.Reverse to return IList instances of the same type > of the given self argument (this change also fixes the following > failing spec: "Array#reverse returns subclass instance on Array > subclasses") > * Changed IListOps.SetElement to make it try to invoke #to_ary on its > argument for multi-element sets. > * Changed one overload of IListOps.Equals to make it try to call > #to_ary on the object argument of Array#== and use the resulting array > as the actual argument for the equality check. > * Cleaning up tags removing expectations that do not fail anymore. > * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave > differently on subclasses of arrays. > * Various changes to IListOps.Join to clear all of the remaining tags > for the specs of Array#join. The tags marked as critical in > join_tags.txt are not related to pending bugs for Array#join. > * Changed IListOps.Repetition to return IList instances of the same > type of the given self argument (this fixes also "Array#* with an > integer returns subclass instance with Array subclasses") > * Modified IListOps.RecursiveJoin to make it flag the resulting string > as tainted if the given array, at least one of its elements or the > separator string are tainted. > * IListOps.Difference now uses Object#hash and Object#eql? to check for > object equality, this fixes the failing spec "Array#- acts as if using > an intermediate hash to collect values" > > These changes directly clear the following failing expectations: > > Array#[]= calls to_ary on its rhs argument for multi-element sets > Array#== calls to_ary on its argument Array#join tries to convert the > passed seperator to a String using #to_str Array#join checks whether > the passed seperator responds to #to_str Array#join handles recursive > arrays Array#join does not consider taint of either the array or the > separator when the array is empty Array#join returns a string which > would be infected with taint of the array, its elements or the > separator when the array is not empty Array#join does not process the > separator if the array is empty Array#join raises a TypeError if the > passed separator is not a string and does not respond to #to_str > Array#- acts as if using an intermediate hash to collect values > Array#* with an integer returns subclass instance with Array subclasses > Array#* with an integer copies the taint status of the original array > even if the array is empty > Array#* with an integer copies the taint status of the original array > if the passed count is not 0 > Array#* with a string returns a string which would be infected with > taint of the array, its elements or the separator when the array is not > empty Array#reverse returns subclass instance on Array subclasses > Array#rindex does not fail when removing elements from block > > I have only a question: I've made changes to IListOps.Reverse and > IListOps.Repetition in order to make them return IList instead of > RubyArray. In ruby, Array#reverse and Array#* maintain the same type of > self for the returning object (that is, if self is a RubyArray.Subclass > then it is returned a new object of the same type). > With these changes we would actually be able to do something like > this: > > >>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) > => [1, 2, 3, 4, 5] > >>> multiplied_arraylist = arraylist * 2 > => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] > >>> multiplied_arraylist.class > => System::Collections::ArrayList > > Would it be a consistent behaviour? > > On a (partially) unrelated note, I've just noticed that List.Reverse > is more like Array#reverse! but it actually take the precedence over > IListOps.Reverse. I'm just thinking if this could lead to some sort of > confusion (ohan I'm not sure if anything can be done about this. > > Thanks, > Daniele > > > PS: I'm waiting to push these changes on my remote repository, Jim told > he is going to pull today but I would like to wait for a review first > (and yeah, today I'm too lazy to actually start off a new branch :-)). > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Tue Apr 21 02:51:56 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 21 Apr 2009 06:51:56 +0000 Subject: [Ironruby-core] Code Review: core/module/autoload Message-ID: http://github.com/jschementi/ironruby/commit/bbfa3c4a35cc331e58fb9da9a4097de86ed0dbff autoload uses '/' to join load-path and autoload-path. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=674 This makes Rails 2.3.2 startup without any modifications! =) Changes: - Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/module/autoload_spec.rb - Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/module/fixtures/autoload_join.rb - Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs From jdeville at microsoft.com Tue Apr 21 03:29:12 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Apr 2009 07:29:12 +0000 Subject: [Ironruby-core] Code Review: core/module/autoload In-Reply-To: References: Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD18435A8F@TK5EX14MBXC101.redmond.corp.microsoft.com> Looks good. JD > -----Original Message----- > From: Jimmy Schementi > Sent: Monday, April 20, 2009 11:52 PM > To: ironruby-core at rubyforge.org > Cc: IronRuby External Code Reviewers > Subject: Code Review: core/module/autoload > > http://github.com/jschementi/ironruby/commit/bbfa3c4a35cc331e58fb9da9a4 > 097de86ed0dbff > > autoload uses '/' to join load-path and autoload-path. > Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=674 > > This makes Rails 2.3.2 startup without any modifications! =) > > Changes: > - > Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/m > odule/autoload_spec.rb > - > Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/m > odule/fixtures/autoload_join.rb > - Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs From suppakilla at gmail.com Tue Apr 21 07:43:53 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Tue, 21 Apr 2009 13:43:53 +0200 Subject: [Ironruby-core] More fixes for core/array specs (again) In-Reply-To: <0AB34E2BFBE88245B073D2D83B4245FD1843571B@TK5EX14MBXC101.redmond.corp.microsoft.com> References: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> <0AB34E2BFBE88245B073D2D83B4245FD1843571B@TK5EX14MBXC101.redmond.corp.microsoft.com> Message-ID: <3bf20550904210443t713a912cq7813e867ca6f4e67@mail.gmail.com> Right now I don't have access to my local repository, I think to be able to push on github by 9:00 PM CEST (UTC+2, that's my timezone, it should be 12:00 PM PDT). On Tue, Apr 21, 2009 at 08:39, Jim Deville wrote: > Daniele, > > If you push this out tonight, I'll pull it in tomorrow. > > JD > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Shri Borde >> Sent: Monday, April 20, 2009 9:58 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] More fixes for core/array specs (again) >> >> Looks great! >> >> Could you copy the comment "# MRI follows hashing semantics here, so >> doesn't actually call eql?/hash for Fixnum/Symbol" from >> core\array\minus_spec.rb to IListOps.Difference as its not obvious why >> the code in IListOps.Difference does the complicated checks. >> >> Yes, it seems OK that you can call all the Array methods on >> System::Collections::ArrayList (and any System::Collectinos::IList >> object in general). We are exposing Ruby String methods on >> System::String, and it would be consistent with that approach. >> >> About List.Reverse, you could argue that if you use Ruby casing of >> "reverse", IListOps should get precedence. Could you open a bug for >> this please? If you use "Reverse", then the CLR method should get >> precedence, and there would be a possibility of confusion, but as you >> say, there is not much that can be done. It does not seem worth >> special-casing. >> >> Thanks, >> Shri >> >> >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Daniele Alessandri >> Sent: Monday, April 20, 2009 12:46 PM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] More fixes for core/array specs (again) >> >> Hi, >> I have attached a diff with new fixes for a whole bunch of failing >> expectations in the core/array specs. >> >> * Slightly modified IListOps.UniqueSelf as suggested upon review. >> * Fixed IListOps.ReverseIndex as Array#rindex should not fail if >> elements are removed from the array during the iteration over its >> elements. >> * Changed IListOps.Reverse to return IList instances of the same type >> of the given self argument (this change also fixes the following >> failing spec: "Array#reverse returns subclass instance on Array >> subclasses") >> * Changed IListOps.SetElement to make it try to invoke #to_ary on its >> argument for multi-element sets. >> * Changed one overload of IListOps.Equals to make it try to call >> #to_ary on the object argument of Array#== and use the resulting array >> as the actual argument for the equality check. >> * Cleaning up tags removing expectations that do not fail anymore. >> * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave >> differently on subclasses of arrays. >> * Various changes to IListOps.Join to clear all of the remaining tags >> for the specs of Array#join. The tags marked as critical in >> join_tags.txt are not related to pending bugs for Array#join. >> * Changed IListOps.Repetition to return IList instances of the same >> type of the given self argument (this fixes also "Array#* with an >> integer returns subclass instance with Array subclasses") >> * Modified IListOps.RecursiveJoin to make it flag the resulting string >> as tainted if the given array, at least one of its elements or the >> separator string are tainted. >> * IListOps.Difference now uses Object#hash and Object#eql? to check for >> object equality, this fixes the failing spec "Array#- acts as if using >> an intermediate hash to collect values" >> >> These changes directly clear the following failing expectations: >> >> Array#[]= calls to_ary on its rhs argument for multi-element sets >> Array#== calls to_ary on its argument Array#join tries to convert the >> passed seperator to a String using #to_str Array#join checks whether >> the passed seperator responds to #to_str Array#join handles recursive >> arrays Array#join does not consider taint of either the array or the >> separator when the array is empty Array#join returns a string which >> would be infected with taint of the array, its elements or the >> separator when the array is not empty Array#join does not process the >> separator if the array is empty Array#join raises a TypeError if the >> passed separator is not a string and does not respond to #to_str >> Array#- acts as if using an ?intermediate hash to collect values >> Array#* with an integer returns subclass instance with Array subclasses >> Array#* with an integer copies the taint status of the original array >> even if the array is empty >> Array#* with an integer copies the taint status of the original array >> if the passed count is not 0 >> Array#* with a string returns a string which would be infected with >> taint of the array, its elements or the separator when the array is not >> empty Array#reverse returns subclass instance on Array subclasses >> Array#rindex does not fail when removing elements from block >> >> I have only a question: I've made changes to IListOps.Reverse and >> IListOps.Repetition in order to make them return IList instead of >> RubyArray. In ruby, Array#reverse and Array#* maintain the same type of >> self for the returning object (that is, if self is a RubyArray.Subclass >> then it is returned a new object of the same type). >> With these changes we would actually be able to do something like >> this: >> >> >>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) >> => [1, 2, 3, 4, 5] >> >>> multiplied_arraylist = arraylist * 2 >> => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] >> >>> multiplied_arraylist.class >> => System::Collections::ArrayList >> >> Would it be a consistent behaviour? >> >> On a (partially) unrelated note, I've just noticed that List.Reverse >> is more like Array#reverse! but it actually take the precedence over >> IListOps.Reverse. I'm just thinking if this could lead to some sort of >> confusion (ohan I'm not sure if anything can be done about this. >> >> Thanks, >> Daniele >> >> >> PS: I'm waiting to push these changes on my remote repository, Jim told >> he is going to pull today but I would like to wait for a review first >> (and yeah, today I'm too lazy to actually start off a new branch :-)). >> >> -- >> Daniele Alessandri >> http://www.clorophilla.net/blog/ >> http://twitter.com/JoL1hAHN >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From suppakilla at gmail.com Tue Apr 21 07:58:12 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Tue, 21 Apr 2009 13:58:12 +0200 Subject: [Ironruby-core] More fixes for core/array specs (again) In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <3bf20550904210458j3ebd9913uce6d87e5be2973dd@mail.gmail.com> OK I'll add that comment to IListOps.Difference. >From what I've seen yesterday "reverse" and "Reverse" both call the CLR method of List, I'll try again later to confirm this behaviour just to be really sure before I open a bug. Thanks, Daniele On Tue, Apr 21, 2009 at 06:57, Shri Borde wrote: > Looks great! > > Could you copy the comment "# MRI follows hashing semantics here, so doesn't actually call eql?/hash for Fixnum/Symbol" from core\array\minus_spec.rb to IListOps.Difference as its not obvious why the code in IListOps.Difference does the complicated checks. > > Yes, it seems OK that you can call all the Array methods on System::Collections::ArrayList (and any System::Collectinos::IList object in general). We are exposing Ruby String methods on System::String, and it would be consistent with that approach. > > About List.Reverse, you could argue that if you use Ruby casing of "reverse", IListOps should get precedence. Could you open a bug for this please? If you use "Reverse", then the CLR method should get precedence, and there would be a possibility of confusion, but as you say, there is not much that can be done. It does not seem worth special-casing. > > Thanks, > Shri > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Monday, April 20, 2009 12:46 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] More fixes for core/array specs (again) > > Hi, > I have attached a diff with new fixes for a whole bunch of failing expectations in the core/array specs. > > * Slightly modified IListOps.UniqueSelf as suggested upon review. > * Fixed IListOps.ReverseIndex as Array#rindex should not fail if elements are removed from the array during the iteration over its elements. > * Changed IListOps.Reverse to return IList instances of the same type of the given self argument (this change also fixes the following failing spec: "Array#reverse returns subclass instance on Array > subclasses") > * Changed IListOps.SetElement to make it try to invoke #to_ary on its argument for multi-element sets. > * Changed one overload of IListOps.Equals to make it try to call #to_ary on the object argument of Array#== and use the resulting array as the actual argument for the equality check. > * Cleaning up tags removing expectations that do not fail anymore. > * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave differently on subclasses of arrays. > * Various changes to IListOps.Join to clear all of the remaining tags for the specs of Array#join. The tags marked as critical in join_tags.txt are not related to pending bugs for Array#join. > * Changed IListOps.Repetition to return IList instances of the same type of the given self argument (this fixes also "Array#* with an integer returns subclass instance with Array subclasses") > * Modified IListOps.RecursiveJoin to make it flag the resulting string as tainted if the given array, at least one of its elements or the separator string are tainted. > * IListOps.Difference now uses Object#hash and Object#eql? to check for object equality, this fixes the failing spec "Array#- acts as if using an intermediate hash to collect values" > > These changes directly clear the following failing expectations: > > Array#[]= calls to_ary on its rhs argument for multi-element sets Array#== calls to_ary on its argument Array#join tries to convert the passed seperator to a String using #to_str Array#join checks whether the passed seperator responds to #to_str Array#join handles recursive arrays Array#join does not consider taint of either the array or the separator when the array is empty Array#join returns a string which would be infected with taint of the array, its elements or the separator when the array is not empty Array#join does not process the separator if the array is empty Array#join raises a TypeError if the passed separator is not a string and does not respond to #to_str > Array#- acts as if using an ?intermediate hash to collect values > Array#* with an integer returns subclass instance with Array subclasses > Array#* with an integer copies the taint status of the original array even if the array is empty > Array#* with an integer copies the taint status of the original array if the passed count is not 0 > Array#* with a string returns a string which would be infected with taint of the array, its elements or the separator when the array is not empty Array#reverse returns subclass instance on Array subclasses Array#rindex does not fail when removing elements from block > > I have only a question: I've made changes to IListOps.Reverse and IListOps.Repetition in order to make them return IList instead of RubyArray. In ruby, Array#reverse and Array#* maintain the same type of self for the returning object (that is, if self is a RubyArray.Subclass then it is returned a new object of the same type). > With these changes we would actually be able to do something like > this: > >>>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) > => [1, 2, 3, 4, 5] >>>> multiplied_arraylist = arraylist * 2 > => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] >>>> multiplied_arraylist.class > => System::Collections::ArrayList > > Would it be a consistent behaviour? > > On a (partially) unrelated note, I've just noticed that List.Reverse is more like Array#reverse! but it actually take the precedence over IListOps.Reverse. I'm just thinking if this could lead to some sort of confusion (ohan I'm not sure if anything can be done about this. > > Thanks, > Daniele > > > PS: I'm waiting to push these changes on my remote repository, Jim told he is going to pull today but I would like to wait for a review first (and yeah, today I'm too lazy to actually start off a new branch :-)). > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Tomas.Matousek at microsoft.com Tue Apr 21 11:33:15 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 21 Apr 2009 08:33:15 -0700 Subject: [Ironruby-core] Code Review: core/module/autoload In-Reply-To: References: Message-ID: / is not appended if the path ends with /. It is if it ends with \ - which seems like a bug in Ruby that we shouldn't copy. Could you rather implement " Combine" somewhere (in RubyUtils e.g.) that uses / for joining paths but checks if the directory ends with \ or /? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Monday, April 20, 2009 11:52 PM To: ironruby-core at rubyforge.org Cc: IronRuby External Code Reviewers Subject: [Ironruby-core] Code Review: core/module/autoload http://github.com/jschementi/ironruby/commit/bbfa3c4a35cc331e58fb9da9a4097de86ed0dbff autoload uses '/' to join load-path and autoload-path. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=674 This makes Rails 2.3.2 startup without any modifications! =) Changes: - Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/module/autoload_spec.rb - Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/module/fixtures/autoload_join.rb - Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jgbailey at gmail.com Tue Apr 21 12:36:34 2009 From: jgbailey at gmail.com (Justin Bailey) Date: Tue, 21 Apr 2009 09:36:34 -0700 Subject: [Ironruby-core] srand implemented? Message-ID: Is srand implemented? How can I seed the random number generator if not? A quick search showed some discussion about it last May but I didn't see any activity since then ... Justin From ast at atownley.org Tue Apr 21 13:08:07 2009 From: ast at atownley.org (Andrew S. Townley) Date: Tue, 21 Apr 2009 18:08:07 +0100 Subject: [Ironruby-core] WinForms event handling Message-ID: <1240333687.7893.71.camel@linna> Hi, I was doing a bit of experimenting with ironruby today to see if it might be useful for some prototyping work that I'm doing. I noticed that any of the strings returned from the CLR don't automatically include the ruby string methods. I would've expected that these would be mapped directly so that you could call @textfield.text.strip instead of @textfield.text.trim. Probably low on the priority list, but was just curious what the plan was. Assignment to locally created string references doesn't help either. I know it's early days yet, but this sort of thing will make it difficult for people to remember which API applies where--especially if CLR strings "escape" a particular method context. Interesting things seem to also happen if you try and create a CLR type directly: C:\>ir -v IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 C:\>iirb irb(main):001:0> require 'mscorlib' => true irb(main):002:0> s = System::String.new "fubar" TypeError: can't convert String into System::Char* from (irb):0 from :0:in `eval' from workspace.rb:80:in `evaluate' from context.rb:217:in `evaluate' from irb.rb:147:in `eval_input' from irb.rb:253:in `signal_status' from irb.rb:146:in `eval_input' from ruby-lex.rb:230:in `each_top_level_statement' from :0:in `loop' from ruby-lex.rb:229:in `each_top_level_statement' from :0:in `catch' from ruby-lex.rb:227:in `each_top_level_statement' from irb.rb:102:in `eval_input' from irb.rb:69:in `start' from :0:in `catch' from irb.rb:51:in `start' from iirb:0irb(main):003:0> The only way that I've found to ensure that it's really a Ruby string is to do something like this s = "" << clrstring Has anyone else hit this yet? Cheers, ast -- Andrew S. Townley http://atownley.org From Jimmy.Schementi at microsoft.com Tue Apr 21 13:46:46 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 21 Apr 2009 17:46:46 +0000 Subject: [Ironruby-core] WinForms event handling In-Reply-To: <1240333687.7893.71.camel@linna> References: <1240333687.7893.71.camel@linna> Message-ID: In the latest builds this will work: >>> s = System::String.new 'fubar' => 'fubar' >>> s.class => System::String Note that the result is single-quoted; that's a little hint that it's a System::String rather than a Ruby String. The reason they are different is mutability; Ruby strings are mutable, while the CLR's are not. Unfortunately this means that not all the methods on a Ruby string can work on a CLR string (like sub!, slice!, etc), but we have added any non-mutable methods to CLR strings: >>> s.upcase => "FUBAR" And any mutable methods will throw: >>> s.upcase! :0: Mutating method `upcase!' called for an immutable string (System::String) (TypeError) > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Andrew S. Townley > Sent: Tuesday, April 21, 2009 10:08 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] WinForms event handling > > Hi, > > I was doing a bit of experimenting with ironruby today to see if it > might be useful for some prototyping work that I'm doing. I noticed > that any of the strings returned from the CLR don't automatically > include the ruby string methods. I would've expected that these would > be mapped directly so that you could call @textfield.text.strip instead > of @textfield.text.trim. > > Probably low on the priority list, but was just curious what the plan > was. Assignment to locally created string references doesn't help > either. I know it's early days yet, but this sort of thing will make > it > difficult for people to remember which API applies where--especially if > CLR strings "escape" a particular method context. > > Interesting things seem to also happen if you try and create a CLR type > directly: > > C:\>ir -v > IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 > > C:\>iirb > irb(main):001:0> require 'mscorlib' > => true > irb(main):002:0> s = System::String.new "fubar" > TypeError: can't convert String into System::Char* > from (irb):0 > from :0:in `eval' > from workspace.rb:80:in `evaluate' > from context.rb:217:in `evaluate' > from irb.rb:147:in `eval_input' > from irb.rb:253:in `signal_status' > from irb.rb:146:in `eval_input' > from ruby-lex.rb:230:in `each_top_level_statement' > from :0:in `loop' > from ruby-lex.rb:229:in `each_top_level_statement' > from :0:in `catch' > from ruby-lex.rb:227:in `each_top_level_statement' > from irb.rb:102:in `eval_input' > from irb.rb:69:in `start' > from :0:in `catch' > from irb.rb:51:in `start' > from iirb:0irb(main):003:0> > > The only way that I've found to ensure that it's really a Ruby string > is > to do something like this > > s = "" << clrstring > > Has anyone else hit this yet? > > Cheers, > > ast > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Tue Apr 21 13:54:34 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Apr 2009 17:54:34 +0000 Subject: [Ironruby-core] WinForms event handling In-Reply-To: <1240333687.7893.71.camel@linna> References: <1240333687.7893.71.camel@linna> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD18436D07@TK5EX14MBXC101.redmond.corp.microsoft.com> I'm assuming this is the 0.3 release from Rubyforge, is that correct? In the newest build of IronRuby, @textfield.text.strip and @textfield.text.trim both work. It also appears we have fixed the String creation bug you mention (note that '' is a ClrString and "" is a Ruby String): [11] > rbd IronRuby 0.3.0.0 on .NET 2.0.50727.4913 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'temp.dll' => true >>> Foo.bar => 'hello world' >>> r = Foo.bar => 'hello world' >>> r.trim => 'hello world' >>> r.strip => "hello world" >>> s = System::String.new "fubar" => 'fubar' >>> exit C:\temp [12] > gc temp.cs public static class Foo { public static string bar() { return "hello world"; } } C:\temp This build can be built from sources at http://github.com/ironruby/ironruby.git, or we should have a release in the next week or so. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Andrew S. Townley > Sent: Tuesday, April 21, 2009 10:08 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] WinForms event handling > > Hi, > > I was doing a bit of experimenting with ironruby today to see if it > might be useful for some prototyping work that I'm doing. I noticed > that any of the strings returned from the CLR don't automatically > include the ruby string methods. I would've expected that these would > be mapped directly so that you could call @textfield.text.strip instead > of @textfield.text.trim. > > Probably low on the priority list, but was just curious what the plan > was. Assignment to locally created string references doesn't help > either. I know it's early days yet, but this sort of thing will make > it > difficult for people to remember which API applies where--especially if > CLR strings "escape" a particular method context. > > Interesting things seem to also happen if you try and create a CLR type > directly: > > C:\>ir -v > IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 > > C:\>iirb > irb(main):001:0> require 'mscorlib' > => true > irb(main):002:0> s = System::String.new "fubar" > TypeError: can't convert String into System::Char* > from (irb):0 > from :0:in `eval' > from workspace.rb:80:in `evaluate' > from context.rb:217:in `evaluate' > from irb.rb:147:in `eval_input' > from irb.rb:253:in `signal_status' > from irb.rb:146:in `eval_input' > from ruby-lex.rb:230:in `each_top_level_statement' > from :0:in `loop' > from ruby-lex.rb:229:in `each_top_level_statement' > from :0:in `catch' > from ruby-lex.rb:227:in `each_top_level_statement' > from irb.rb:102:in `eval_input' > from irb.rb:69:in `start' > from :0:in `catch' > from irb.rb:51:in `start' > from iirb:0irb(main):003:0> > > The only way that I've found to ensure that it's really a Ruby string > is > to do something like this > > s = "" << clrstring > > Has anyone else hit this yet? > > Cheers, > > ast > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From suppakilla at gmail.com Tue Apr 21 14:42:49 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Tue, 21 Apr 2009 20:42:49 +0200 Subject: [Ironruby-core] More fixes for core/array specs (again) In-Reply-To: <3bf20550904210443t713a912cq7813e867ca6f4e67@mail.gmail.com> References: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> <0AB34E2BFBE88245B073D2D83B4245FD1843571B@TK5EX14MBXC101.redmond.corp.microsoft.com> <3bf20550904210443t713a912cq7813e867ca6f4e67@mail.gmail.com> Message-ID: <3bf20550904211142g46b17a24oe08385cdba421c7f@mail.gmail.com> Just pushed my changes (with the added comment to IListOps.Difference as suggested by Shri). http://github.com/nrk/ironruby/commit/722dd4d2dc233458a49f154b926ea666d2cdb324 Thanks, Daniele On Tue, Apr 21, 2009 at 13:43, Daniele Alessandri wrote: > Right now I don't have access to my local repository, I think to be > able to push on github by 9:00 PM CEST (UTC+2, that's my timezone, it > should be 12:00 PM PDT). > > On Tue, Apr 21, 2009 at 08:39, Jim Deville wrote: >> Daniele, >> >> If you push this out tonight, I'll pull it in tomorrow. >> >> JD >> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Shri Borde >>> Sent: Monday, April 20, 2009 9:58 PM >>> To: ironruby-core at rubyforge.org >>> Subject: Re: [Ironruby-core] More fixes for core/array specs (again) >>> >>> Looks great! >>> >>> Could you copy the comment "# MRI follows hashing semantics here, so >>> doesn't actually call eql?/hash for Fixnum/Symbol" from >>> core\array\minus_spec.rb to IListOps.Difference as its not obvious why >>> the code in IListOps.Difference does the complicated checks. >>> >>> Yes, it seems OK that you can call all the Array methods on >>> System::Collections::ArrayList (and any System::Collectinos::IList >>> object in general). We are exposing Ruby String methods on >>> System::String, and it would be consistent with that approach. >>> >>> About List.Reverse, you could argue that if you use Ruby casing of >>> "reverse", IListOps should get precedence. Could you open a bug for >>> this please? If you use "Reverse", then the CLR method should get >>> precedence, and there would be a possibility of confusion, but as you >>> say, there is not much that can be done. It does not seem worth >>> special-casing. >>> >>> Thanks, >>> Shri >>> >>> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri >>> Sent: Monday, April 20, 2009 12:46 PM >>> To: ironruby-core at rubyforge.org >>> Subject: [Ironruby-core] More fixes for core/array specs (again) >>> >>> Hi, >>> I have attached a diff with new fixes for a whole bunch of failing >>> expectations in the core/array specs. >>> >>> * Slightly modified IListOps.UniqueSelf as suggested upon review. >>> * Fixed IListOps.ReverseIndex as Array#rindex should not fail if >>> elements are removed from the array during the iteration over its >>> elements. >>> * Changed IListOps.Reverse to return IList instances of the same type >>> of the given self argument (this change also fixes the following >>> failing spec: "Array#reverse returns subclass instance on Array >>> subclasses") >>> * Changed IListOps.SetElement to make it try to invoke #to_ary on its >>> argument for multi-element sets. >>> * Changed one overload of IListOps.Equals to make it try to call >>> #to_ary on the object argument of Array#== and use the resulting array >>> as the actual argument for the equality check. >>> * Cleaning up tags removing expectations that do not fail anymore. >>> * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave >>> differently on subclasses of arrays. >>> * Various changes to IListOps.Join to clear all of the remaining tags >>> for the specs of Array#join. The tags marked as critical in >>> join_tags.txt are not related to pending bugs for Array#join. >>> * Changed IListOps.Repetition to return IList instances of the same >>> type of the given self argument (this fixes also "Array#* with an >>> integer returns subclass instance with Array subclasses") >>> * Modified IListOps.RecursiveJoin to make it flag the resulting string >>> as tainted if the given array, at least one of its elements or the >>> separator string are tainted. >>> * IListOps.Difference now uses Object#hash and Object#eql? to check for >>> object equality, this fixes the failing spec "Array#- acts as if using >>> an intermediate hash to collect values" >>> >>> These changes directly clear the following failing expectations: >>> >>> Array#[]= calls to_ary on its rhs argument for multi-element sets >>> Array#== calls to_ary on its argument Array#join tries to convert the >>> passed seperator to a String using #to_str Array#join checks whether >>> the passed seperator responds to #to_str Array#join handles recursive >>> arrays Array#join does not consider taint of either the array or the >>> separator when the array is empty Array#join returns a string which >>> would be infected with taint of the array, its elements or the >>> separator when the array is not empty Array#join does not process the >>> separator if the array is empty Array#join raises a TypeError if the >>> passed separator is not a string and does not respond to #to_str >>> Array#- acts as if using an ?intermediate hash to collect values >>> Array#* with an integer returns subclass instance with Array subclasses >>> Array#* with an integer copies the taint status of the original array >>> even if the array is empty >>> Array#* with an integer copies the taint status of the original array >>> if the passed count is not 0 >>> Array#* with a string returns a string which would be infected with >>> taint of the array, its elements or the separator when the array is not >>> empty Array#reverse returns subclass instance on Array subclasses >>> Array#rindex does not fail when removing elements from block >>> >>> I have only a question: I've made changes to IListOps.Reverse and >>> IListOps.Repetition in order to make them return IList instead of >>> RubyArray. In ruby, Array#reverse and Array#* maintain the same type of >>> self for the returning object (that is, if self is a RubyArray.Subclass >>> then it is returned a new object of the same type). >>> With these changes we would actually be able to do something like >>> this: >>> >>> >>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) >>> => [1, 2, 3, 4, 5] >>> >>> multiplied_arraylist = arraylist * 2 >>> => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] >>> >>> multiplied_arraylist.class >>> => System::Collections::ArrayList >>> >>> Would it be a consistent behaviour? >>> >>> On a (partially) unrelated note, I've just noticed that List.Reverse >>> is more like Array#reverse! but it actually take the precedence over >>> IListOps.Reverse. I'm just thinking if this could lead to some sort of >>> confusion (ohan I'm not sure if anything can be done about this. >>> >>> Thanks, >>> Daniele >>> >>> >>> PS: I'm waiting to push these changes on my remote repository, Jim told >>> he is going to pull today but I would like to wait for a review first >>> (and yeah, today I'm too lazy to actually start off a new branch :-)). >>> >>> -- >>> Daniele Alessandri >>> http://www.clorophilla.net/blog/ >>> http://twitter.com/JoL1hAHN >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From jdeville at microsoft.com Tue Apr 21 14:49:13 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 21 Apr 2009 18:49:13 +0000 Subject: [Ironruby-core] More fixes for core/array specs (again) In-Reply-To: <3bf20550904211142g46b17a24oe08385cdba421c7f@mail.gmail.com> References: <3bf20550904201246h5e4cf75ej2ef8abdcc8852f@mail.gmail.com> <710DF26F214D2B4BB94287123FFE980A2E1A08206A@NA-EXMSG-C104.redmond.corp.microsoft.com> <0AB34E2BFBE88245B073D2D83B4245FD1843571B@TK5EX14MBXC101.redmond.corp.microsoft.com> <3bf20550904210443t713a912cq7813e867ca6f4e67@mail.gmail.com> <3bf20550904211142g46b17a24oe08385cdba421c7f@mail.gmail.com> Message-ID: <0AB34E2BFBE88245B073D2D83B4245FD18437C3B@TK5EX14MBXC101.redmond.corp.microsoft.com> Awesome. I just started putting the other set of changes (Shri, Daniele and Jirapong's changes as of ~7pm yesterday) through the continuous integration troll we call SNAP. I'll start pulling in the next set right away (Expected to be this change, my changes, and Jimmy's changes) JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Tuesday, April 21, 2009 11:43 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] More fixes for core/array specs (again) > > Just pushed my changes (with the added comment to IListOps.Difference > as suggested by Shri). > > http://github.com/nrk/ironruby/commit/722dd4d2dc233458a49f154b926ea666d > 2cdb324 > > Thanks, > Daniele > > > On Tue, Apr 21, 2009 at 13:43, Daniele Alessandri > wrote: > > Right now I don't have access to my local repository, I think to be > > able to push on github by 9:00 PM CEST (UTC+2, that's my timezone, it > > should be 12:00 PM PDT). > > > > On Tue, Apr 21, 2009 at 08:39, Jim Deville > wrote: > >> Daniele, > >> > >> If you push this out tonight, I'll pull it in tomorrow. > >> > >> JD > >> > >>> -----Original Message----- > >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >>> bounces at rubyforge.org] On Behalf Of Shri Borde > >>> Sent: Monday, April 20, 2009 9:58 PM > >>> To: ironruby-core at rubyforge.org > >>> Subject: Re: [Ironruby-core] More fixes for core/array specs > (again) > >>> > >>> Looks great! > >>> > >>> Could you copy the comment "# MRI follows hashing semantics here, > so > >>> doesn't actually call eql?/hash for Fixnum/Symbol" from > >>> core\array\minus_spec.rb to IListOps.Difference as its not obvious > why > >>> the code in IListOps.Difference does the complicated checks. > >>> > >>> Yes, it seems OK that you can call all the Array methods on > >>> System::Collections::ArrayList (and any System::Collectinos::IList > >>> object in general). We are exposing Ruby String methods on > >>> System::String, and it would be consistent with that approach. > >>> > >>> About List.Reverse, you could argue that if you use Ruby casing > of > >>> "reverse", IListOps should get precedence. Could you open a bug for > >>> this please? If you use "Reverse", then the CLR method should get > >>> precedence, and there would be a possibility of confusion, but as > you > >>> say, there is not much that can be done. It does not seem worth > >>> special-casing. > >>> > >>> Thanks, > >>> Shri > >>> > >>> > >>> -----Original Message----- > >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri > >>> Sent: Monday, April 20, 2009 12:46 PM > >>> To: ironruby-core at rubyforge.org > >>> Subject: [Ironruby-core] More fixes for core/array specs (again) > >>> > >>> Hi, > >>> I have attached a diff with new fixes for a whole bunch of failing > >>> expectations in the core/array specs. > >>> > >>> * Slightly modified IListOps.UniqueSelf as suggested upon review. > >>> * Fixed IListOps.ReverseIndex as Array#rindex should not fail if > >>> elements are removed from the array during the iteration over its > >>> elements. > >>> * Changed IListOps.Reverse to return IList instances of the same > type > >>> of the given self argument (this change also fixes the following > >>> failing spec: "Array#reverse returns subclass instance on Array > >>> subclasses") > >>> * Changed IListOps.SetElement to make it try to invoke #to_ary on > its > >>> argument for multi-element sets. > >>> * Changed one overload of IListOps.Equals to make it try to call > >>> #to_ary on the object argument of Array#== and use the resulting > array > >>> as the actual argument for the equality check. > >>> * Cleaning up tags removing expectations that do not fail anymore. > >>> * Added ArrayOps.ToAry as Array#to_a and Array#to_ary behave > >>> differently on subclasses of arrays. > >>> * Various changes to IListOps.Join to clear all of the remaining > tags > >>> for the specs of Array#join. The tags marked as critical in > >>> join_tags.txt are not related to pending bugs for Array#join. > >>> * Changed IListOps.Repetition to return IList instances of the same > >>> type of the given self argument (this fixes also "Array#* with an > >>> integer returns subclass instance with Array subclasses") > >>> * Modified IListOps.RecursiveJoin to make it flag the resulting > string > >>> as tainted if the given array, at least one of its elements or the > >>> separator string are tainted. > >>> * IListOps.Difference now uses Object#hash and Object#eql? to check > for > >>> object equality, this fixes the failing spec "Array#- acts as if > using > >>> an intermediate hash to collect values" > >>> > >>> These changes directly clear the following failing expectations: > >>> > >>> Array#[]= calls to_ary on its rhs argument for multi-element sets > >>> Array#== calls to_ary on its argument Array#join tries to convert > the > >>> passed seperator to a String using #to_str Array#join checks > whether > >>> the passed seperator responds to #to_str Array#join handles > recursive > >>> arrays Array#join does not consider taint of either the array or > the > >>> separator when the array is empty Array#join returns a string which > >>> would be infected with taint of the array, its elements or the > >>> separator when the array is not empty Array#join does not process > the > >>> separator if the array is empty Array#join raises a TypeError if > the > >>> passed separator is not a string and does not respond to #to_str > >>> Array#- acts as if using an intermediate hash to collect values > >>> Array#* with an integer returns subclass instance with Array > subclasses > >>> Array#* with an integer copies the taint status of the original > array > >>> even if the array is empty > >>> Array#* with an integer copies the taint status of the original > array > >>> if the passed count is not 0 > >>> Array#* with a string returns a string which would be infected with > >>> taint of the array, its elements or the separator when the array is > not > >>> empty Array#reverse returns subclass instance on Array subclasses > >>> Array#rindex does not fail when removing elements from block > >>> > >>> I have only a question: I've made changes to IListOps.Reverse and > >>> IListOps.Repetition in order to make them return IList instead of > >>> RubyArray. In ruby, Array#reverse and Array#* maintain the same > type of > >>> self for the returning object (that is, if self is a > RubyArray.Subclass > >>> then it is returned a new object of the same type). > >>> With these changes we would actually be able to do something like > >>> this: > >>> > >>> >>> arraylist = System::Collections::ArrayList.new([1,2,3,4,5]) > >>> => [1, 2, 3, 4, 5] > >>> >>> multiplied_arraylist = arraylist * 2 > >>> => [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] > >>> >>> multiplied_arraylist.class > >>> => System::Collections::ArrayList > >>> > >>> Would it be a consistent behaviour? > >>> > >>> On a (partially) unrelated note, I've just noticed that > List.Reverse > >>> is more like Array#reverse! but it actually take the precedence > over > >>> IListOps.Reverse. I'm just thinking if this could lead to some sort > of > >>> confusion (ohan I'm not sure if anything can be done about this. > >>> > >>> Thanks, > >>> Daniele > >>> > >>> > >>> PS: I'm waiting to push these changes on my remote repository, Jim > told > >>> he is going to pull today but I would like to wait for a review > first > >>> (and yeah, today I'm too lazy to actually start off a new branch :- > )). > >>> > >>> -- > >>> Daniele Alessandri > >>> http://www.clorophilla.net/blog/ > >>> http://twitter.com/JoL1hAHN > >>> _______________________________________________ > >>> Ironruby-core mailing list > >>> Ironruby-core at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > > > > > > > > -- > > Daniele Alessandri > > http://www.clorophilla.net/blog/ > > http://twitter.com/JoL1hAHN > > > > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ast at atownley.org Wed Apr 22 05:26:17 2009 From: ast at atownley.org (Andrew S. Townley) Date: Wed, 22 Apr 2009 10:26:17 +0100 Subject: [Ironruby-core] WinForms event handling In-Reply-To: <=?UTF-8?q?CFB7C72D957821499349BA020F0BCD78148478B7@TK5EX14MBXC101.redmond?=.corp.microsoft.com> References: <1240333687.7893.71.camel@linna> Message-ID: Hi Jimmy, > In the latest builds this will work: > > >>> s = System::String.new 'fubar' > => 'fubar' > >>> s.class > => System::String > > Note that the result is single-quoted; that's a little hint that it's a System::String rather than a Ruby String. The reason they are different is mutability; Ruby strings are mutable, while the CLR's are not. Unfortunately this means that not all the methods on a Ruby string can work on a CLR string (like sub!, slice!, etc), but we have added any non-mutable methods to CLR strings: > > >>> s.upcase > => "FUBAR" > > And any mutable methods will throw: > > >>> s.upcase! > :0: Mutating method `upcase!' called for an immutable string (System::String) (TypeError) I'd forgotten that CLR strings were immutable. It's been a while since I was doing anything on the CLR. Cheers for the feedback. ast > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Andrew S. Townley > > Sent: Tuesday, April 21, 2009 10:08 AM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] WinForms event handling > > > > Hi, > > > > I was doing a bit of experimenting with ironruby today to see if it > > might be useful for some prototyping work that I'm doing. I noticed > > that any of the strings returned from the CLR don't automatically > > include the ruby string methods. I would've expected that these would > > be mapped directly so that you could call @textfield.text.strip instead > > of @textfield.text.trim. > > > > Probably low on the priority list, but was just curious what the plan > > was. Assignment to locally created string references doesn't help > > either. I know it's early days yet, but this sort of thing will make > > it > > difficult for people to remember which API applies where--especially if > > CLR strings "escape" a particular method context. > > > > Interesting things seem to also happen if you try and create a CLR type > > directly: > > > > C:\>ir -v > > IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 > > > > C:\>iirb > > irb(main):001:0> require 'mscorlib' > > => true > > irb(main):002:0> s = System::String.new "fubar" > > TypeError: can't convert String into System::Char* > > from (irb):0 > > from :0:in `eval' > > from workspace.rb:80:in `evaluate' > > from context.rb:217:in `evaluate' > > from irb.rb:147:in `eval_input' > > from irb.rb:253:in `signal_status' > > from irb.rb:146:in `eval_input' > > from ruby-lex.rb:230:in `each_top_level_statement' > > from :0:in `loop' > > from ruby-lex.rb:229:in `each_top_level_statement' > > from :0:in `catch' > > from ruby-lex.rb:227:in `each_top_level_statement' > > from irb.rb:102:in `eval_input' > > from irb.rb:69:in `start' > > from :0:in `catch' > > from irb.rb:51:in `start' > > from iirb:0irb(main):003:0> > > > > The only way that I've found to ensure that it's really a Ruby string > > is > > to do something like this > > > > s = "" << clrstring > > > > Has anyone else hit this yet? > > > > Cheers, > > > > ast > > -- > > Andrew S. Townley > > http://atownley.org > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -- Andrew S. Townley http://atownley.org From ast at atownley.org Wed Apr 22 05:45:17 2009 From: ast at atownley.org (Andrew S. Townley) Date: Wed, 22 Apr 2009 10:45:17 +0100 Subject: [Ironruby-core] WinForms event handling In-Reply-To: <=?UTF-8?q?0AB34E2BFBE88245B073D2D83B4245FD18436D07@TK5EX14MBXC101.redmond?=.corp.microsoft.com> References: <0AB34E2BFBE88245B073D2D83B4245FD18436D07@TK5EX14MBXC101.redmond.corp.microsoft.com> <1240333687.7893.71.camel@linna> Message-ID: Hi Jim > I'm assuming this is the 0.3 release from Rubyforge, is that correct? Yes. That's correct. > In the newest build of IronRuby, @textfield.text.strip and @textfield.text.trim both work. It also appears we have fixed the String creation bug you mention (note that '' is a ClrString and "" is a Ruby String): > > [11] > rbd > IronRuby 0.3.0.0 on .NET 2.0.50727.4913 > Copyright (c) Microsoft Corporation. All rights reserved. > > >>> require 'temp.dll' > => true > >>> Foo.bar > => 'hello world' > >>> r = Foo.bar > => 'hello world' > >>> r.trim > => 'hello world' > >>> r.strip > => "hello world" > >>> s = System::String.new "fubar" > => 'fubar' > >>> exit > C:\temp > [12] > gc temp.cs > public static class Foo { > public static string bar() { > return "hello world"; > } > } > C:\temp > > This build can be built from sources at http://github.com/ironruby/ironruby.git, or we should have a release in the next week or so. All sounds good. I hit another problem with the core library that I was trying to bring to the CLR which will keep the IronRuby use on hold for a while. It works with JRuby on both Windows and Linux, but one of the gems I need, uuid, uses flock which chokes in the 0.3.0 build. One of the other things I noticed trying to pull in code that works in MRE and JRuby is that IronRuby asked me for gems that I'd never heard of before on the other environments. It must be much more aggressive about pre-compiling the dependencies than the other implementations. Perhaps that's part of the start-up time issue. There's ~12K lines of code in the library I'm experimenting with (not counting the gems it uses--of which there are a few), and it takes *ages* for the main import to return from iirb. This is probably better in the next release too, so I'll try again to see how it goes. I'm looking forward to seeing this mature rapidly, because it looks like the best option for building native Windows GUI applications with Ruby. In fairness, that's really the only reason that I'm interested in it. The other options all seem to be not quite as polished as I'd like or are too close to the Win32 API. I had my fill of that back in the days when I was forced into MFC, so I don't want to go there again if I don't have to. In the near term, it's looking like I'm going to have to go down the JRuby route to get my application working on Windows. At the moment, it's using MRE and the Ruby/GNOME2 bindings under Linux, but I need it on Windows for some things. Hopefully, the main thrust of IronRuby really isn't to deal with testing or Silverlight, as it would seem to appear from most of the Google search results. I think there's a very real need for a complete Ruby implementation that's tightly integrated with the CLR for building "real" applications for Windows in much the same way that Apple is integrating YARV with the Cocoa APIs to make building apps for the Mac much more straightforward. I've used MFC/C++, WinForms/C#, JFC/Java, GTK+/Python & Ruby, NEXTSTEP/AppKit/ObjC and a few other minor environments, and I'd prefer never to go back to building UIs with compiled languages again. :) Thanks again for the help and the quick response. Keep up the good work! Cheers, ast > > JD > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Andrew S. Townley > > Sent: Tuesday, April 21, 2009 10:08 AM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] WinForms event handling > > > > Hi, > > > > I was doing a bit of experimenting with ironruby today to see if it > > might be useful for some prototyping work that I'm doing. I noticed > > that any of the strings returned from the CLR don't automatically > > include the ruby string methods. I would've expected that these would > > be mapped directly so that you could call @textfield.text.strip instead > > of @textfield.text.trim. > > > > Probably low on the priority list, but was just curious what the plan > > was. Assignment to locally created string references doesn't help > > either. I know it's early days yet, but this sort of thing will make > > it > > difficult for people to remember which API applies where--especially if > > CLR strings "escape" a particular method context. > > > > Interesting things seem to also happen if you try and create a CLR type > > directly: > > > > C:\>ir -v > > IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 > > > > C:\>iirb > > irb(main):001:0> require 'mscorlib' > > => true > > irb(main):002:0> s = System::String.new "fubar" > > TypeError: can't convert String into System::Char* > > from (irb):0 > > from :0:in `eval' > > from workspace.rb:80:in `evaluate' > > from context.rb:217:in `evaluate' > > from irb.rb:147:in `eval_input' > > from irb.rb:253:in `signal_status' > > from irb.rb:146:in `eval_input' > > from ruby-lex.rb:230:in `each_top_level_statement' > > from :0:in `loop' > > from ruby-lex.rb:229:in `each_top_level_statement' > > from :0:in `catch' > > from ruby-lex.rb:227:in `each_top_level_statement' > > from irb.rb:102:in `eval_input' > > from irb.rb:69:in `start' > > from :0:in `catch' > > from irb.rb:51:in `start' > > from iirb:0irb(main):003:0> > > > > The only way that I've found to ensure that it's really a Ruby string > > is > > to do something like this > > > > s = "" << clrstring > > > > Has anyone else hit this yet? > > > > Cheers, > > > > ast > > -- > > Andrew S. Townley > > http://atownley.org > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -- Andrew S. Townley http://atownley.org From thibaut.barrere at gmail.com Wed Apr 22 07:00:01 2009 From: thibaut.barrere at gmail.com (thibaut.barrere at gmail.com) Date: Wed, 22 Apr 2009 13:00:01 +0200 Subject: [Ironruby-core] WinForms event handling In-Reply-To: References: <0AB34E2BFBE88245B073D2D83B4245FD18436D07@TK5EX14MBXC101.redmond.corp.microsoft.com> <1240333687.7893.71.camel@linna> Message-ID: Quick message from phone: if windows forms or wpf is an option for you, have a look here: Http://www.github.com/thbar/magic Cheers -- Thibaut Le 22 avr. 09 ? 11:45, "Andrew S. Townley" a ?crit : > Hi Jim > >> I'm assuming this is the 0.3 release from Rubyforge, is that correct? > > Yes. That's correct. > >> In the newest build of IronRuby, @textfield.text.strip and >> @textfield.text.trim both work. It also appears we have fixed the >> String creation bug you mention (note that '' is a ClrString and "" >> is a Ruby String): >> >> [11] > rbd >> IronRuby 0.3.0.0 on .NET 2.0.50727.4913 >> Copyright (c) Microsoft Corporation. All rights reserved. >> >>>>> require 'temp.dll' >> => true >>>>> Foo.bar >> => 'hello world' >>>>> r = Foo.bar >> => 'hello world' >>>>> r.trim >> => 'hello world' >>>>> r.strip >> => "hello world" >>>>> s = System::String.new "fubar" >> => 'fubar' >>>>> exit >> C:\temp >> [12] > gc temp.cs >> public static class Foo { >> public static string bar() { >> return "hello world"; >> } >> } >> C:\temp >> >> This build can be built from sources at http://github.com/ironruby/ironruby.git >> , or we should have a release in the next week or so. > > All sounds good. I hit another problem with the core library that I > was trying to bring to the CLR which will keep the IronRuby use on > hold for a while. It works with JRuby on both Windows and Linux, > but one of the gems I need, uuid, uses flock which chokes in the > 0.3.0 build. > > One of the other things I noticed trying to pull in code that works > in MRE and JRuby is that IronRuby asked me for gems that I'd never > heard of before on the other environments. It must be much more > aggressive about pre-compiling the dependencies than the other > implementations. Perhaps that's part of the start-up time issue. > > There's ~12K lines of code in the library I'm experimenting with > (not counting the gems it uses--of which there are a few), and it > takes *ages* for the main import to return from iirb. This is > probably better in the next release too, so I'll try again to see > how it goes. > > I'm looking forward to seeing this mature rapidly, because it looks > like the best option for building native Windows GUI applications > with Ruby. In fairness, that's really the only reason that I'm > interested in it. The other options all seem to be not quite as > polished as I'd like or are too close to the Win32 API. I had my > fill of that back in the days when I was forced into MFC, so I don't > want to go there again if I don't have to. > > In the near term, it's looking like I'm going to have to go down the > JRuby route to get my application working on Windows. At the > moment, it's using MRE and the Ruby/GNOME2 bindings under Linux, but > I need it on Windows for some things. > > Hopefully, the main thrust of IronRuby really isn't to deal with > testing or Silverlight, as it would seem to appear from most of the > Google search results. I think there's a very real need for a > complete Ruby implementation that's tightly integrated with the CLR > for building "real" applications for Windows in much the same way > that Apple is integrating YARV with the Cocoa APIs to make building > apps for the Mac much more straightforward. > > I've used MFC/C++, WinForms/C#, JFC/Java, GTK+/Python & Ruby, > NEXTSTEP/AppKit/ObjC and a few other minor environments, and I'd > prefer never to go back to building UIs with compiled languages > again. :) > > Thanks again for the help and the quick response. Keep up the good > work! > > Cheers, > > ast > >> >> JD >> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Andrew S. Townley >>> Sent: Tuesday, April 21, 2009 10:08 AM >>> To: ironruby-core at rubyforge.org >>> Subject: [Ironruby-core] WinForms event handling >>> >>> Hi, >>> >>> I was doing a bit of experimenting with ironruby today to see if it >>> might be useful for some prototyping work that I'm doing. I noticed >>> that any of the strings returned from the CLR don't automatically >>> include the ruby string methods. I would've expected that these >>> would >>> be mapped directly so that you could call @textfield.text.strip >>> instead >>> of @textfield.text.trim. >>> >>> Probably low on the priority list, but was just curious what the >>> plan >>> was. Assignment to locally created string references doesn't help >>> either. I know it's early days yet, but this sort of thing will >>> make >>> it >>> difficult for people to remember which API applies where-- >>> especially if >>> CLR strings "escape" a particular method context. >>> >>> Interesting things seem to also happen if you try and create a CLR >>> type >>> directly: >>> >>> C:\>ir -v >>> IronRuby 0.3 0.3.0.0 on .NET 2.0.0.0 >>> >>> C:\>iirb >>> irb(main):001:0> require 'mscorlib' >>> => true >>> irb(main):002:0> s = System::String.new "fubar" >>> TypeError: can't convert String into System::Char* >>> from (irb):0 >>> from :0:in `eval' >>> from workspace.rb:80:in `evaluate' >>> from context.rb:217:in `evaluate' >>> from irb.rb:147:in `eval_input' >>> from irb.rb:253:in `signal_status' >>> from irb.rb:146:in `eval_input' >>> from ruby-lex.rb:230:in `each_top_level_statement' >>> from :0:in `loop' >>> from ruby-lex.rb:229:in `each_top_level_statement' >>> from :0:in `catch' >>> from ruby-lex.rb:227:in `each_top_level_statement' >>> from irb.rb:102:in `eval_input' >>> from irb.rb:69:in `start' >>> from :0:in `catch' >>> from irb.rb:51:in `start' >>> from iirb:0irb(main):003:0> >>> >>> The only way that I've found to ensure that it's really a Ruby >>> string >>> is >>> to do something like this >>> >>> s = "" << clrstring >>> >>> Has anyone else hit this yet? >>> >>> Cheers, >>> >>> ast >>> -- >>> Andrew S. Townley >>> http://atownley.org >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > > -- > Andrew S. Townley > http://atownley.org > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ast at atownley.org Wed Apr 22 07:09:31 2009 From: ast at atownley.org (Andrew S. Townley) Date: Wed, 22 Apr 2009 12:09:31 +0100 Subject: [Ironruby-core] RUBYLIB environment variable? Message-ID: <1240398571.8651.11.camel@linna> Hi, I did some Googling, but I didn't see anything about this particular issue. It seems that IronRuby (the latest release from rubyforge) ignores the RUBYLIB environment variable, leaving $: set to the default. The only way to add local paths seems to be to use the -I command line arguments. While this works, I'm surprised that RUBYLIB isn't supported. I was pleasantly surprised when I installed JRuby and fired it up to test things and noticed that I didn't have to do anything different than in MRE to have it find files. I didn't see any issues about this on CodePlex, but I wanted to check before I entered one. Cheers, ast -- Andrew S. Townley http://atownley.org From ast at atownley.org Wed Apr 22 07:59:00 2009 From: ast at atownley.org (Andrew S. Townley) Date: Wed, 22 Apr 2009 12:59:00 +0100 Subject: [Ironruby-core] WinForms event handling In-Reply-To: References: <0AB34E2BFBE88245B073D2D83B4245FD18436D07@TK5EX14MBXC101.redmond.corp.microsoft.com> <1240333687.7893.71.camel@linna> Message-ID: <1240401540.8651.23.camel@linna> On Wed, 2009-04-22 at 13:00 +0200, thibaut.barrere at gmail.com wrote: > Quick message from phone: if windows forms or wpf is an option for > you, have a look here: > > Http://www.github.com/thbar/magic > > Cheers > > -- Thibaut > > Le 22 avr. 09 ? 11:45, "Andrew S. Townley" a > ?crit : Hi Thilbaut, Thanks for the pointer. That might certainly work for the UI part. However, I'm not sure that IronRuby's quite ready for the rest of my codebase. It looks cool, though. Cheers, ast -- Andrew S. Townley http://atownley.org From suppakilla at gmail.com Wed Apr 22 08:43:32 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Wed, 22 Apr 2009 14:43:32 +0200 Subject: [Ironruby-core] Strange behavior when redefining methods on object instances (possible bug) Message-ID: <3bf20550904220543t2b19f185t374b82eafaf2eeb1@mail.gmail.com> Hi, while in the process of trimming down the failure rate of the core/array specs I noticed a strange behavior of IronRuby. I'm pasting here two repl sessions I used to reproduce it: >>> foo = Object.new => # >>> bar = Object.new => # >>> >>> def foo.to_s; p "foo#to_s has been invoked"; "foo" end; => nil >>> >>> foo "foo#to_s has been invoked" => foo >>> bar => # As you can see there is nothing wrong here, so here is the second session where the only difference is in that the order of foo and bar at the end of the snippet is inverted: >>> foo = Object.new => # >>> bar = Object.new => # >>> >>> def foo.to_s; p "foo#to_s has been invoked"; "foo" end; => nil >>> >>> bar => # >>> foo => # I would expect to get "foo#to_s has been invoked" printed just like in the first snippet (and IRB on MRI behave like expected), but instead the method called on foo is the one of Object#to_s (a step-by-step debug session confirmed this). Could it be related to some issues in the method caching stuff that happens deep into the internals of IronRuby? This problem affects certain mocking scenarios when running mspec (eg. "Array#== returns false if any element is not == to the corresponding element in the other the array" and "Array#delete removes elements that are #== to object", but their implementation looks ok to me), so it might even be possible that more specs which are being reported as failures are not related to bogus implementations, but it is just mspec that is failing due to a bug. Is there anyone that can confirm this before I file a bug on the bug tracker? Thanks, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From sanxiyn at gmail.com Wed Apr 22 08:55:10 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 22 Apr 2009 21:55:10 +0900 Subject: [Ironruby-core] RUBYLIB environment variable? In-Reply-To: <1240398571.8651.11.camel@linna> References: <1240398571.8651.11.camel@linna> Message-ID: <5b0248170904220555s7bb9a12bu3182b5c22f026a2@mail.gmail.com> 2009/4/22 Andrew S. Townley : > The only way to add local paths seems to be to use the -I command line > arguments. ?While this works, I'm surprised that RUBYLIB isn't > supported. ?I was pleasantly surprised when I installed JRuby and fired > it up to test things and noticed that I didn't have to do anything > different than in MRE to have it find files. IronRuby is not as mature as JRuby. > I didn't see any issues about this on CodePlex, but I wanted to check > before I entered one. Please enter one! -- Seo Sanghyeon From ast at atownley.org Wed Apr 22 10:50:20 2009 From: ast at atownley.org (Andrew S. Townley) Date: Wed, 22 Apr 2009 15:50:20 +0100 Subject: [Ironruby-core] RUBYLIB environment variable? In-Reply-To: <5b0248170904220555s7bb9a12bu3182b5c22f026a2@mail.gmail.com> References: <1240398571.8651.11.camel@linna> <5b0248170904220555s7bb9a12bu3182b5c22f026a2@mail.gmail.com> Message-ID: <1240411820.23631.11.camel@linna> On Wed, 2009-04-22 at 21:55 +0900, Seo Sanghyeon wrote: > 2009/4/22 Andrew S. Townley : > > The only way to add local paths seems to be to use the -I command line > > arguments. While this works, I'm surprised that RUBYLIB isn't > > supported. I was pleasantly surprised when I installed JRuby and fired > > it up to test things and noticed that I didn't have to do anything > > different than in MRE to have it find files. > > IronRuby is not as mature as JRuby. Yeah, I know... :) Still, this is one of the main features that I use when doing local development so I don't have to remember/retype long command lines when I'm experimenting or running commands. > > I didn't see any issues about this on CodePlex, but I wanted to check > > before I entered one. > > Please enter one! Done. http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=718 Cheers, ast -- Andrew S. Townley http://atownley.org From Tomas.Matousek at microsoft.com Wed Apr 22 11:37:39 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 22 Apr 2009 08:37:39 -0700 Subject: [Ironruby-core] Strange behavior when redefining methods on object instances (possible bug) In-Reply-To: <3bf20550904220543t2b19f185t374b82eafaf2eeb1@mail.gmail.com> References: <3bf20550904220543t2b19f185t374b82eafaf2eeb1@mail.gmail.com> Message-ID: Please file a bug. Thanks, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Wednesday, April 22, 2009 5:44 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Strange behavior when redefining methods on object instances (possible bug) Hi, while in the process of trimming down the failure rate of the core/array specs I noticed a strange behavior of IronRuby. I'm pasting here two repl sessions I used to reproduce it: >>> foo = Object.new => # >>> bar = Object.new => # >>> >>> def foo.to_s; p "foo#to_s has been invoked"; "foo" end; => nil >>> >>> foo "foo#to_s has been invoked" => foo >>> bar => # As you can see there is nothing wrong here, so here is the second session where the only difference is in that the order of foo and bar at the end of the snippet is inverted: >>> foo = Object.new => # >>> bar = Object.new => # >>> >>> def foo.to_s; p "foo#to_s has been invoked"; "foo" end; => nil >>> >>> bar => # >>> foo => # I would expect to get "foo#to_s has been invoked" printed just like in the first snippet (and IRB on MRI behave like expected), but instead the method called on foo is the one of Object#to_s (a step-by-step debug session confirmed this). Could it be related to some issues in the method caching stuff that happens deep into the internals of IronRuby? This problem affects certain mocking scenarios when running mspec (eg. "Array#== returns false if any element is not == to the corresponding element in the other the array" and "Array#delete removes elements that are #== to object", but their implementation looks ok to me), so it might even be possible that more specs which are being reported as failures are not related to bogus implementations, but it is just mspec that is failing due to a bug. Is there anyone that can confirm this before I file a bug on the bug tracker? Thanks, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Apr 22 11:59:28 2009 From: lists at ruby-forum.com (Kevin Radcliffe) Date: Wed, 22 Apr 2009 17:59:28 +0200 Subject: [Ironruby-core] Requiring standard libraries within hosted DLR Runtime Message-ID: <7511ae405282ce15ff40d8a8678c3e80@ruby-forum.com> Hello, I previously tried sending this to the mailing list (on 04/17), but it doesn't appear to have arrived there. I did a git pull today (04/22/09), and rake compile, so I am using the very latest sources.. I'm trying to attempt something simple but I can't seem to get the hosted environment do to what I'm expecting. I'm trying to require any of the standard libraries (socket, digest, bigdecimal, etc.) from within the hosted runtime. Within my C# app: var engine = IronRuby.Ruby.CreateEngine(); engine.Execute("puts 'A'"); engine.Execute("require 'socket'"); So the "A" prints as expected, but I get an "IronRuby.Builtins.LoadError" when I am at the require. The error message is: {"no such file to load -- socket"} Do I need to do something special to get at the libraries within IronRuby.Libraries? require 'socket' does work just fine when running from the ir.exe console... I've attached the program.cs and the details of the stack trace to this forum post as a zip. Thanks, Kevin Radcliffe Attachments: http://www.ruby-forum.com/attachment/3607/DLRHosted.zip -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Wed Apr 22 12:41:39 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 22 Apr 2009 09:41:39 -0700 Subject: [Ironruby-core] Requiring standard libraries within hosted DLR Runtime In-Reply-To: <7511ae405282ce15ff40d8a8678c3e80@ruby-forum.com> References: <7511ae405282ce15ff40d8a8678c3e80@ruby-forum.com> Message-ID: Do you have the right library paths set? engine.Execute("puts $:"); If not, you can either set them in App.config of your app (see ir.exe.config) or explicitly using engine.SetSearchPaths(). Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Kevin Radcliffe Sent: Wednesday, April 22, 2009 8:59 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Requiring standard libraries within hosted DLR Runtime Hello, I previously tried sending this to the mailing list (on 04/17), but it doesn't appear to have arrived there. I did a git pull today (04/22/09), and rake compile, so I am using the very latest sources.. I'm trying to attempt something simple but I can't seem to get the hosted environment do to what I'm expecting. I'm trying to require any of the standard libraries (socket, digest, bigdecimal, etc.) from within the hosted runtime. Within my C# app: var engine = IronRuby.Ruby.CreateEngine(); engine.Execute("puts 'A'"); engine.Execute("require 'socket'"); So the "A" prints as expected, but I get an "IronRuby.Builtins.LoadError" when I am at the require. The error message is: {"no such file to load -- socket"} Do I need to do something special to get at the libraries within IronRuby.Libraries? require 'socket' does work just fine when running from the ir.exe console... I've attached the program.cs and the details of the stack trace to this forum post as a zip. Thanks, Kevin Radcliffe Attachments: http://www.ruby-forum.com/attachment/3607/DLRHosted.zip -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Wed Apr 22 12:51:56 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 22 Apr 2009 09:51:56 -0700 Subject: [Ironruby-core] Interop with Excel In-Reply-To: <2d42c4497ad957def3e1417c4400b0b3@ruby-forum.com> References: <2d42c4497ad957def3e1417c4400b0b3@ruby-forum.com> Message-ID: This should now mostly work. respond_to? is not supported for COM yet, but "methods" is (try workbooks.methods(false)). require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' include Microsoft::Office::Interop::Excel excel = ApplicationClass.new excel.Visible = true workbooks = excel.Workbooks workbooks.Open('c:\\foo.xsl') You can also do: def newCOM progId System::Activator.CreateInstance(System::Type.GetTypeFromProgID(progId)) end ex = newCOM("Excel.Application") ex.Visible = true nb = ex.Workbooks.Add ws = nb.Worksheets[1] p ws.Name 10.times do |i| 10.times do |j| ws.Cells[i + 1, j + 1] = (i + 1) * (j + 1) end end Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jeff Siebold Sent: Wednesday, April 08, 2009 9:08 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Interop with Excel I'm replying to my own post because it looks like I found part of my problem. I changed the code to: require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' include Microsoft::Office::Interop::Excel excel = ApplicationClass.new excel.Visible = true and that works. But I'm still having trouble getting access a Workbook: p excel.ActiveWorkbook workbooks = excel.Workbooks p workbooks.respond_to?('Open') returns: nil false I would be grateful for any help. Thanks, Jeff Jeff Siebold wrote: > The following code runs fine: > > require 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, > Culture=neutral, PublicKeyToken=71e9bce111e9429c' > Excel = Microsoft::Office::Interop::Excel > > but when I try to get the Application object as follows: > > app = Excel.Application.new > > I get the following error: > > excel.rb:0: undefined method `Application' for > Microsoft::Office::Interop::Excel:Module (NoMethodError) > > am I not understanding how this works or is this just not working yet? -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jirapong.nanta at gmail.com Wed Apr 22 12:53:31 2009 From: jirapong.nanta at gmail.com (jirapong.nanta at gmail.com) Date: Wed, 22 Apr 2009 23:53:31 +0700 Subject: [Ironruby-core] Requiring standard libraries within hosted DLR Runtime In-Reply-To: <7511ae405282ce15ff40d8a8678c3e80@ruby-forum.com> References: <7511ae405282ce15ff40d8a8678c3e80@ruby-forum.com> Message-ID: Hi Kevin, Let's assume you have ironruby at c:\ironruby . add App.config from http://gist.github.com/99910 to your project. Hope this helps, -Jirapong On Apr 22, 2009, at 10:59 PM, Kevin Radcliffe wrote: > Hello, > > I previously tried sending this to the mailing list (on 04/17), but it > doesn't appear to have arrived there. > > I did a git pull today (04/22/09), and rake compile, so I am using the > very latest sources.. > I'm trying to attempt something simple but I can't seem to get the > hosted environment do to what I'm expecting. > I'm trying to require any of the standard libraries (socket, digest, > bigdecimal, etc.) from within the hosted runtime. > Within my C# app: > > var engine = IronRuby.Ruby.CreateEngine(); > engine.Execute("puts 'A'"); > engine.Execute("require 'socket'"); > > So the "A" prints as expected, but I get an > "IronRuby.Builtins.LoadError" when I am at the require. > The error message is: {"no such file to load -- socket"} > > Do I need to do something special to get at the libraries within > IronRuby.Libraries? > require 'socket' does work just fine when running from the ir.exe > console... > > I've attached the program.cs and the > details of the stack trace to this forum post as a zip. > > Thanks, > Kevin Radcliffe > > Attachments: > http://www.ruby-forum.com/attachment/3607/DLRHosted.zip > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 22 13:44:43 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 22 Apr 2009 17:44:43 +0000 Subject: [Ironruby-core] Code Review: core/module/autoload In-Reply-To: References: Message-ID: http://github.com/jschementi/ironruby/commit/78bd7541cebae33b3b07bfed17ce74a63ecb49d4 Code review updates: - Don't combine paths with '/' if the base-path already ends with '/' or '\\' * Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs * Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs > -----Original Message----- > From: Tomas Matousek > Sent: Tuesday, April 21, 2009 8:33 AM > To: ironruby-core at rubyforge.org > Cc: IronRuby External Code Reviewers > Subject: RE: Code Review: core/module/autoload > > / is not appended if the path ends with /. It is if it ends with \ - > which seems like a bug in Ruby that we shouldn't copy. > Could you rather implement " Combine" somewhere (in RubyUtils e.g.) > that uses / for joining paths but checks if the directory ends with \ > or /? > > Tomas > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Monday, April 20, 2009 11:52 PM > To: ironruby-core at rubyforge.org > Cc: IronRuby External Code Reviewers > Subject: [Ironruby-core] Code Review: core/module/autoload > > http://github.com/jschementi/ironruby/commit/bbfa3c4a35cc331e58fb9da9a4 > 097de86ed0dbff > > autoload uses '/' to join load-path and autoload-path. > Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=674 > > This makes Rails 2.3.2 startup without any modifications! =) > > Changes: > - > Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/m > odule/autoload_spec.rb > - > Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/m > odule/fixtures/autoload_join.rb > - Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Wed Apr 22 13:46:54 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 22 Apr 2009 10:46:54 -0700 Subject: [Ironruby-core] Code Review: core/module/autoload In-Reply-To: References: Message-ID: Looks good. Tomas -----Original Message----- From: Jimmy Schementi Sent: Wednesday, April 22, 2009 10:45 AM To: Tomas Matousek; ironruby-core at rubyforge.org Cc: IronRuby External Code Reviewers Subject: RE: Code Review: core/module/autoload http://github.com/jschementi/ironruby/commit/78bd7541cebae33b3b07bfed17ce74a63ecb49d4 Code review updates: - Don't combine paths with '/' if the base-path already ends with '/' or '\\' * Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs * Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyUtils.cs > -----Original Message----- > From: Tomas Matousek > Sent: Tuesday, April 21, 2009 8:33 AM > To: ironruby-core at rubyforge.org > Cc: IronRuby External Code Reviewers > Subject: RE: Code Review: core/module/autoload > > / is not appended if the path ends with /. It is if it ends with \ - > which seems like a bug in Ruby that we shouldn't copy. > Could you rather implement " Combine" somewhere (in RubyUtils e.g.) > that uses / for joining paths but checks if the directory ends with \ > or /? > > Tomas > > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Monday, April 20, 2009 11:52 PM > To: ironruby-core at rubyforge.org > Cc: IronRuby External Code Reviewers > Subject: [Ironruby-core] Code Review: core/module/autoload > > http://github.com/jschementi/ironruby/commit/bbfa3c4a35cc331e58fb9da9a4 > 097de86ed0dbff > > autoload uses '/' to join load-path and autoload-path. > Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=674 > > This makes Rails 2.3.2 startup without any modifications! =) > > Changes: > - > Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/m > odule/autoload_spec.rb > - > Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/core/m > odule/fixtures/autoload_join.rb > - Merlin/Main/Languages/Ruby/Ruby/Runtime/Loader.cs > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Apr 22 14:27:25 2009 From: lists at ruby-forum.com (Kevin Radcliffe) Date: Wed, 22 Apr 2009 20:27:25 +0200 Subject: [Ironruby-core] Requiring standard libraries within hosted DLR Runtime In-Reply-To: References: <7511ae405282ce15ff40d8a8678c3e80@ruby-forum.com> Message-ID: Jirapong Nanta wrote: > Hi Kevin, > Let's assume you have ironruby at c:\ironruby . add App.config from > http://gist.github.com/99910 > to your project. > > Hope this helps, > -Jirapong Jirapong, Tomas, It looks like that was it. I needed my searchpaths to be set. I didn't realize they needed to be set. Looking at it now, it makes sense. Thanks, Kevin Radcliffe -- Posted via http://www.ruby-forum.com/. From ben2004uk at googlemail.com Wed Apr 22 17:57:14 2009 From: ben2004uk at googlemail.com (Ben Hall) Date: Wed, 22 Apr 2009 22:57:14 +0100 Subject: [Ironruby-core] Sinatra fails on both 0.3 and custom build Message-ID: Hello, Just tried to run Sinatra however running into some difficultly. Firstly, I installed Sinarta via gems. I then tried the sample off their website: require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end When running it via ir I get the following error message: E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>ir hi.rb E:\IronRubyGit\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:711:in `OpenFileForRead': No such file or directory - sinatra.rb (Errno::ENOENT) from :0:in `read' from base.rb:605:in `use_in_file_templates!' from (__DELEGATE__):1:in `use_in_file_templates!' from sinatra.rb:0 from :0:in `require' from custom_require.rb:26:in `require' from hi.rb:0 E:\IronRubyGit\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs:711:in `OpenFileForRead': No such file or directory - sinatra.rb (Errno::ENOENT) from :0:in `read' from base.rb:605:in `use_in_file_templates!' from (__DELEGATE__):1:in `use_in_file_templates!' from sinatra.rb:0 from :0:in `require' from custom_require.rb:26:in `require' from hi.rb:0 After a bit of searching, I found that it works via rbd. So I can dev.bat and got the following: E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>rbd hi.rb E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug> It didn't fail, but it also didn't do what I expected. What I expected was this: E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>ruby hi.rb == Sinatra/0.9.1.1 has taken the stage on 4567 for development with backup from WEBrick [2009-04-22 22:55:52] INFO WEBrick 1.3.1 [2009-04-22 22:55:52] INFO ruby 1.8.6 (2007-09-24) [i386-mswin32] [2009-04-22 22:55:52] INFO WEBrick::HTTPServer#start: pid=6012 port=4567 Am I doing something wrong or is Sinatra not yet supported? Thanks Ben From Jimmy.Schementi at microsoft.com Wed Apr 22 19:11:31 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 22 Apr 2009 23:11:31 +0000 Subject: [Ironruby-core] Sinatra fails on both 0.3 and custom build In-Reply-To: References: Message-ID: Haven't looked at Sinatra in a couple weeks, but I'm planning on demoing it at RailsConf, so I'll be looking at it very soon =) > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Wednesday, April 22, 2009 2:57 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Sinatra fails on both 0.3 and custom build > > Hello, > > Just tried to run Sinatra however running into some difficultly. > Firstly, I installed Sinarta via gems. I then tried the sample off > their website: > require 'rubygems' > require 'sinatra' > get '/hi' do > "Hello World!" > end > > When running it via ir I get the following error message: > > E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>ir hi.rb > E:\IronRubyGit\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRI > CTED\Builtins\IoOps.cs:711:in > `OpenFileForRead': > No such file or directory - sinatra.rb (Errno::ENOENT) > from :0:in `read' > from base.rb:605:in `use_in_file_templates!' > from (__DELEGATE__):1:in `use_in_file_templates!' > from sinatra.rb:0 > from :0:in `require' > from custom_require.rb:26:in `require' > from hi.rb:0 > > E:\IronRubyGit\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRI > CTED\Builtins\IoOps.cs:711:in > `OpenFileForRead': > No such file or directory - sinatra.rb (Errno::ENOENT) > from :0:in `read' > from base.rb:605:in `use_in_file_templates!' > from (__DELEGATE__):1:in `use_in_file_templates!' > from sinatra.rb:0 > from :0:in `require' > from custom_require.rb:26:in `require' > from hi.rb:0 > > > After a bit of searching, I found that it works via rbd. So I can > dev.bat and got the following: > > E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>rbd hi.rb > > E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug> > > > It didn't fail, but it also didn't do what I expected. What I > expected was this: > E:\IronRubyGit\ironruby\Merlin\Main\bin\Debug>ruby hi.rb > == Sinatra/0.9.1.1 has taken the stage on 4567 for development with > backup from WEBrick > [2009-04-22 22:55:52] INFO WEBrick 1.3.1 > [2009-04-22 22:55:52] INFO ruby 1.8.6 (2007-09-24) [i386-mswin32] > [2009-04-22 22:55:52] INFO WEBrick::HTTPServer#start: pid=6012 > port=4567 > > Am I doing something wrong or is Sinatra not yet supported? > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From suppakilla at gmail.com Thu Apr 23 14:30:28 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 23 Apr 2009 20:30:28 +0200 Subject: [Ironruby-core] Strange behavior when redefining methods on object instances (possible bug) In-Reply-To: References: <3bf20550904220543t2b19f185t374b82eafaf2eeb1@mail.gmail.com> Message-ID: <3bf20550904231130l6bdce8e3l8f9722aba4657ca@mail.gmail.com> Bug report filed here: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=761 Thanks, Daniele On Wed, Apr 22, 2009 at 17:37, Tomas Matousek wrote: > Please file a bug. > > Thanks, > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Wednesday, April 22, 2009 5:44 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Strange behavior when redefining methods on object instances (possible bug) > > Hi, > while in the process of trimming down the failure rate of the > core/array specs I noticed a strange behavior of IronRuby. I'm pasting > here two repl sessions I used to reproduce it: > > ? ?>>> foo = Object.new > ? ?=> # > ? ?>>> bar = Object.new > ? ?=> # > ? ?>>> > ? ?>>> def foo.to_s; p "foo#to_s has been invoked"; "foo" end; > ? ?=> nil > ? ?>>> > ? ?>>> foo > ? ?"foo#to_s has been invoked" > ? ?=> foo > ? ?>>> bar > ? ?=> # > > As you can see there is nothing wrong here, so here is the second > session where the only difference is in that the order of foo and bar > at the end of the snippet is inverted: > > ? ?>>> foo = Object.new > ? ?=> # > ? ?>>> bar = Object.new > ? ?=> # > ? ?>>> > ? ?>>> def foo.to_s; p "foo#to_s has been invoked"; "foo" end; > ? ?=> nil > ? ?>>> > ? ?>>> bar > ? ?=> # > ? ?>>> foo > ? ?=> # > > I would expect to get "foo#to_s has been invoked" printed just like in > the first snippet (and IRB on MRI behave like expected), but instead > the method called on foo is the one of Object#to_s (a step-by-step > debug session confirmed this). Could it be related to some issues in > the method caching stuff that happens deep into the internals of > IronRuby? > > This problem affects certain mocking scenarios when running mspec (eg. > "Array#== returns false if any element is not == to the corresponding > element in the other the array" and "Array#delete removes elements > that are #== to object", but their implementation looks ok to me), so > it might even be possible that more specs which are being reported as > failures are not related to bogus implementations, but it is just > mspec that is failing due to a bug. > > Is there anyone that can confirm this before I file a bug on the bug tracker? > > Thanks, > Daniele > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From suppakilla at gmail.com Thu Apr 23 14:29:21 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 23 Apr 2009 20:29:21 +0200 Subject: [Ironruby-core] Rails ActionPack tests In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E1A082C26@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <710DF26F214D2B4BB94287123FFE980A2E1A082C26@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <3bf20550904231129q131e841ck57a57e731866afd0@mail.gmail.com> The numbers look good. I've never used RoR before (well I've never ever installed it) and I don't know almost anything about it, so I'm not sure if I can be of any help in this area but I'll try digging a little into those failures. PS: yeah, I might be one of the very few who doesn't really care about Rails :-) On Thu, Apr 23, 2009 at 07:32, Shri Borde wrote: > It is now possible to run the Rails ActionPack tests to completion without > any hangs or fatal crashes! The full instructions are at the bottom of > http://www.ironruby.net/Documentation/Rails. Note that this is not the full > test suite (have not tried to run that yet). The result summary for the > ActionPack tests is: > > > > 2306 tests, 10539 assertions, 85 failures, 50 errors > > > > http://gist.github.com/100329 has the full output if you want to browse the > kinds of errors IronRuby is running into. The numbers look pretty good for > now, but there is still work to be done to drive it to 0. > > > > Actually the results with MRI are ?2306 tests, 10823 assertions, 28 > failures, 3 errors?, which means that there are some configuration issues. > If anyone has experience running Rails tests with MRI, it will be very > useful to know how to get this MRI baseline to be clean (or to know if these > issues are known issues in MRI or the Rails tests) > > > > For folks who are working on fixing RubySpec bugs (and for others who are > interested too), it will be great to have your help fixing Rails bugs. > Jirapong, some of the failures are due to a missing OpenSSL::Random. This > could be a good place to start with your OpenSSL work. Some of the bugs seem > easy to spot from the output, like a missing File::stat. Other bugs might > need more digging in. Let me know if there is > > > > PS: Note that you will need to pull changes from my repo which are still not > in the main repo (git pull git://github.com/shri/ironruby.git master) > > > > Thanks, > > Shri > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From suppakilla at gmail.com Thu Apr 23 15:58:35 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 23 Apr 2009 21:58:35 +0200 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each Message-ID: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> Hi, I just pushed two fixes on my repository, the first one addresses a bug in Array#rindex (there was a bug in my last commit) and the second one makes Array#reverse_each compliant with the rubyspecs. http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf1233ac94e0 >From the commit message: * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were passing, this bug was triggered under certain conditions different from the ones defined in the specs) * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the array are removed from inside a block. See also the attached diff. Thanks, Daniele -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- A non-text attachment was scrubbed... Name: specs_core_array_090423.diff Type: application/octet-stream Size: 3641 bytes Desc: not available URL: From jdeville at microsoft.com Thu Apr 23 16:08:47 2009 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 23 Apr 2009 20:08:47 +0000 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> Message-ID: Can you add specs for rindex that expose the bug you fixed? Also, is there any shared place that you could put the following code: if (self.Count < originalSize) { i = originalSize - i - 1 + self.Count; originalSize = self.Count; } It would be nice to get rid of the duplicated logic, but I can't think of where it should go. Other than that, looks good. JD > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Thursday, April 23, 2009 12:59 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Review: fixes for Array#rindex and > Array#reverse_each > > Hi, > I just pushed two fixes on my repository, the first one addresses a bug > in Array#rindex (there was a bug in my last commit) and the second one > makes Array#reverse_each compliant with the rubyspecs. > > http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf123 > 3ac94e0 > > >From the commit message: > > * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were > passing, this bug was triggered under certain conditions different from > the ones defined in the specs) > > * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the > array are removed from inside a block. > > See also the attached diff. > > Thanks, > Daniele > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN From suppakilla at gmail.com Thu Apr 23 17:03:33 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 23 Apr 2009 23:03:33 +0200 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> Message-ID: <3bf20550904231403o1b31443bx57d121584d911068@mail.gmail.com> Ha! I got caught :-) The duplicated logic is there precisely because I, too, couldn't think of a place to share that small piece of code in a good way, so I just coded it like that for now but I'll ponder about that for the next commit. OK for the specs. Thanks, Daniele On Thu, Apr 23, 2009 at 22:08, Jim Deville wrote: > Can you add specs for rindex that expose the bug you fixed? Also, is there any shared place that you could put the following code: > ? ? ? ? if (self.Count < originalSize) { > ? ? ? ? ? ? i = originalSize - i - 1 + self.Count; > ? ? ? ? ? ? originalSize = self.Count; > ? ? ? ? } > > It would be nice to get rid of the duplicated logic, but I can't think of where it should go. > > Other than that, looks good. > JD > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Daniele Alessandri >> Sent: Thursday, April 23, 2009 12:59 PM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] Review: fixes for Array#rindex and >> Array#reverse_each >> >> Hi, >> I just pushed two fixes on my repository, the first one addresses a bug >> in Array#rindex (there was a bug in my last commit) and the second one >> makes Array#reverse_each compliant with the rubyspecs. >> >> http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf123 >> 3ac94e0 >> >> >From the commit message: >> >> * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were >> passing, this bug was triggered under certain conditions different from >> the ones defined in the specs) >> >> * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the >> array are removed from inside a block. >> >> See also the attached diff. >> >> Thanks, >> Daniele >> >> -- >> Daniele Alessandri >> http://www.clorophilla.net/blog/ >> http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From Jimmy.Schementi at microsoft.com Thu Apr 23 20:19:23 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 24 Apr 2009 00:19:23 +0000 Subject: [Ironruby-core] Planning? In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC0172C8@tk5ex14mbxc105.redmond.corp.microsoft.com> Ivan, I?m not sure if anyone ever replied to this, but I can help clarify some things for you. http://en.oreilly.com/oscon2009/public/schedule/detail/7965 IronRuby will be 1.0 by Oscon2009. I?m showing what we?ve got so far with Rails at RailsConf in a couple weeks. I?ve been updating the website with the status of Rails, so just keep an eye on http://ironruby.net/Documentation/Rails if you?re curious. There is an ActiveRecord adapter (http://gist.github.com/100070), but it?s not complete yet. Ray Vernagus will be giving me a hand in polishing it up. I?m also planning on showing IIS support, as we did the work last year but never did anything with it. I also want to show ASP.NET MVC =P Need any other clarification? ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, March 24, 2009 10:17 AM To: ironruby-core Subject: [Ironruby-core] Planning? Hi John announced at Mix that the aim is to release in June 09. That officially gives Michael and me a deadline around mid may probably. At that time it should be ready for RTM. I have chapter in my TOC about webforms, but as long as there is no integration to play with it's going to be hard to explain people what needs to happen. Should I just skip that subject then, is there a private project floating around perhaps? Also rails compatibility what should I imagine there? Will there be active record adapters provided by MS to make that work because Rails without active record isn't really rails is it? To host it in IIS I believe I've got somebody interested enough in Rack to give that a shot. I just won't have time to implement that activerecord stuff although I looked at it and it isn't really hard I guess it's just a lot of work :) I'll try to get ironrubymvc done as soon as possible because I still need to write 3 chapters to finish on time which might be a huge challenge on its own. The following is not a complaint/order/command or anything like that, it's just a query: If the timeline around webforms integration is anywhere before may then I might be able to squeeze it in, otherwise I'll have to skip it probably which brings my chapters down to 2 :). For the people from the community who would like to submit a 2-5 page essay on how they used IronRuby in their organization. I will need those before the 3rd week of april at the latest. Cheers Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben2004uk at googlemail.com Sun Apr 26 13:19:20 2009 From: ben2004uk at googlemail.com (Ben Hall) Date: Sun, 26 Apr 2009 18:19:20 +0100 Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? Message-ID: Hello, Just tried to do the following and got an odd error: >>> system::console::writeline("Test") :0: wrong number of arguments (1 for 2147483647) (ArgumentError) I do remember something similar a while ago - what why can't it handle this? Thanks Ben From Jimmy.Schementi at microsoft.com Mon Apr 27 03:14:23 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 27 Apr 2009 07:14:23 +0000 Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC01CC54@tk5ex14mbxc105.redmond.corp.microsoft.com> Using proper casing will work: >>> System::Console.write_line("Test") Test => nil The casing you're using yields: >>> system::console::writeline("Test") :0: wrong number of arguments (1 for 2147483647) (ArgumentError) Since "system" is Kernel#system. MRI yields a similar type of error also, so the error reporting isn't at fault (though the (1 for 21...) message is a bit confusing: irb(main):002:0> system::console::writeline("Test") ArgumentError: wrong number of arguments from (irb):2:in `system' from (irb):2 > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Sunday, April 26, 2009 10:19 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? > > Hello, > > Just tried to do the following and got an odd error: > > >>> system::console::writeline("Test") > :0: wrong number of arguments (1 for 2147483647) (ArgumentError) > > I do remember something similar a while ago - what why can't it handle > this? > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Mon Apr 27 09:22:02 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Mon, 27 Apr 2009 06:22:02 -0700 Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC01CC54@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC01CC54@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: And in case it's not obvious, the CLR->Ruby casing/name-translation rules are 1) CLR namespaces and interfaces must be capitalized as they are mapped onto Ruby modules 2) CLR classes must be capitalized as they are mapped onto Ruby classes 3) CLR methods that you call may either retain their original spelling (ie "WriteLine") or they may be used in a more Rubyesque form which is obtained by translating CamelCase to lowercase_and_delimited (ie "write_line"). 4) CLR virtual methods which you override from IronRuby must be in their lowercase_and_delimited form. (Do we have a document that describes this?) -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Monday, April 27, 2009 12:14 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Console.Writeline - 2147483647 arguments? Using proper casing will work: >>> System::Console.write_line("Test") Test => nil The casing you're using yields: >>> system::console::writeline("Test") :0: wrong number of arguments (1 for 2147483647) (ArgumentError) Since "system" is Kernel#system. MRI yields a similar type of error also, so the error reporting isn't at fault (though the (1 for 21...) message is a bit confusing: irb(main):002:0> system::console::writeline("Test") ArgumentError: wrong number of arguments from (irb):2:in `system' from (irb):2 > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Ben Hall > Sent: Sunday, April 26, 2009 10:19 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? > > Hello, > > Just tried to do the following and got an odd error: > > >>> system::console::writeline("Test") > :0: wrong number of arguments (1 for 2147483647) (ArgumentError) > > I do remember something similar a while ago - what why can't it handle > this? > > Thanks > > Ben > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From programmer2188 at gmail.com Mon Apr 27 10:27:12 2009 From: programmer2188 at gmail.com (Brandon Olivares) Date: Mon, 27 Apr 2009 10:27:12 -0400 Subject: [Ironruby-core] IronRuby and RSpec Message-ID: <002601c9c744$4230ae80$c6920b80$@com> Hi, I'm having trouble running IronRuby with RSpec. I have a simple file just to test. The last require statement is loading the .NET assembly from my project, but it's not actually used in this example. require 'rubygems' require 'spec' require 'mscorlib' require File.expand_path(File.join(%w{.. bin x86 Debug FlightShooter}), File.dirname(__FILE__)) describe 'Test' do it "should do something" do 'hello'.should == 'hello' end end The error I get is: >ir spec\test_spec.rb IronRuby.Libraries:0:in `ExpandPath': Invalid argument - test_spec.rb:0 (Errno::EINVAL) from :0:in `expand_path' from example_group_methods.rb:103:in `set_description' from example_group_methods.rb:166:in `subclass' from example_group_methods.rb:43:in `describe' from example_group_factory.rb:25:in `create_example_group' from main.rb:24:in `describe' from test_spec.rb:0 Any idea what could be going wrong? Thanks, Brandon www.perpetualseeker.com Blog about college, programming, and other random things. Follow me on Twitter: http://twitter.com/devbanana From ben2004uk at googlemail.com Mon Apr 27 11:42:12 2009 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 27 Apr 2009 16:42:12 +0100 Subject: [Ironruby-core] IronRuby and RSpec In-Reply-To: <002601c9c744$4230ae80$c6920b80$@com> References: <002601c9c744$4230ae80$c6920b80$@com> Message-ID: I think this is an issue with the current build which presents RSpec from working. Take a look at my article on http://msdn.microsoft.com/en-us/magazine/dd434651.aspx I've created a build which should fix this bug - http://blog.benhall.me.uk/downloads/IronRuby/MSDNBuild.zip - well, more of a hack to prove the concept works :) Let me know how you get on. Ben On Mon, Apr 27, 2009 at 3:27 PM, Brandon Olivares wrote: > Hi, > > I'm having trouble running IronRuby with RSpec. I have a simple file just to > test. > > The last require statement is loading the .NET assembly from my project, but > it's not actually used in this example. > > require 'rubygems' > require 'spec' > require 'mscorlib' > require File.expand_path(File.join(%w{.. bin x86 Debug FlightShooter}), > File.dirname(__FILE__)) > > describe 'Test' do > ?it "should do something" do > ? ?'hello'.should == 'hello' > ?end > end > > The error I get is: > >>ir spec\test_spec.rb > IronRuby.Libraries:0:in `ExpandPath': Invalid argument - test_spec.rb:0 > (Errno::EINVAL) > ? ? ? ?from :0:in `expand_path' > ? ? ? ?from example_group_methods.rb:103:in `set_description' > ? ? ? ?from example_group_methods.rb:166:in `subclass' > ? ? ? ?from example_group_methods.rb:43:in `describe' > ? ? ? ?from example_group_factory.rb:25:in `create_example_group' > ? ? ? ?from main.rb:24:in `describe' > ? ? ? ?from test_spec.rb:0 > > Any idea what could be going wrong? > > Thanks, > Brandon > > www.perpetualseeker.com > Blog about college, programming, and other random things. > Follow me on Twitter: http://twitter.com/devbanana > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From Jimmy.Schementi at microsoft.com Mon Apr 27 14:53:26 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 27 Apr 2009 18:53:26 +0000 Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? In-Reply-To: References: <0047ECBFA2E0DF4A834AA369282A5AFC01CC54@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC01D73A@tk5ex14mbxc105.redmond.corp.microsoft.com> Now we do =) http://ironruby.net/Documentation/CLR_Interop/Names Needs examples, links to the spec, etc. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Curt Hagenlocher > Sent: Monday, April 27, 2009 6:22 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Console.Writeline - 2147483647 arguments? > > And in case it's not obvious, the CLR->Ruby casing/name-translation > rules are > > 1) CLR namespaces and interfaces must be capitalized as they are mapped > onto Ruby modules > 2) CLR classes must be capitalized as they are mapped onto Ruby classes > 3) CLR methods that you call may either retain their original spelling > (ie "WriteLine") or they may be used in a more Rubyesque form which is > obtained by translating CamelCase to lowercase_and_delimited (ie > "write_line"). > 4) CLR virtual methods which you override from IronRuby must be in > their lowercase_and_delimited form. > > (Do we have a document that describes this?) > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Monday, April 27, 2009 12:14 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Console.Writeline - 2147483647 arguments? > > Using proper casing will work: > > >>> System::Console.write_line("Test") > Test > => nil > > The casing you're using yields: > > >>> system::console::writeline("Test") > :0: wrong number of arguments (1 for 2147483647) (ArgumentError) > > Since "system" is Kernel#system. MRI yields a similar type of error > also, so the error reporting isn't at fault (though the (1 for 21...) > message is a bit confusing: > > irb(main):002:0> system::console::writeline("Test") > ArgumentError: wrong number of arguments > from (irb):2:in `system' > from (irb):2 > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Ben Hall > > Sent: Sunday, April 26, 2009 10:19 AM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] Console.Writeline - 2147483647 arguments? > > > > Hello, > > > > Just tried to do the following and got an odd error: > > > > >>> system::console::writeline("Test") > > :0: wrong number of arguments (1 for 2147483647) (ArgumentError) > > > > I do remember something similar a while ago - what why can't it > handle > > this? > > > > Thanks > > > > Ben > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue Apr 28 13:38:29 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 28 Apr 2009 19:38:29 +0200 Subject: [Ironruby-core] [IronPython] Telling .NET classes from Python objects In-Reply-To: <49F73E6E.4080308@voidspace.org.uk> References: <49F73E6E.4080308@voidspace.org.uk> Message-ID: +1 for this question only I need it to implement different binding strategies in IronMVC. IronRuby in Action (http://manning.com/carrero) Winston Churchill - "The best argument against democracy is a five-minute conversation with the average voter." On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord wrote: > Hello guys, > > I'm continuing my work on generating pi files for the Wing IDE. Actually > everything I encounter will be a .NET type, but in general what is the best > way of telling if an object is a .NET type or a Python type? > > Obviously for the primitives it is a moot point - but I'm talking about > user defined classes. > > Michael > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Tue Apr 28 14:04:46 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 28 Apr 2009 11:04:46 -0700 Subject: [Ironruby-core] [IronPython] Telling .NET classes from Python objects In-Reply-To: <350E7D38B6D819428718949920EC23555728B89C75@NA-EXMSG-C102.redmond.corp.microsoft.com> References: <49F73E6E.4080308@voidspace.org.uk> <350E7D38B6D819428718949920EC23555728B89C75@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: Would you consider Bignum to be a .NET type or Ruby type? Tomas From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Tuesday, April 28, 2009 10:41 AM To: Discussion of IronPython; ironruby-core Subject: Re: [IronPython] Telling .NET classes from Python objects Check to see if the object implements IPythonObject. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero Sent: Tuesday, April 28, 2009 10:38 AM To: Discussion of IronPython; ironruby-core Subject: Re: [IronPython] Telling .NET classes from Python objects +1 for this question only I need it to implement different binding strategies in IronMVC. IronRuby in Action (http://manning.com/carrero) Winston Churchill - "The best argument against democracy is a five-minute conversation with the average voter." On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord > wrote: Hello guys, I'm continuing my work on generating pi files for the Wing IDE. Actually everything I encounter will be a .NET type, but in general what is the best way of telling if an object is a .NET type or a Python type? Obviously for the primitives it is a moot point - but I'm talking about user defined classes. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.letterle at gmail.com Tue Apr 28 14:10:10 2009 From: michael.letterle at gmail.com (Michael Letterle) Date: Tue, 28 Apr 2009 14:10:10 -0400 Subject: [Ironruby-core] [IronPython] Telling .NET classes from Python objects In-Reply-To: References: <49F73E6E.4080308@voidspace.org.uk> Message-ID: Class#to_clr_type? Returns nil for custom Ruby objects... depends on what you're looking for... On Tue, Apr 28, 2009 at 1:38 PM, Ivan Porto Carrero wrote: > +1 for this question only I need it to implement different binding > strategies in IronMVC. > > IronRuby in Action (http://manning.com/carrero) > > Winston Churchill ?- "The best argument against democracy is a five-minute > conversation with the average voter." > > On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord > wrote: >> >> Hello guys, >> >> I'm continuing my work on generating pi files for the Wing IDE. Actually >> everything I encounter will be a .NET type, but in general what is the best >> way of telling if an object is a .NET type or a Python type? >> >> Obviously for the primitives it is a moot point - but I'm talking about >> user defined classes. >> >> Michael >> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle IronRuby MVP http://blog.prokrams.com From Tomas.Matousek at microsoft.com Tue Apr 28 14:45:15 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 28 Apr 2009 11:45:15 -0700 Subject: [Ironruby-core] [IronPython] Telling .NET classes from Python objects In-Reply-To: References: <49F73E6E.4080308@voidspace.org.uk> Message-ID: I would recommend not to rely on whether an object is Ruby object or .NET object if possible. You might be surprised to get a COM object, a Python object, DLR expand, etc. if you do so. Use rather respond_to?, include? to ask for specific methods/protocols. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Michael Letterle Sent: Tuesday, April 28, 2009 11:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [IronPython] Telling .NET classes from Python objects Class#to_clr_type? Returns nil for custom Ruby objects... depends on what you're looking for... On Tue, Apr 28, 2009 at 1:38 PM, Ivan Porto Carrero wrote: > +1 for this question only I need it to implement different binding > strategies in IronMVC. > > IronRuby in Action (http://manning.com/carrero) > > Winston Churchill ?- "The best argument against democracy is a five-minute > conversation with the average voter." > > On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord > wrote: >> >> Hello guys, >> >> I'm continuing my work on generating pi files for the Wing IDE. Actually >> everything I encounter will be a .NET type, but in general what is the best >> way of telling if an object is a .NET type or a Python type? >> >> Obviously for the primitives it is a moot point - but I'm talking about >> user defined classes. >> >> Michael >> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Michael Letterle IronRuby MVP http://blog.prokrams.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue Apr 28 15:58:37 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 28 Apr 2009 21:58:37 +0200 Subject: [Ironruby-core] [IronPython] Telling .NET classes from Python objects In-Reply-To: References: <49F73E6E.4080308@voidspace.org.uk> <350E7D38B6D819428718949920EC23555728B89C75@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: Bignum I'd consider to be a primitive :) but it would be a ruby type I'm thinking about models / DTO's etc. It's for a databinding context where you get a list of strings that then need to populate an object. And to pick the right conversion mechanisms I need a different strategy for a DLR type as for a CLR type. On Tue, Apr 28, 2009 at 8:04 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > Would you consider Bignum to be a .NET type or Ruby type? > > > > Tomas > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Dino Viehland > *Sent:* Tuesday, April 28, 2009 10:41 AM > *To:* Discussion of IronPython; ironruby-core > *Subject:* Re: [IronPython] Telling .NET classes from Python objects > > > > Check to see if the object implements IPythonObject. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Ivan Porto Carrero > *Sent:* Tuesday, April 28, 2009 10:38 AM > *To:* Discussion of IronPython; ironruby-core > *Subject:* Re: [IronPython] Telling .NET classes from Python objects > > > > +1 for this question only I need it to implement different binding > strategies in IronMVC. > > > > > IronRuby in Action (http://manning.com/carrero) > > Winston Churchill - "The best argument against democracy is a five-minute conversation with > the average voter." > > On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord > wrote: > > Hello guys, > > I'm continuing my work on generating pi files for the Wing IDE. Actually > everything I encounter will be a .NET type, but in general what is the best > way of telling if an object is a .NET type or a Python type? > > Obviously for the primitives it is a moot point - but I'm talking about > user defined classes. > > Michael > > -- > http://www.ironpythoninaction.com/ > http://www.voidspace.org.uk/blog > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Tue Apr 28 23:51:04 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 28 Apr 2009 20:51:04 -0700 Subject: [Ironruby-core] [IronPython] Telling .NET classes from Python objects In-Reply-To: References: <49F73E6E.4080308@voidspace.org.uk> <350E7D38B6D819428718949920EC23555728B89C75@NA-EXMSG-C102.redmond.corp.microsoft.com> Message-ID: I'd probably pick IDynamicMetaObjectProvider as the signifier of a dynamic type. Ruby and Python types that don't implement this interface aren't "as dynamic" as types that do -- even built-in ones -- because they won't support dynamic binding from other languages. And all user-defined types would implement it. As a bonus, you can get a list of member names directly from the MetaObject returned by the IDMOP using something like this: var idmop = obj as IDynamicMetaObjectProvider; if (idmop != null) { var expr = System.Linq.Expressions.Parameter(typeof(object)); // The DLR version, not the LINQv1 version! var dmo = idmop.GetMetaObject(expr); IEnumerable names = dmo.GetDynamicMemberNames(); } You could then create simple binders and use CallSites directly to actually get and set the data members yourself -- and the result should support any DLR language and not just Python or Ruby. Disclaimer: I haven't tested this, but it should work -- it's the basis for C# interop in .NET 4.0, after all. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, April 28, 2009 12:59 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] [IronPython] Telling .NET classes from Python objects Bignum I'd consider to be a primitive :) but it would be a ruby type I'm thinking about models / DTO's etc. It's for a databinding context where you get a list of strings that then need to populate an object. And to pick the right conversion mechanisms I need a different strategy for a DLR type as for a CLR type. On Tue, Apr 28, 2009 at 8:04 PM, Tomas Matousek > wrote: Would you consider Bignum to be a .NET type or Ruby type? Tomas From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Tuesday, April 28, 2009 10:41 AM To: Discussion of IronPython; ironruby-core Subject: Re: [IronPython] Telling .NET classes from Python objects Check to see if the object implements IPythonObject. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Ivan Porto Carrero Sent: Tuesday, April 28, 2009 10:38 AM To: Discussion of IronPython; ironruby-core Subject: Re: [IronPython] Telling .NET classes from Python objects +1 for this question only I need it to implement different binding strategies in IronMVC. IronRuby in Action (http://manning.com/carrero) Winston Churchill - "The best argument against democracy is a five-minute conversation with the average voter." On Tue, Apr 28, 2009 at 7:35 PM, Michael Foord > wrote: Hello guys, I'm continuing my work on generating pi files for the Wing IDE. Actually everything I encounter will be a .NET type, but in general what is the best way of telling if an object is a .NET type or a Python type? Obviously for the primitives it is a moot point - but I'm talking about user defined classes. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From xerxes at bigpond.net.au Wed Apr 29 08:05:06 2009 From: xerxes at bigpond.net.au (Xerxes Battiwalla) Date: Wed, 29 Apr 2009 22:05:06 +1000 Subject: [Ironruby-core] Implementing get_Item in Ruby for access in .NET In-Reply-To: References: Message-ID: Hi there. We're trying to access a ruby implementation of a Hash from .NET but having trouble getting the following snip to work require 'Dependencies.dll' class ParameterList ? ? ? ?include Namespace::IParameterList ? ? ? ?@parameter_hash ? ? ? ?def initialize ? ? ? ? ? ? ? ?@parameter_hash = Hash.new ? ? ? ?end ? ? ? ?def []= key, value ? ? ? ? ? ? ? ?@parameter_hash[key] = value ? ? ? ?end ? ? ? ?def [] key ? ? ? ? ? ? ? ?@parameter_hash[key] ? ? ? ?end ? ? ? ?def get_Item key ? ? ? ? ? ? ? ?@parameter_hash[key] ? ? ? ?end end and on the .NET side: public interface IParameterList : IEnumerable { ? ?int Count { get; } ? ?IParameter this[string name] { get; } ? ?IParameter this[int index] { get; } ? ?IEnumerator GetEnumerator(); ? ?event ParameterValueChangedEventHandler OnParameterValueChanged; } When we call it from .NET with the following code (The parameters object is an instance of the Ruby ParamterList class ): parameter = parameters["Key"]; The error returned is NoMethodError: undefined method `get_Item' for # Is it possible to have a Ruby object with an indexer which is callable from C#? Thanks, Xerx. From curth at microsoft.com Wed Apr 29 11:37:37 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 29 Apr 2009 08:37:37 -0700 Subject: [Ironruby-core] Implementing get_Item in Ruby for access in .NET In-Reply-To: References: Message-ID: I don't think there's any attempt right now to identify an indexer when overriding virtual methods. This means that the normal Rubification rules kick in and you get def item key end def item= key, value end The second of these, of course, isn't usable from within Ruby -- though I think it should still work correctly when called by C# through the interface. Obviously, this should be entered as a work item on Codeplex if it isn't there already. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla Sent: Wednesday, April 29, 2009 5:05 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Implementing get_Item in Ruby for access in .NET Hi there. We're trying to access a ruby implementation of a Hash from .NET but having trouble getting the following snip to work require 'Dependencies.dll' class ParameterList ? ? ? ?include Namespace::IParameterList ? ? ? ?@parameter_hash ? ? ? ?def initialize ? ? ? ? ? ? ? ?@parameter_hash = Hash.new ? ? ? ?end ? ? ? ?def []= key, value ? ? ? ? ? ? ? ?@parameter_hash[key] = value ? ? ? ?end ? ? ? ?def [] key ? ? ? ? ? ? ? ?@parameter_hash[key] ? ? ? ?end ? ? ? ?def get_Item key ? ? ? ? ? ? ? ?@parameter_hash[key] ? ? ? ?end end and on the .NET side: public interface IParameterList : IEnumerable { ? ?int Count { get; } ? ?IParameter this[string name] { get; } ? ?IParameter this[int index] { get; } ? ?IEnumerator GetEnumerator(); ? ?event ParameterValueChangedEventHandler OnParameterValueChanged; } When we call it from .NET with the following code (The parameters object is an instance of the Ruby ParamterList class ): parameter = parameters["Key"]; The error returned is NoMethodError: undefined method `get_Item' for # Is it possible to have a Ruby object with an indexer which is callable from C#? Thanks, Xerx. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jirapong.nanta at gmail.com Wed Apr 29 13:49:29 2009 From: jirapong.nanta at gmail.com (jirapong.nanta at gmail.com) Date: Thu, 30 Apr 2009 00:49:29 +0700 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class Message-ID: <0F2B3DA5-FCBF-4AB9-9998-BD6683051AA8@gmail.com> Have any one got this error? and to fix it :-) c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec \default.mspec:12: undefined method `filtered' for MSpecScript:Class (NoMethodError) from C://Documents and Settings/Administrator/.mspecrc:15:in `load' from C://Documents and Settings/Administrator/.mspecrc:15 from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:72:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:72:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:71:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:71:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:213:in `main' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 from c:/ruby/bin/mspec:16:in `load' from c:/ruby/bin/mspec:16 Thanks in advance. -Jirapong From jdeville at microsoft.com Wed Apr 29 14:52:42 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 29 Apr 2009 18:52:42 +0000 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class Message-ID: The gem won't work for now. Make sure that the mspec that runs is the Mspec in Merlin/External.LCA_RESTRICTED. JD -----Original Message----- From: jirapong.nanta at gmail.com Sent: April 29, 2009 11:12 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class Have any one got this error? and to fix it :-) c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec \default.mspec:12: undefined method `filtered' for MSpecScript:Class (NoMethodError) from C://Documents and Settings/Administrator/.mspecrc:15:in `load' from C://Documents and Settings/Administrator/.mspecrc:15 from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:72:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:72:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:71:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:71:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ utils/script.rb:213:in `main' from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 from c:/ruby/bin/mspec:16:in `load' from c:/ruby/bin/mspec:16 Thanks in advance. -Jirapong _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 29 14:58:33 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 29 Apr 2009 18:58:33 +0000 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC02211E@tk5ex14mbxc105.redmond.corp.microsoft.com> Sounds like you're not running Dev.bat. Before doing anything with IronRuby (when you get it from the git repo), please run Merlin/Main/Languages/Ruby/Scripts/Dev.bat. That will make sure things are all set up properly. To make this easy, just create a ironruby.bat file somewhere which calls Dev.bat. I even add that as the first shortcut in my quicklaunch toolbar so WIN+1 will launch a dev.bat cmd.exe window. ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jim Deville > Sent: Wednesday, April 29, 2009 11:53 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] mspec error undefined method `filtered' > for MSpecScript:Class > > The gem won't work for now. Make sure that the mspec that runs is the > Mspec in Merlin/External.LCA_RESTRICTED. > > JD > > -----Original Message----- > From: jirapong.nanta at gmail.com > Sent: April 29, 2009 11:12 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] mspec error undefined method `filtered' for > MSpecScript:Class > > > Have any one got this error? and to fix it :-) > > c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec > \default.mspec:12: undefined method `filtered' for MSpecScript:Class > (NoMethodError) > from C://Documents and Settings/Administrator/.mspecrc:15:in > `load' > from C://Documents and Settings/Administrator/.mspecrc:15 > from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > utils/script.rb:72:in `load' > from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > utils/script.rb:72:in `load' > from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > utils/script.rb:71:in `each' > from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > utils/script.rb:71:in `load' > from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > utils/script.rb:213:in `main' > from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 > from c:/ruby/bin/mspec:16:in `load' > from c:/ruby/bin/mspec:16 > > Thanks in advance. > -Jirapong > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jirapong.nanta at gmail.com Wed Apr 29 15:22:48 2009 From: jirapong.nanta at gmail.com (jirapong.nanta at gmail.com) Date: Thu, 30 Apr 2009 02:22:48 +0700 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC02211E@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC02211E@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <6037C765-3154-4A95-AA2F-11E828A0F751@gmail.com> Thank you, I did run the dev.bat but still get same error. I'm investigating why it load from gems rather than what get in .mspecrc file. Bests, - Jirapong On Apr 30, 2009, at 1:58 AM, Jimmy Schementi wrote: > Sounds like you're not running Dev.bat. Before doing anything with > IronRuby (when you get it from the git repo), please run Merlin/Main/ > Languages/Ruby/Scripts/Dev.bat. That will make sure things are all > set up properly. To make this easy, just create a ironruby.bat file > somewhere which calls Dev.bat. I even add that as the first shortcut > in my quicklaunch toolbar so WIN+1 will launch a dev.bat cmd.exe > window. > > ~js > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Jim Deville >> Sent: Wednesday, April 29, 2009 11:53 AM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] mspec error undefined method `filtered' >> for MSpecScript:Class >> >> The gem won't work for now. Make sure that the mspec that runs is the >> Mspec in Merlin/External.LCA_RESTRICTED. >> >> JD >> >> -----Original Message----- >> From: jirapong.nanta at gmail.com >> Sent: April 29, 2009 11:12 AM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] mspec error undefined method `filtered' for >> MSpecScript:Class >> >> >> Have any one got this error? and to fix it :-) >> >> c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec >> \default.mspec:12: undefined method `filtered' for MSpecScript:Class >> (NoMethodError) >> from C://Documents and Settings/Administrator/.mspecrc:15:in >> `load' >> from C://Documents and Settings/Administrator/.mspecrc:15 >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >> utils/script.rb:72:in `load' >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >> utils/script.rb:72:in `load' >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >> utils/script.rb:71:in `each' >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >> utils/script.rb:71:in `load' >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >> utils/script.rb:213:in `main' >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 >> from c:/ruby/bin/mspec:16:in `load' >> from c:/ruby/bin/mspec:16 >> >> Thanks in advance. >> -Jirapong >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Apr 29 15:29:18 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 29 Apr 2009 19:29:18 +0000 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class In-Reply-To: <6037C765-3154-4A95-AA2F-11E828A0F751@gmail.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC02211E@tk5ex14mbxc105.redmond.corp.microsoft.com> <6037C765-3154-4A95-AA2F-11E828A0F751@gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC02223E@tk5ex14mbxc105.redmond.corp.microsoft.com> It's because the "mspec" command you're running lives in your C:\ruby\bin directory, not C:\...\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\bin. Running "where mspec" should show something like this: C:\dev\jschementi-ironruby\Merlin\Main\Languages\Ruby>where mspec C:\dev\jschementi-ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\bin\mspec C:\dev\jschementi-ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\bin\mspec.bat If you don't really need the mspec gem installed, removing that would probably remedy this. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of jirapong.nanta at gmail.com > Sent: Wednesday, April 29, 2009 12:23 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] mspec error undefined method `filtered' > for MSpecScript:Class > > Thank you, I did run the dev.bat but still get same error. I'm > investigating why it load from gems rather than what get in .mspecrc > file. > > Bests, > - Jirapong > > On Apr 30, 2009, at 1:58 AM, Jimmy Schementi wrote: > > > Sounds like you're not running Dev.bat. Before doing anything with > > IronRuby (when you get it from the git repo), please run Merlin/Main/ > > Languages/Ruby/Scripts/Dev.bat. That will make sure things are all > > set up properly. To make this easy, just create a ironruby.bat file > > somewhere which calls Dev.bat. I even add that as the first shortcut > > in my quicklaunch toolbar so WIN+1 will launch a dev.bat cmd.exe > > window. > > > > ~js > > > >> -----Original Message----- > >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >> bounces at rubyforge.org] On Behalf Of Jim Deville > >> Sent: Wednesday, April 29, 2009 11:53 AM > >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] mspec error undefined method `filtered' > >> for MSpecScript:Class > >> > >> The gem won't work for now. Make sure that the mspec that runs is > the > >> Mspec in Merlin/External.LCA_RESTRICTED. > >> > >> JD > >> > >> -----Original Message----- > >> From: jirapong.nanta at gmail.com > >> Sent: April 29, 2009 11:12 AM > >> To: ironruby-core at rubyforge.org > >> Subject: [Ironruby-core] mspec error undefined method `filtered' for > >> MSpecScript:Class > >> > >> > >> Have any one got this error? and to fix it :-) > >> > >> c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec > >> \default.mspec:12: undefined method `filtered' for MSpecScript:Class > >> (NoMethodError) > >> from C://Documents and Settings/Administrator/.mspecrc:15:in > >> `load' > >> from C://Documents and Settings/Administrator/.mspecrc:15 > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:72:in `load' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:72:in `load' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:71:in `each' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:71:in `load' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:213:in `main' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 > >> from c:/ruby/bin/mspec:16:in `load' > >> from c:/ruby/bin/mspec:16 > >> > >> Thanks in advance. > >> -Jirapong > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Shri.Borde at microsoft.com Wed Apr 29 15:40:07 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 29 Apr 2009 12:40:07 -0700 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC02223E@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC02211E@tk5ex14mbxc105.redmond.corp.microsoft.com> <6037C765-3154-4A95-AA2F-11E828A0F751@gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC02223E@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E1BA95617@NA-EXMSG-C104.redmond.corp.microsoft.com> If you have RUBYOPTS set to "-rubygems" (as is done by default by the MRI one-click installer), RubyGems will get first shot at finding "mspec" and will look at installed gems before looking at $LOAD_PATH. That could also be the issue. Just using the different version of mspec.bat may not fix the issue as it just runs the first "ruby.exe" it finds on the path, and could still get tripped up over the "-rubygems" issue... Jim, how different are the two versions of mspec supposed to be? Do you know what the RubySpec team's plan is to unify them? Do we know why the gem will not work, and is there a bug to track the issue? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi Sent: Wednesday, April 29, 2009 12:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class It's because the "mspec" command you're running lives in your C:\ruby\bin directory, not C:\...\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\bin. Running "where mspec" should show something like this: C:\dev\jschementi-ironruby\Merlin\Main\Languages\Ruby>where mspec C:\dev\jschementi-ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\bin\mspec C:\dev\jschementi-ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec\mspec\bin\mspec.bat If you don't really need the mspec gem installed, removing that would probably remedy this. > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of jirapong.nanta at gmail.com > Sent: Wednesday, April 29, 2009 12:23 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] mspec error undefined method `filtered' > for MSpecScript:Class > > Thank you, I did run the dev.bat but still get same error. I'm > investigating why it load from gems rather than what get in .mspecrc > file. > > Bests, > - Jirapong > > On Apr 30, 2009, at 1:58 AM, Jimmy Schementi wrote: > > > Sounds like you're not running Dev.bat. Before doing anything with > > IronRuby (when you get it from the git repo), please run Merlin/Main/ > > Languages/Ruby/Scripts/Dev.bat. That will make sure things are all > > set up properly. To make this easy, just create a ironruby.bat file > > somewhere which calls Dev.bat. I even add that as the first shortcut > > in my quicklaunch toolbar so WIN+1 will launch a dev.bat cmd.exe > > window. > > > > ~js > > > >> -----Original Message----- > >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >> bounces at rubyforge.org] On Behalf Of Jim Deville > >> Sent: Wednesday, April 29, 2009 11:53 AM > >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] mspec error undefined method `filtered' > >> for MSpecScript:Class > >> > >> The gem won't work for now. Make sure that the mspec that runs is > the > >> Mspec in Merlin/External.LCA_RESTRICTED. > >> > >> JD > >> > >> -----Original Message----- > >> From: jirapong.nanta at gmail.com > >> Sent: April 29, 2009 11:12 AM > >> To: ironruby-core at rubyforge.org > >> Subject: [Ironruby-core] mspec error undefined method `filtered' for > >> MSpecScript:Class > >> > >> > >> Have any one got this error? and to fix it :-) > >> > >> c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec > >> \default.mspec:12: undefined method `filtered' for MSpecScript:Class > >> (NoMethodError) > >> from C://Documents and Settings/Administrator/.mspecrc:15:in > >> `load' > >> from C://Documents and Settings/Administrator/.mspecrc:15 > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:72:in `load' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:72:in `load' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:71:in `each' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:71:in `load' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ > >> utils/script.rb:213:in `main' > >> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 > >> from c:/ruby/bin/mspec:16:in `load' > >> from c:/ruby/bin/mspec:16 > >> > >> Thanks in advance. > >> -Jirapong > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jirapong.nanta at gmail.com Wed Apr 29 15:42:06 2009 From: jirapong.nanta at gmail.com (jirapong.nanta at gmail.com) Date: Thu, 30 Apr 2009 02:42:06 +0700 Subject: [Ironruby-core] mspec error undefined method `filtered' for MSpecScript:Class In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC02223E@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC02211E@tk5ex14mbxc105.redmond.corp.microsoft.com> <6037C765-3154-4A95-AA2F-11E828A0F751@gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC02223E@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: Thank you Jimmy. That's work! > gem uninstall mspec > del c:\ruby\bin\mspec* Bests, -Jirapong On Apr 30, 2009, at 2:29 AM, Jimmy Schementi wrote: > It's because the "mspec" command you're running lives in your C:\ruby > \bin directory, not C:\...\ironruby\Merlin\External.LCA_RESTRICTED > \Languages\IronRuby\mspec\mspec\bin. Running "where mspec" should > show something like this: > > C:\dev\jschementi-ironruby\Merlin\Main\Languages\Ruby>where mspec > C:\dev\jschementi-ironruby\Merlin\External.LCA_RESTRICTED\Languages > \IronRuby\mspec\mspec\bin\mspec > C:\dev\jschementi-ironruby\Merlin\External.LCA_RESTRICTED\Languages > \IronRuby\mspec\mspec\bin\mspec.bat > > If you don't really need the mspec gem installed, removing that > would probably remedy this. > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of jirapong.nanta at gmail.com >> Sent: Wednesday, April 29, 2009 12:23 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] mspec error undefined method `filtered' >> for MSpecScript:Class >> >> Thank you, I did run the dev.bat but still get same error. I'm >> investigating why it load from gems rather than what get in .mspecrc >> file. >> >> Bests, >> - Jirapong >> >> On Apr 30, 2009, at 1:58 AM, Jimmy Schementi wrote: >> >>> Sounds like you're not running Dev.bat. Before doing anything with >>> IronRuby (when you get it from the git repo), please run Merlin/ >>> Main/ >>> Languages/Ruby/Scripts/Dev.bat. That will make sure things are all >>> set up properly. To make this easy, just create a ironruby.bat file >>> somewhere which calls Dev.bat. I even add that as the first shortcut >>> in my quicklaunch toolbar so WIN+1 will launch a dev.bat cmd.exe >>> window. >>> >>> ~js >>> >>>> -----Original Message----- >>>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>>> bounces at rubyforge.org] On Behalf Of Jim Deville >>>> Sent: Wednesday, April 29, 2009 11:53 AM >>>> To: ironruby-core at rubyforge.org >>>> Subject: Re: [Ironruby-core] mspec error undefined method >>>> `filtered' >>>> for MSpecScript:Class >>>> >>>> The gem won't work for now. Make sure that the mspec that runs is >> the >>>> Mspec in Merlin/External.LCA_RESTRICTED. >>>> >>>> JD >>>> >>>> -----Original Message----- >>>> From: jirapong.nanta at gmail.com >>>> Sent: April 29, 2009 11:12 AM >>>> To: ironruby-core at rubyforge.org >>>> Subject: [Ironruby-core] mspec error undefined method `filtered' >>>> for >>>> MSpecScript:Class >>>> >>>> >>>> Have any one got this error? and to fix it :-) >>>> >>>> c:\ironruby\Merlin\External.LCA_RESTRICTED\Languages\IronRuby\mspec >>>> \default.mspec:12: undefined method `filtered' for >>>> MSpecScript:Class >>>> (NoMethodError) >>>> from C://Documents and Settings/Administrator/.mspecrc:15:in >>>> `load' >>>> from C://Documents and Settings/Administrator/.mspecrc:15 >>>> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >>>> utils/script.rb:72:in `load' >>>> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >>>> utils/script.rb:72:in `load' >>>> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >>>> utils/script.rb:71:in `each' >>>> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >>>> utils/script.rb:71:in `load' >>>> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/lib/mspec/ >>>> utils/script.rb:213:in `main' >>>> from c:/ruby/lib/ruby/gems/1.8/gems/mspec-1.5.11/bin/mspec:7 >>>> from c:/ruby/bin/mspec:16:in `load' >>>> from c:/ruby/bin/mspec:16 >>>> >>>> Thanks in advance. >>>> -Jirapong >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Thu Apr 30 15:46:56 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 30 Apr 2009 21:46:56 +0200 Subject: [Ironruby-core] inheriting from an abstract class Message-ID: Hi I've been working with Kean Walmsley to get the same samples going he has for IronPython but with IronRuby. In this process he's inheriting of an abstract class inside the autocad assemblies, but when that new ruby class is instantiated IronRuby isn't happy at all. IR is complaining that the class doesn't implement IRubyObject or that it is a class. But when I create a non-abstract class and make the ruby object inherit of that empty non-abstract class things it does work. I'll submit this on codeplex with the error message I guess :) --- Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: