[#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:85145] [Ruby trunk Feature#14386] Add option to let Kernel.#system raise error instead of returning false

From: zn@...
Date: 2018-01-27 04:21:12 UTC
List: ruby-core #85145
Issue #14386 has been updated by znz (Kazuhiro NISHIYAMA).


`Process::Status#inspect` includes signaled information, etc.
How about add such information instead of exit status number only in error messages?

examples: https://gist.github.com/znz/b3c081d0e63d87af6402e27f514f2f15

----------------------------------------
Feature #14386: Add option to let Kernel.#system raise error instead of returning false
https://bugs.ruby-lang.org/issues/14386#change-69881

* Author: k0kubun (Takashi Kokubun)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
I sometimes write code like:

~~~ ruby
system('git pull origin master') || raise('Failed to execute: git pull origin master')
system('bundle check || bundle install') || raise('Failed to execute: bundle check || bundle install')
~~~

Using rake, we can simplify the above code to the following one, but there's no way to do that outside Rakefile. (Note that I just want to do the same thing as "bash -e", the error message is actually not important.)

~~~ ruby
sh 'git pull origin master'
sh 'bundle check || bundle install'
~~~

If we add the following option, we can simplify such code even when we're not on a rake task. I'm not sure whether it's a good name or not though.

~~~ ruby
system 'git pull origin master', assert_status: true
system 'bundle check || bundle install', assert_status: true
# => RuntimeError: Command failed with status (1): bundle check || bundle install
~~~



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