Hello Shri,
Thank you very much for code review. It is make sense about constructors and ToString methods. I will work on it.

p.s. please delete bug #1021 for me.

Thank you,
-Jirapong

On May 4, 2009, at 2:15 PM, Shri Borde wrote:

The approach looks good. I have some comments though...

You should do a search for “DateTime” in the code base to find all the places that might need updating. For example, Yaml.DateTimeOps needs to be changed (is there no spec for it?), and Converter.IsIntegral might need to be.

RubyDateTime should be a good .NET citizen. You should override Equals (and HashCode) – I suspect comparison might be broken without that since DateTime was a valuetype whereas RubyDateTime is not. Also ToString. You should define implicit operator converting from and to DateTime so that Ruby code can pass a Ruby Time object to a CLR method that expects DateTime. Would be nice to add constructors to RubyDateTime to match the contructors of DateTime so that you can directly create instances of RubyDateTime using “new RubyDateTime(args)” instead of using nested expressions like “new RubyDateTime(new DateTime(args))” which is harder to read. You should mark it as Serializable. Take a look at DateTime on msdn.com and see if there are any other interfaces or attributes you can propagate from DateTime to RubyDateTime.

The comment for RubyDateTime confused me a bit. Instead of “RubyDateTime to encapsulates DateTime type which support instance's variable”, should it not be “Encapsulates DateTime and supports mutating of instances (whereas DateTime is immutable)”

Creating bugs for code reviews is extra process for you. We can try to avoid it until there are too many code reviews. So do send a reminder if no one replies to your changes within 48 hours.

From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org ] On Behalf Of jirapong.na...@gmail.com
Sent: Sunday, May 03, 2009 7:12 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Time class instance

Hi,
It would be nice to have anyone to review my code :-). bug file in at http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1021

Thanks,
-Jirapong

On May 4, 2009, at 8:43 AM, Jimmy Schementi wrote:


Doesn’t look like anyone has reviewed this yet. To make sure it doesn’t get lost, can you also make a bug on codeplex for this?

From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org ] On Behalf Of jirapong.na...@gmail.com
Sent: Friday, April 24, 2009 1:56 PM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] Time class instance

Hi
Time class instance in IronRuby act as static. Given following code:

t = Time.new
t.utc
t.utc? # should be true behave

t.localtime
t.utc? # should be false

"t" should convert itself into UTC type after method "utc" being called. There are three methods must modifying the receiver; utc, gmtime, and localtime

It also effect to Time.rfc2882 formating as you can run MRI vs IronRuby at - http://gist.github.com/101229

I have propose my fix at - 
http://github.com/Jirapong/ironruby/commit/937a8c4aea048dd20ddea8aa6e27b0055bf6907d

File changes:
• Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ ironruby-tags/library/time/rfc2822_tags.txt • Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ rubyspec/core/time/utc_spec.rb • Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/ Builtins/FileOps.cs • Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/ Builtins/TimeOps.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/RubyDateTime.cs
          • Merlin/Main/Languages/Ruby/Ruby/Ruby.csproj

Note: Shri, this push should fix
23) Failure:
test_request_unmodifed(TestGemRemoteFetcher) [test_gem_remote_fetcher.rb:604]: Expected "Mon, 13 Apr 2009 13:22:16 -0700", not "Mon, 13 Apr 2009 20:22:16 -0000"

Thank you,
-Jirapong
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to