< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #15987 has been updated by znz (Kazuhiro NISHIYAMA).
I think `nil` means default behavior.
```
Integer("") # => ArgumentError
Integer("", exception: nil) # => ArgumentError
Integer("", exception: true) # => ArgumentError
Integer("", exception: false) # => nil
```
```
system("") # => nil
system("", exception: nil) # => nil
system("", exception: true) # => Errno::ENOENT
system("", exception: false) # => nil
```
----------------------------------------
Bug #15987: Let `exception` option in `Kernel#Complex`, `Kernel#Float`, `Kernel#Integer`, `Kernel#Rational` be falsy vs. truthy
https://bugs.ruby-lang.org/issues/15987#change-79332
* Author: sawa (Tsuyoshi Sawada)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
The `exception` option in `Kernel#Complex`, `Kernel#Float`, `Kernel#Integer`, and `Kernel#Rational` distinguishes `false` vs. other values.
```ruby
Integer("z", exception: false) #=> nil
Integer("z", exception: nil) #>> ArgumentError: invalid value for Integer(): "z")
```
But in most other cases where a boolean notion is concerned (for example, the `chomp` option in `Kernel#gets`), the distinction is between falsy vs. truthy values.
I request the distinction to be falsy vs. truthy. In other words, I would like the value `nil` to work on the falsy side rather than the truthy side like this.
```ruby
Integer("z", exception: false) #=> nil
Integer("z", exception: nil) #=> nil
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>