ruby-dev summary 23379-23458

S

SASADA Koichi

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
 
N

NAKAMURA, Hiroshi

Hi,

At first, thank you for your all continuous great work.

SASADA said:
[ruby-dev:23352] Re: ensure modifier
(continued)

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

Sorry for my unclear message [ruby-dev:23375]. I meant "I think no
special syntax(ensure modifier) needed because we just can implement it
with a method like PStore#transaction".
Introducing ensure modifier is still an open issue.

Sure. Even though I'm thinking as above, Matz haven't made his mind yet.

Regards,
// NaHi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,218
Latest member
JolieDenha

Latest Threads

Top