arimay (yasuhiro arima)
Login: arimay
Registered on: 07/18/2014
Last sign in: 06/03/2021
Issues
04/07/2021
06:49 AM
Ruby
Feature #12133: Ability to exclude start when defining a range
Definition of a range object that exclude a start position, and its shorthand notation. Since we have #exclude_end? we also want #exclude_begin? . class Range def initialize(begin, end, exclude_end=false, exclude_begin...
arimay (yasuhiro arima)
02/22/2021
06:11 AM
Ruby
Feature #13303: String#any? as !String#empty?
"#any?" is preferred, since the same method name is harder to forget and less confusing. If the Array, Hash and String will have new methods, i propose "#having?" as the new method name.
arimay (yasuhiro arima)
09/18/2015
03:16 PM
Ruby
Feature #11538 (Feedback): ensure variable syntax
ensure の構文を拡張して、コンテキストの値を受け取れるようにする提案です。 rescue で例外オブジェクトを変数に受けて参照するのと同様に、ensure で結果のオブジェクトを参照します。 ensure '=>' lhs 途中での return による打ち切りなどによって、適切でない値が返ることがあります。 現状でこれを確認するためには、ensure で参照できるようにあらかじめ変数に束縛する必要があります。 ~~~ruby de...
arimay (yasuhiro arima)
11/02/2014
05:14 PM
Ruby
Feature #10287: rename COLON3 to COLON2_HEAD.
パッチを作り直してみました。
arimay (yasuhiro arima)
10/15/2014
02:42 PM
Ruby
Feature #10327: Bool/False/True module for '==='
もっともなので Falsy/Truthy に変えてみました。 patch を作り直したので添付します。 前回の patch は壊れていました。確認が不十分でごめんなさい。 ~~~ $ ./miniruby -e '[nil, false, true, 0].each {|obj| case obj when Falsy; p [obj, false] when Truthy; p [obj, true] else p...
arimay (yasuhiro arima)
10/05/2014
04:09 PM
Ruby
Feature #10327 (Open): Bool/False/True module for '==='
ruby-core:0237 から始まる Boolean Class の話題で Boolean Module が提案されていました。 それは必要とされているのか?という疑問とともに .true? メソッドなどが議論されていました。 それを読んで、=== メソッドを利用する Bool, False, True Module を書いてみました。 これを使うと case 式で when TrueClass, FalseClass ではなく when Bool と...
arimay (yasuhiro arima)
09/23/2014
04:15 PM
Ruby
Feature #10287 (Assigned): rename COLON3 to COLON2_HEAD.
主に parse.y を読んでいて、DOT2 に対する DOT3 はわかるのですが、COLON2 に対する COLON3 はよくない名前だと思いました。 COLON3 の表すものは ::FOO::BAR のようにスコープ指定の先頭を表すものなので、COLON2_HEAD としてパッチを作ってみました。
arimay (yasuhiro arima)
Also available in: Atom
Loading...