Forum: IronRuby Code Review: miscrubyfixes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cb51033949ffccd982ae32c9f890f25a?d=identicon&s=25 Tomas Matousek (Guest)
on 2008-10-24 20:18
(Received via mailing list)
Attachment: miscrubyfixes.diff (700 KB)
tfpt review "/shelveset:miscrubyfixes;REDMOND\tomat"
Comment  :
  Implements range conditions:
  -     If a range whose bounds are not integer literals is used as a
control flow condition (if/unless/while-loop/until-loop/?:) it is
considered a 'range condition'. It returns true/false depending on
whether the execution state is in the range or not (the state is
maintained in a local variable).
  -     Adjusts ParseTree to return flip2, flip3 nodes for range
conditions.
  -     Removes compile time checks of range bounds - they should be
evaluated at runtime.

  Implements regex conditions: A regex in a condition should perform
match against $_.
  Converts a call to =~ method to MatchExpression if the left hand side
is a regex expression (MRI doesn't call =~ method in that case).

  Stops using dynamic sites for Proc#call, we can easily use block
dispatchers.

  Fixes bugs:
  -     def f; yield; end;   f {|a,b,*c| p [a,b,c] }
  -     proc{|x,| x}.call([1]).should == [1] ... This is actually
inconsistent with yield in MRI. We had it consistent :-/.
  -     [ ironruby-Bugs-21258 ] Can't splat to unwrap an array of
exceptions.
  -     Symbol#inspect should quote only symbols that are not valid
variable/method/operator names.
  -                 Fixes 'defined?' for qualified constants and
methods.


Tomas
F983f0c990cba2fe743ef62a975ec99c?d=identicon&s=25 Curt Hagenlocher (Guest)
on 2008-10-25 00:31
(Received via mailing list)
Looks good.
This topic is locked and can not be replied to.