Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 555 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 555 Bytes

Learn-Ruby

Repo to Learn Ruby. PR's are welcome.

You may notice C++ files or other languages. That is because sometimes I write a solution in a more familiar language first.

I/O

Input/output is similar to Python, Bash, and C.

Reading Example

word = gets

Writing Example

puts "Hello, World!"

Strings

The worst part in any language.

Luckily, strings in Ruby can be manipulated similarly to Python via square bracket indexing (i.e. [i]). For example:

% ruby
word = gets
puts word[0]
^D
lol
l