[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:85031] [CommonRuby Feature#12732] An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception

From: matz@...
Date: 2018-01-24 07:54:56 UTC
List: ruby-core #85031
Issue #12732 has been updated by matz (Yukihiro Matsumoto).


Aaron's comment in #note-6 sounds reasonable. Accepted.

Matz.


----------------------------------------
Feature #12732: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception
https://bugs.ruby-lang.org/issues/12732#change-69742

* Author: tenderlovemaking (Aaron Patterson)
* Status: Feedback
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 
----------------------------------------
I would like to be able to pass an option to `Integer()` and `Float()` so that they don't raise an exception, but return `nil` instead.  For example:

~~~
Integer(string, exception: false)
~~~

The reason I want this function is so that I can convert strings from YAML or JSON to integers if they parse correctly, or just return strings if they can't be parsed.

---Files--------------------------------
integer-parse.pdf (29 KB)


-- 
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>

In This Thread

Prev Next