tfpt review "/shelveset:YamlRange;REDMOND\olegtk" Comment : Fixes Range support: implements taguri() and loading Range object from yaml. Changes constructors to hold a reference to a code context instead of EqualityComparer (Range constructors wants it). -- Oleg -------------- next part -------------- A non-text attachment was scrubbed... Name: YamlRange.diff Type: application/octet-stream Size: 12731 bytes Desc: YamlRange.diff URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080627/8d4302ee/attachment-0001.obj>
Why not to add Range constructor w/o CodeContext instead? The context is used only to compare bounds. Does YAML actually invoke <=> method when constructing range? Tomas -----Original Message----- From: Oleg Tkachenko Sent: Friday, June 27, 2008 5:01 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: YamlRange tfpt review "/shelveset:YamlRange;REDMOND\olegtk" Comment : Fixes Range support: implements taguri() and loading Range object from yaml. Changes constructors to hold a reference to a code context instead of EqualityComparer (Range constructors wants it). -- Oleg
Awesome catch! -- Oleg ________________________________________ From: Tomas Matousek Sent: Friday, June 27, 2008 6:31 PM To: Oleg Tkachenko; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: YamlRange Why not to add Range constructor w/o CodeContext instead? The context is used only to compare bounds. Does YAML actually invoke <=> method when constructing range? Tomas -----Original Message----- From: Oleg Tkachenko Sent: Friday, June 27, 2008 5:01 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: YamlRange tfpt review "/shelveset:YamlRange;REDMOND\olegtk" Comment : Fixes Range support: implements taguri() and loading Range object from yaml. Changes constructors to hold a reference to a code context instead of EqualityComparer (Range constructors wants it). -- Oleg
Currently YAML just deserializes bound values (as objects) and passes then to the Range constructor. Do you mean that YAML can check bounds itself before constructing range? -- Oleg -----Original Message----- From: Tomas Matousek Sent: Friday, June 27, 2008 6:32 PM To: Oleg Tkachenko; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: YamlRange Why not to add Range constructor w/o CodeContext instead? The context is used only to compare bounds. Does YAML actually invoke <=> method when constructing range? Tomas -----Original Message----- From: Oleg Tkachenko Sent: Friday, June 27, 2008 5:01 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: YamlRange tfpt review "/shelveset:YamlRange;REDMOND\olegtk" Comment : Fixes Range support: implements taguri() and loading Range object from yaml. Changes constructors to hold a reference to a code context instead of EqualityComparer (Range constructors wants it). -- Oleg
After F2F check with Tomas we figured out the CodeContext is still needed here. -- Oleg -----Original Message----- From: Tomas Matousek Sent: Friday, June 27, 2008 6:32 PM To: Oleg Tkachenko; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: YamlRange Why not to add Range constructor w/o CodeContext instead? The context is used only to compare bounds. Does YAML actually invoke <=> method when constructing range? Tomas -----Original Message----- From: Oleg Tkachenko Sent: Friday, June 27, 2008 5:01 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: YamlRange tfpt review "/shelveset:YamlRange;REDMOND\olegtk" Comment : Fixes Range support: implements taguri() and loading Range object from yaml. Changes constructors to hold a reference to a code context instead of EqualityComparer (Range constructors wants it). -- Oleg