I think the following spec is wrong for FileOps.dirname
?
It is
?
??? File.dirname(''/////'').should == ''/''
?
but it should be
?
??? File.dirname(''/////'').should == ''//''
?
If it is my misunderstanding, please let me know.?
?
Thanks,
Unni
?
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080706/b043f3b7/attachment.html>
Well, it''s not as simple as that. The spec as written is for *nix
paths, where ///// is root. So on one side we should move towards /////
returning the current drive. On the other hand, the notation // represents a UNC
file path, which theoretically should resolve to a form of //server/share. I
don''t know what CRuby wants dirname to return, and I also
don''t know if we are going to deviate at all. I know that it currently
returns //, but if you search for this function, there is some discussion about
how it should behave, and I''m not sure how it resolved. For now,
I''d suggest turning it into:
platform_is_not :windows do
File.dirname(''/////'').should
== ''/''
end
platform_is :windows do
File.dirname(''/////'').should
== ''//''
end
That will keep it working on *nix.
JD
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Unnikrishnan Nair
Sent: Sunday, July 06, 2008 8:51 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] spec changes
I think the following spec is wrong for FileOps.dirname
It is
File.dirname(''/////'').should == ''/''
but it should be
File.dirname(''/////'').should == ''//''
If it is my misunderstanding, please let me know.
Thanks,
Unni
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080707/e65cd971/attachment.html>
Thanks Jim, I have a test program that I run in windows with all the spec
against ruby and against IR. It then compare the results and there is where I
found this problem. yes, you are correct with your change. I think we can go
with the change suggested.
By the way, did anyone compiled Ironruby on Mono? I finally got the mono
installed and would like to try to compile it to run the spec on Mac this week.
Do you guys consider Mac as *nix environment?
Thanks,
Unni
--- On Mon, 7/7/08, Jim Deville <jdeville at microsoft.com> wrote:
From: Jim Deville <jdeville at microsoft.com>
Subject: RE: [Ironruby-core] spec changes
To: "ksunair at yahoo.com" <ksunair at yahoo.com>,
"ironruby-core at rubyforge.org" <ironruby-core at
rubyforge.org>
Date: Monday, July 7, 2008, 1:32 AM
Well, it?s not as simple as that. The spec as written is for *nix paths, where
///// is root. So on one side we should move towards ///// returning the current
drive. On the other hand, the notation // represents a UNC file path, which
theoretically should resolve to a form of //server/share. I don?t know what
CRuby wants dirname to return, and I also don?t know if we are going to deviate
at all. I know that it currently returns //, but if you search for this
function, there is some discussion about how it should behave, and I?m not sure
how it resolved. For now, I?d suggest turning it into:
?
??????????????? platform_is_not :windows do
??????????????????????????????? File.dirname(?/////?).should == ?/?
??????????????? end
??????????????? platform_is :windows do
??????????????????????????????? File.dirname(?/////?).should == ?//?
??????????????? end
?
That will keep it working on *nix.
?
JD
?
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Unnikrishnan Nair
Sent: Sunday, July 06, 2008 8:51 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] spec changes
?
I think the following spec is wrong for FileOps.dirname
?
It is
?
??? File.dirname(''/////'').should == ''/''
?
but it should be
?
??? File.dirname(''/////'').should == ''//''
?
If it is my misunderstanding, please let me know.?
?
Thanks,
Unni
?
?
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080707/1231dc74/attachment-0001.html>
Hi Unni,
Did you check this out?
- http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/
-
http://flanders.co.nz/2008/02/05/compiling-mono-and-ironruby-on-osx-leopard/
Hope this helps,
-Jirapong
2008/7/7 Unnikrishnan Nair <ksunair at yahoo.com>:
> Thanks Jim, I have a test program that I run in windows with all the spec
> against ruby and against IR. It then compare the results and there is where
> I found this problem. yes, you are correct with your change. I think we can
> go with the change suggested.
>
> By the way, did anyone compiled Ironruby on Mono? I finally got the mono
> installed and would like to try to compile it to run the spec on Mac this
> week. Do you guys consider Mac as *nix environment?
>
> Thanks,
>
> Unni
>
> --- On *Mon, 7/7/08, Jim Deville <jdeville at microsoft.com>* wrote:
>
> From: Jim Deville <jdeville at microsoft.com>
> Subject: RE: [Ironruby-core] spec changes
> To: "ksunair at yahoo.com" <ksunair at yahoo.com>,
"ironruby-core at rubyforge.org"
> <ironruby-core at rubyforge.org>
> Date: Monday, July 7, 2008, 1:32 AM
>
>
> Well, it''s not as simple as that. The spec as written is for *nix
paths,
> where ///// is root. So on one side we should move towards ///// returning
> the current drive. On the other hand, the notation // represents a UNC file
> path, which theoretically should resolve to a form of //server/share. I
> don''t know what CRuby wants dirname to return, and I also
don''t know if we
> are going to deviate at all. I know that it currently returns //, but if
you
> search for this function, there is some discussion about how it should
> behave, and I''m not sure how it resolved. For now, I''d
suggest turning it
> into:
>
>
>
> platform_is_not :windows do
>
>
File.dirname(''/////'').should == ''/''
>
> end
>
> platform_is :windows do
>
>
File.dirname(''/////'').should == ''//''
>
> end
>
>
>
> That will keep it working on *nix.
>
>
>
> JD
>
>
>
> *From:* ironruby-core-bounces at rubyforge.org [mailto:
> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Unnikrishnan Nair
> *Sent:* Sunday, July 06, 2008 8:51 PM
> *To:* ironruby-core at rubyforge.org
> *Subject:* [Ironruby-core] spec changes
>
>
>
> I think the following spec is wrong for FileOps.dirname
>
>
>
> It is
>
>
>
> File.dirname(''/////'').should == ''/''
>
>
>
> but it should be
>
>
>
> File.dirname(''/////'').should ==
''//''
>
>
>
> If it is my misunderstanding, please let me know.
>
>
>
> Thanks,
>
> Unni
>
>
>
>
>
>
>
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080707/b4a6e09a/attachment.html>
Glad the spec stuff worked.
I have tried to compile IR on Mono, but there are some patches that need to be
applied first, I''m not sure where those patches are. I also ran into a
problem on Mac with filename and folder casing not matching the csproj file. I
would consider Mac as a *nix platform. It has all the stuff I look for (mainly
bash, and the UNIX system underneath.
JD
From: Unnikrishnan Nair [mailto:ksunair at yahoo.com]
Sent: Monday, July 07, 2008 7:18 AM
To: ironruby-core at rubyforge.org; Jim Deville
Subject: RE: [Ironruby-core] spec changes
Thanks Jim, I have a test program that I run in windows with all the spec
against ruby and against IR. It then compare the results and there is where I
found this problem. yes, you are correct with your change. I think we can go
with the change suggested.
By the way, did anyone compiled Ironruby on Mono? I finally got the mono
installed and would like to try to compile it to run the spec on Mac this week.
Do you guys consider Mac as *nix environment?
Thanks,
Unni
--- On Mon, 7/7/08, Jim Deville <jdeville at microsoft.com> wrote:
From: Jim Deville <jdeville at microsoft.com>
Subject: RE: [Ironruby-core] spec changes
To: "ksunair at yahoo.com" <ksunair at yahoo.com>,
"ironruby-core at rubyforge.org" <ironruby-core at
rubyforge.org>
Date: Monday, July 7, 2008, 1:32 AM
Well, it?s not as simple as that. The spec as written is for *nix paths, where
///// is root. So on one side we should move towards ///// returning the current
drive. On the other hand, the notation // represents a UNC file path, which
theoretically should resolve to a form of //server/share. I don?t know what
CRuby wants dirname to return, and I also don?t know if we are going to deviate
at all. I know that it currently returns //, but if you search for this
function, there is some discussion about how it should behave, and I?m not sure
how it resolved. For now, I?d suggest turning it into:
platform_is_not :windows do
File.dirname(?/////?).should == ?/?
end
platform_is :windows do
File.dirname(?/////?).should == ?//?
end
That will keep it working on *nix.
JD
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Unnikrishnan Nair
Sent: Sunday, July 06, 2008 8:51 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] spec changes
I think the following spec is wrong for FileOps.dirname
It is
File.dirname(''/////'').should == ''/''
but it should be
File.dirname(''/////'').should == ''//''
If it is my misunderstanding, please let me know.
Thanks,
Unni
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080707/733005c5/attachment-0001.html>
Thanks, just to make sure what ever? changes I make I want to test it both in
Windows and *nix world.
Unni
--- On Mon, 7/7/08, Jim Deville <jdeville at microsoft.com> wrote:
From: Jim Deville <jdeville at microsoft.com>
Subject: RE: [Ironruby-core] spec changes
To: "ksunair at yahoo.com" <ksunair at yahoo.com>,
"ironruby-core at rubyforge.org" <ironruby-core at
rubyforge.org>
Date: Monday, July 7, 2008, 11:46 AM
Glad the spec stuff worked.
?
I have tried to compile IR on Mono, but there are some patches that need to be
applied first, I?m not sure where those patches are. I also ran into a problem
on Mac with filename and folder casing not matching the csproj file. I would
consider Mac as a *nix platform. It has all the stuff I look for (mainly bash,
and the UNIX system underneath.
?
JD
?
From: Unnikrishnan Nair [mailto:ksunair at yahoo.com]
Sent: Monday, July 07, 2008 7:18 AM
To: ironruby-core at rubyforge.org; Jim Deville
Subject: RE: [Ironruby-core] spec changes
?
Thanks Jim, I have a test program that I run in windows with all the spec
against ruby and against IR. It then compare the results and there is where I
found this problem. yes, you are correct with your change. I think we can go
with the change suggested.
By the way, did anyone compiled Ironruby on Mono? I finally got the mono
installed and would like to try to compile it to run the spec on Mac this week.
Do you guys consider Mac as *nix environment?
Thanks,
Unni
--- On Mon, 7/7/08, Jim Deville <jdeville at microsoft.com> wrote:
From: Jim Deville <jdeville at microsoft.com>
Subject: RE: [Ironruby-core] spec changes
To: "ksunair at yahoo.com" <ksunair at yahoo.com>,
"ironruby-core at rubyforge.org" <ironruby-core at
rubyforge.org>
Date: Monday, July 7, 2008, 1:32 AM
Well, it?s not as simple as that. The spec as written is for *nix paths, where
///// is root. So on one side we should move towards ///// returning the current
drive. On the other hand, the notation // represents a UNC file path, which
theoretically should resolve to a form of //server/share. I don?t know what
CRuby wants dirname to return, and I also don?t know if we are going to deviate
at all. I know that it currently returns //, but if you search for this
function, there is some discussion about how it should behave, and I?m not sure
how it resolved. For now, I?d suggest turning it into:
?
??????????????? platform_is_not :windows do
??????????????????????????????? File.dirname(?/////?).should == ?/?
??????????????? end
??????????????? platform_is :windows do
??????????????????????????????? File.dirname(?/////?).should == ?//?
??????????????? end
?
That will keep it working on *nix.
?
JD
?
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at
rubyforge.org] On Behalf Of Unnikrishnan Nair
Sent: Sunday, July 06, 2008 8:51 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] spec changes
?
I think the following spec is wrong for FileOps.dirname
?
It is
?
??? File.dirname(''/////'').should == ''/''
?
but it should be
?
??? File.dirname(''/////'').should == ''//''
?
If it is my misunderstanding, please let me know.?
?
Thanks,
Unni
?
?
?
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/ironruby-core/attachments/20080707/556b9b30/attachment.html>