Ruby Version Changes
By Jesus Castello
Ruby 2.4
New features
- Fixnum + Bignum merge into Integer
- Better Thread error reporting
Methods
- Dir.empty?
- File.empty?
- Regexp#match?
- Enumerable#sum
- Integer#digits
Ruby 2.3
New features
- Frozen strings pragma
- Safe navigator operator (&.)
- Squiggly heredoc (<<~)
- 'Did you mean?' gem included by default
Methods
- Hash#dig
- Array#dig
- File.mkfifo
- Hash#fetch_values
- Enumerable#chunk_while
Ruby 2.2
New features
Methods
- Method#curry
- Kernel#itself
- Enumerable#slice_after
- Enumerable#slice_when
Ruby 2.1
New features
- Required Keyword Arguments
- Generational GC
- New GC environment variables
- Refinements
Methods
- String#scrub and String#scrub!
- Binding#local_variable_get(symbol)
- Binding#local_variable_set(symbol, obj)
- Binding#local_variable_defined?(symbol)
Ruby 2.0
New features
- Lazy enumerators
- Keyword Arguments
- UTF-8 as default encoding
- Refinements (experimental)
- New regular expression engine
- `%i` and `%I` for symbol list creation (similar to `%w` and `%W`)
Methods
- Kernel#__dir__
- Array#bsearch
- Module#prepend
- Module.prepended
- Module.prepend_features
- Return an Array instead of an Enumerator:
- String#chars
- String#bytes
- ​String#lines
- String#codepoints
Click the button below to share this page if you found it useful :)