Menu

gitpiper

Ruby Cheat Sheet in April 2024

Last Updated: 20 April 2024

README.md

{:.-one-column}

Code Description
$! latest error message
$@ location of error
$_ string last read by gets
$. line number last read by interpreter
$& string last matched by regexp
$~ the last regexp match, as an array of subexpressions
$n the nth subexpression in the last match (same as $~[n])
$= case-insensitivity flag
$/ input record separator
$\ output record separator
$0 the name of the ruby script file
$* (or ARGV) the command line arguments
$$ interpreter’s process ID
$? exit status of last executed child process
$-i $-l $-p $-v Command line switches
$-v (or $VERBOSE) verbose mode

338+ more cheat sheets for you in April 2024

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️

© 2024 GitPiper. All rights reserved

Rackpiper Technology Inc

Company

About UsBlogContact

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️