Readit News logoReadit News
Joker_vD · a year ago
I can't help but notice that all of those methods take a single command line string as a parameter. That's arguably fine on Windows, but not on Linux. So: how is that string broken down into the array of strings for the ultimate execve() call, in Ruby? Does Ruby parse it on its own (using some dialect of shell for quoting), or does it invoke the shell to do the heavy lifting, or?..
masa331 · a year ago
There is also a variant of 'system' which takes multiple agruments. It invokes the program in the first argument and passes the other arguments directly without going through shell so no globs etc. can take place. But this is not mentioned in the article but it is in Ruby docs
aquasync · a year ago
While the article says that backticks don't provide access to the exit status, you can retrieve it with $?.exitstatus.
rererereferred · a year ago
Lately I've been using Bun shell for writing scripts, it's a nice alternative for those who prefer JavaScript syntax over Ruby: https://bun.sh/docs/runtime/shell

Deleted Comment

Alifatisk · a year ago
The text blends in so well with the background, it is barely readable for me.
oneneptune · a year ago
Check your browser extensions and add-ons.

The title and body text have a 15.52:1 contrast ratio with the background, which is acceptable by all accessibility standards.

The subtitle and background have a 5.32:1 contrast ratio with the background. This would be considered acceptable by most accessibility standards, though I would like it around 9:1.

BenjiWiebe · a year ago
Black text on white background for me. Do you have an add-on or something changing the site?
Alifatisk · a year ago
Yeah you're right, it's my FF acting weird.