Hi. This is ruby-dev summary.

[ruby-dev:23352] Re: ensure modifier

> [ruby-dev:23295] ensure modifier
> 
> A patch for new 'ensure' modifier was posted by Nobu Nakada.  It is
> similar to 'rescue' modifier.  NAKAMURA, Hiroshi and Shugo Maeda
> commented that they felt uncertain about the merit of the new modifier.
> Other modifiers provide a simple method to write related statements in
> one line,  but the 'ensure' modifier might break the relation.
> For instance, "A if B" indicates a relation between A and B, while
> "A ensure B" does not mean such a relation.

(continued)

Nobu.Nakada showed an example to collaborate pre- and postprocesses;

  for x = Hoge.open
    x.do_something1
    x.do_something2
  rescue
    x.do_something3
  ensure
    x.close
  end

  let(Hoge.open) do |x|
    x.do_something1
    x.do_something2
  rescue
    x.do_something3
  ensure
    x.close
  end

Nahi said that we need nice name like PStore#transaction.

Introducing ensure modifier is still an open issue.


[ruby-dev:23385] Process::Status as boolean

Nobu.Nakada proposed Process::Status#success? method which
returns (exitstatus==EXIT_SUCCESS). This method achieves
to get rid of comparing with $?.exitstatus and EXIT_SUCCESS,
which depends on each platform.

This change has been accepted.


[ruby-dev:23408] Ruby/Bsearch

MoonWolf implemented Ruby/Bsearch as C extension. He requested
that this library would better be added to 1.8.2 or 1.9.x.

Matz accepted this request except naming issue(as usual).

  bsearch_first
  bsearch_last
  bsearch_upper_boundary
  bsearch_lower_boundary
  bsearch_range
  bsearch (alias of bsearch_first)

Matz doesn't like prefixed method names as above. Moonwolf
claimed that prefix 'bsearch' is necessary to represent
this method's meaning. Another idea Moonwolf suggested was
to import 'SortedArray'(this is a subclass of Array). 'bsearch'
is only used in 'SortedArray' and we won't have trouble of
naming.

This topic is still an open issue.


[ruby-dev:23443] [Oniguruma] Version 2.2.8

K.Kosako released Oniguruma 2.2.8.
http://www.geocities.jp/kosako1/oniguruma/archive/onigd2_2_8.tar.gz



- For previous issues, visit ruby-dev summary index:
      http://i.loveruby.net/en/ruby-dev-summary.html


-- 
// SASADA Koichi at atdot dot net
//