Introduction to Ruby
1.1 What is Ruby?
A dynamic, open-source, object-oriented programming language created by Yukihiro "Matz" Matsumoto (first released in 1995, Japan).
Philosophy: developer happiness and the principle of least surprise. "Ruby is designed to make programmers happy."
Influences: Perl (text processing), Smalltalk (pure OOP, blocks), Lisp (closures, metaprogramming), Eiffel, Ada.
1.2 Key Characteristics
Pure object orientation Everything is an object, including integers, nil, classes, and methods
Types are checked at runtime (duck typing). Optional static types with RBS/Sorbet.
Blocks and closures Elegant iteration and callbacks (each, map, do...end)
Optional parentheses, natural-language-like code Modules instead of multiple inheritance
Code that writes code. DSLs (Rails, RSpec, Rake).
Automatic memory management 180,000+ gems on RubyGems.org A large standard library
1.3 Where Ruby Is Used
Web development: Ruby on Rails (GitHub, Shopify, Basecamp, Airbnb (early), GitLab, Zendesk, Stripe (parts), Coinbase (early)).
DevOps and automation: Chef, Puppet (historically), Vagrant, Homebrew, Fastlane, Capistrano, Kamal.
Scripting, data processing, CLI tools, static site generators (Jekyll), testing tools (Cucumber, RSpec, Capybara), security tools (Metasploit).
1.4 Ruby Implementations
CRuby / MRI The reference implementation (written in C), with the YJIT/ZJIT JIT compilers
Runs on the JVM (true parallel threads, Java interop) GraalVM-based, high performance Lightweight, embeddable Natalie / Artichoke