Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Curt Hagenlocher
The simple test I did suggested that MRI dynamically calls hash on each element of the array. -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Tomas Matousek Sent: Thursday, April 16, 2009 4:08 PM To: Tomas Matousek; i

Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Tomas Matousek
See RubyFileOps.Join for an example. Tomas -Original Message- From: Tomas Matousek Sent: Thursday, April 16, 2009 4:06 PM To: ironruby-core@rubyforge.org Subject: RE: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays Does Ruby call "hash" dynamically on each

Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Tomas Matousek
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-boun...@rubyforge.org [mailto:ironruby-c

Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Daniele Alessandri
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-boun...@rubyforge.org > [mailto:ironruby-core-boun...@rub

Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Shri Borde
Curt pointed out a way to fix the recursive case using RubyUtils.RecursionTracker... -Original Message- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Shri Borde Sent: Thursday, April 16, 2009 3:06 PM To: ironruby-core@rubyforge.org Su

Re: [Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Shri Borde
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

[Ironruby-core] Bug filed: Array#hash should properly handle recursive arrays

2009-04-16 Thread Daniele Alessandri
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

Re: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string?

2009-04-16 Thread Ben Hall
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

Re: [Ironruby-core] Review: RubyGems tests

2009-04-16 Thread Tomas Matousek
Looks good. Tomas From: Shri Borde Sent: Thursday, April 16, 2009 12:39 PM To: IronRuby External Code Reviewers Cc: ironruby-core@rubyforge.org Subject: Review: RubyGems tests http://github.com/shri/ironruby/commit/8dca5f221707d00e28c032e96e5325796724422a (the RubyGems tests. Not very interesti

[Ironruby-core] Review: RubyGems tests

2009-04-16 Thread Shri Borde
http://github.com/shri/ironruby/commit/8dca5f221707d00e28c032e96e5325796724422a (the RubyGems tests. Not very interesting) http://github.com/shri/ironruby/commit/89b1fe3d29ce2d82b86b4bf7a2d6a445d5aa4955 (the other changes) GitDiff.bat 8dca5f221707d00e28c032e96e5325796724422a 89b1fe3d29ce2d82b86

Re: [Ironruby-core] irtests.bat spawning multiple processes

2009-04-16 Thread Jim Deville
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@rubyforge.org Subject: [Ironruby-core] irtests.bat spawning multiple processes Thibaut, I have a change to irtests.bat which will give a

[Ironruby-core] irtests.bat spawning multiple processes

2009-04-16 Thread Shri Borde
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 remainin

Re: [Ironruby-core] [patch] More fixes for Array (IListOps.cs)

2009-04-16 Thread Shri Borde
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-boun...@rubyforge.org [mailto:ironruby-core-boun

Re: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string?

2009-04-16 Thread Tomas Matousek
Do you have the latest build of IronRuby? Non-mutable Ruby methods are implemented there on CLR strings. Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Thursday, April 16, 2009 9:12 AM To: ironruby-core@rubyforge

Re: [Ironruby-core] [patch] More fixes for Array (IListOps.cs)

2009-04-16 Thread Tomas Matousek
Correction: CastToFixnum is the right one. Ruby has just to many integer conversions to remember :) Tomas From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Tomas Matousek Sent: Wednesday, April 15, 2009 8:45 PM To: ironruby-core@rubyforge.org Su

Re: [Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string?

2009-04-16 Thread Ivan Porto Carrero
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

[Ironruby-core] C# method returns string to IronRuby - how it automatically be a IronRuby string?

2009-04-16 Thread Ben Hall
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

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread Daniele Alessandri
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 tha

Re: [Ironruby-core] "mspec ci" throws an exception

2009-04-16 Thread Jim Deville
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 m

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread jirapong.na...@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 launchi

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread Thibaut Barrère
Hi, >> 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 y

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread Thibaut Barrère
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.

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread Daniele Alessandri
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.Globaliza

Re: [Ironruby-core] [patch] More fixes for Array (IListOps.cs)

2009-04-16 Thread Daniele Alessandri
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.Cas

[Ironruby-core] "mspec ci" throws an exception

2009-04-16 Thread Thibaut Barrère
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-c

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread Thibaut Barrère
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 fo

Re: [Ironruby-core] Some feedback on the compile/test process

2009-04-16 Thread Thibaut Barrère
> 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. t