mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-19 03:25:44 +00:00
Merge pull request #90 from roryokane/patch-1
Fix indentation in Ruby cheat sheet
This commit is contained in:
commit
c9c425d37d
@ -9,8 +9,8 @@ ruby -e 'puts "Hello world"'
|
|||||||
|
|
||||||
# The -n switch acts as though the code you pass to Ruby was wrapped in the following:
|
# The -n switch acts as though the code you pass to Ruby was wrapped in the following:
|
||||||
# while gets
|
# while gets
|
||||||
# # code here
|
# # code here
|
||||||
# end
|
# end
|
||||||
ruby -ne 'puts $_' file.txt
|
ruby -ne 'puts $_' file.txt
|
||||||
|
|
||||||
# Beware that with the -n switch $_ contains newline character in the end.
|
# Beware that with the -n switch $_ contains newline character in the end.
|
||||||
|
Loading…
Reference in New Issue
Block a user