---
title: "Ruby 2.4 Blogs"
description: "BigBinary blog posts in the Ruby 2.4 category."
canonical_url: "https://www.bigbinary.com/blog/categories/ruby-2-4"
markdown_url: "https://www.bigbinary.com/blog/categories/ruby-2-4.md"
---

# Ruby 2.4 Blogs

BigBinary blog posts in the Ruby 2.4 category.

## Posts

### Ruby 2.4 has optimized enumerable min max methods

[Ruby 2.4 has optimized enumerable min max methods](https://www.bigbinary.com/blog/ruby-2-4-0-has-optimized-enumerable-min-max-methods)

- Author: Chirag Shah
- Published: September 28, 2017
- Categories: Ruby 2.4, Ruby

min, max and minmax methods for enumerable class have been optimized in ruby 2.4

### CSV::Row#each etc. return enumerator when no block given

[CSV::Row#each etc. return enumerator when no block given](https://www.bigbinary.com/blog/csv-row-each-and-delete-if-return-enumerator-when-no-block-given)

- Author: Sushant Mittal
- Published: September 25, 2017
- Categories: Ruby 2.4, Ruby

CSV::Row#each, CSV::Row#delete_if, CSV::Table#each and CSV::Table#delete_if
return enumerator when no block given

### Ruby 2.4 DateTime#to_time & Time#to_time keeps info

[Ruby 2.4 DateTime#to_time & Time#to_time keeps info](https://www.bigbinary.com/blog/to-time-preserves-time-zone-info-in-ruby-2-4)

- Author: Sushant Mittal
- Published: September 19, 2017
- Categories: Ruby 2.4, Ruby

DateTime#to_time and Time#to_time preserves receiver's timezone offset info in
Ruby 2.4

### Avoid exception for dup on Integer

[Avoid exception for dup on Integer](https://www.bigbinary.com/blog/avoid-exceptions-for-dup-on-interger-and-similar-cases)

- Author: Rohit Arolkar
- Published: August 1, 2017
- Categories: Ruby 2.4, Ruby

dup now silently fails for Integer

### Ruby 2.4 no exception for objects converted to IPAddr

[Ruby 2.4 no exception for objects converted to IPAddr](https://www.bigbinary.com/blog/ruby-2-4-ip-addr-methods-do-not-throw-exception-for-objects-that-cant-be-converted-to-ipaddr)

- Author: Sushant Mittal
- Published: June 21, 2017
- Categories: Ruby 2.4, Ruby

IPAddr#== and IPAddr# do not throw exception for objects that can't be converted
to IPAddr anymore in Ruby 2.4

### Ruby 2.4 deprecated constants TRUE, FALSE & NIL

[Ruby 2.4 deprecated constants TRUE, FALSE & NIL](https://www.bigbinary.com/blog/ruby-2-4-has-depecated-constants-true-false-and-nil)

- Author: Akshay Vishnoi
- Published: June 19, 2017
- Categories: Ruby 2.4, Ruby

Ruby 2.4 has deprecated toplevel constants TRUE, FALSE and NIL

### Ruby 2.4 allows custom suffix of rotated log files

[Ruby 2.4 allows custom suffix of rotated log files](https://www.bigbinary.com/blog/ruby-2-4-allows-to-customize-suffix-of-the-rotated-log-files)

- Author: Sushant Mittal
- Published: June 15, 2017
- Categories: Ruby 2.4, Ruby

Ruby 2.4 has added ability to pass custom date format for the suffix of log
files rotated daily, weekly or monthly

### Ruby 2.4 Hash#transform_values & destructive version

[Ruby 2.4 Hash#transform_values & destructive version](https://www.bigbinary.com/blog/ruby-2-4-added-hash-transform-values-and-its-destructive-version-from-active-support)

- Author: Sushant Mittal
- Published: June 14, 2017
- Categories: Ruby 2.4, Ruby

In Ruby 2.4, Hash#transform_values and Hash#transform_values! can be used to
transform the values after executing passed block for each value

### Binding irb - Runtime Invocation for IRB

[Binding irb - Runtime Invocation for IRB](https://www.bigbinary.com/blog/binding-irb)

- Author: Rohit Arolkar
- Published: April 18, 2017
- Categories: Ruby 2.4, Ruby

Ruby now has a core IRB library for better debugging

### Ruby 2.4 has added additional parameters for Logger#new

[Ruby 2.4 has added additional parameters for Logger#new](https://www.bigbinary.com/blog/ruby-2-4-has-added-additional-parameters-for-logger-new)

- Author: Chirag Shah
- Published: April 10, 2017
- Categories: Ruby 2.4, Ruby

Ruby 2.4 makes it possible to specify logger level, progname, formatter and
datetime_format in logger constructor.

### Ruby 2.4 has default basename for Tempfile#create

[Ruby 2.4 has default basename for Tempfile#create](https://www.bigbinary.com/blog/ruby-2-4-has-default-basename-for-tempfile-create)

- Author: Chirag Shah
- Published: April 4, 2017
- Categories: Ruby 2.4, Ruby

Tempfile#create method now has a default empty basename

### New arguments support for float & integer modifiers

[New arguments support for float & integer modifiers](https://www.bigbinary.com/blog/new-ndigits-arguments-supported-for-float-modifiers-in-ruby-2-4)

- Author: Abhishek Jain
- Published: March 28, 2017
- Categories: Ruby 2.4, Ruby

Optional argument ndigits added to ceil, floor, truncate

### Ruby 2.4 adds Enumerable#uniq & Enumerable::Lazy#uniq

[Ruby 2.4 adds Enumerable#uniq & Enumerable::Lazy#uniq](https://www.bigbinary.com/blog/enumerable-uniq-and-enumerable-lazy-uniq-part-of-ruby-2-4)

- Author: Mohit Natoo
- Published: March 21, 2017
- Categories: Ruby 2.4, Ruby

In Ruby 2.4, uniq elements can be iterated upon for enumerable and lazy objects
without creating an array.

### Ruby 2.4 optimized lstrip & strip for ASCII strings

[Ruby 2.4 optimized lstrip & strip for ASCII strings](https://www.bigbinary.com/blog/ruby-2-4-has-optimized-lstrip-and-strip-methods)

- Author: Chirag Shah
- Published: March 14, 2017
- Categories: Ruby 2.4, Ruby

lstrip and rstrip methods have been optimized in ruby 2.4

### IO#readlines now accepts chomp flag as an argument

[IO#readlines now accepts chomp flag as an argument](https://www.bigbinary.com/blog/io-readlines-now-accepts-chomp-flag-as-an-argument)

- Author: Chirag Shah
- Published: March 7, 2017
- Categories: Ruby 2.4, Ruby

IO methods now have an optional chomp flag to remove newline return characters

### open-uri in Ruby 2.4 allows http to https redirection

[open-uri in Ruby 2.4 allows http to https redirection](https://www.bigbinary.com/blog/open-uri-in-ruby-2-4-allows-http-to-https-redirection)

- Author: Chirag Shah
- Published: March 2, 2017
- Categories: Ruby 2.4, Ruby

open-uri now allows http to https redirection in Ruby 2.4

### Ruby 2.4 now has Dir.empty? and File.empty? methods

[Ruby 2.4 now has Dir.empty? and File.empty? methods](https://www.bigbinary.com/blog/dir-emtpy-included-in-ruby-2-4)

- Author: Ratnadeep Deshmane
- Published: February 28, 2017
- Categories: Ruby 2.4, Ruby

No more platform specific code to check empty directories

### Ruby 2.4 Integer#digits extract digits in place-value

[Ruby 2.4 Integer#digits extract digits in place-value](https://www.bigbinary.com/blog/ruby-2-4-implements-integer-digits-for-extracting-digits-in-place-value-notation)

- Author: Rohit Kumar
- Published: February 23, 2017
- Categories: Ruby 2.4, Ruby

Ruby 2.4 implements Integer#digits for extracting digits in place-value notation
which is useful in calculating checksum digits.

### Ruby 2.4 adds compare by identity functionality

[Ruby 2.4 adds compare by identity functionality](https://www.bigbinary.com/blog/ruby-2-4-adds-compare-by-identity-functionality-for-sets)

- Author: Chirag Shah
- Published: December 29, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 adds compare_by_identity and compare_by_identity? methods for Set class
so that now we can compare the set elements by their identitiy rather than value

### Ruby 2.4 MatchData#values_at

[Ruby 2.4 MatchData#values_at](https://www.bigbinary.com/blog/ruby-2.4-adds-matchdata-values-at-for-extracting-named-and-positional-capture-groups)

- Author: Rohit Kumar
- Published: December 21, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 adds ability to extract named capture groups through values_at

### Ruby 2.4 adds infinite? and finite? methods to Numeric

[Ruby 2.4 adds infinite? and finite? methods to Numeric](https://www.bigbinary.com/blog/ruby-2-4-adds-infinite-method-to-numeric)

- Author: Abhishek Jain
- Published: December 19, 2016
- Categories: Ruby 2.4, Ruby

Fixnum#infinite?/Bignum#infinite? and Numeric#finite?/Bignum#finite? methods are
now consistent with Float#infinite?/BigDecimal#infinite?

### Ruby 2.4 adds Comparable#clamp method

[Ruby 2.4 adds Comparable#clamp method](https://www.bigbinary.com/blog/ruby-2-4-adds-comparable-clamp-method)

- Author: Abhishek Jain
- Published: December 13, 2016
- Categories: Ruby 2.4, Ruby

Comparable#clamp method is added to Ruby 2.4 to limit the object to a specific
range of values

### New liberal_parsing option for parsing bad CSV data

[New liberal_parsing option for parsing bad CSV data](https://www.bigbinary.com/blog/ruby-2-4-introduces-liberal_parsing-option-for-parsing-bad-csv-data)

- Author: Ershad Kunnakkadan
- Published: November 22, 2016
- Categories: Ruby 2.4, Ruby

CSV input with unescaped double quotes can now be parsed in Ruby 2.4 using
liberal_parsing option

### Enumerable#chunk not mandatory in Ruby 2.4

[Enumerable#chunk not mandatory in Ruby 2.4](https://www.bigbinary.com/blog/passing-block-with-enumerable-chunk-is-not-mandatory-in-ruby-2-4)

- Author: Abhishek Jain
- Published: November 21, 2016
- Categories: Ruby 2.4, Ruby

Enumerable#chunk does not require a block to be passed along with it in Ruby 2.4

### Ruby 2.4 unifies Fixnum and Bignum into Integer

[Ruby 2.4 unifies Fixnum and Bignum into Integer](https://www.bigbinary.com/blog/ruby-2-4-unifies-fixnum-and-bignum-into-integer)

- Author: Prathamesh Sonpatki
- Published: November 18, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 has unified Fixnum and Bignum into Integer class. It has also
deprecated usage of Fixnum and Bignum

### Ruby 2.4 implements Array#min and Array#max

[Ruby 2.4 implements Array#min and Array#max](https://www.bigbinary.com/blog/ruby-2-4-implements-array-min-and-max)

- Author: Rohit Kumar
- Published: November 17, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 implements Array#min and Array#max to find the minimum and maximum
value of the array

### Ruby 2.4 Extracting captured data from Regexp results

[Ruby 2.4 Extracting captured data from Regexp results](https://www.bigbinary.com/blog/ruby-2-4-adds-better-support-for-extracting-captured-data-from-regexp-match-results)

- Author: Rohit Kumar
- Published: November 10, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 adds support for extracting named captures and positional capture
groups from Regexp match results

### Ruby 2.4 Regexp#match? not polluting global variables

[Ruby 2.4 Regexp#match? not polluting global variables](https://www.bigbinary.com/blog/ruby-2-4-implements-regexp-match-without-polluting-global-variables)

- Author: Rohit Kumar
- Published: November 4, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 now allows matching a regex without updating global variables using
Regexp#match?. This is a faster option to match regexes when we don't care about
the match data

### Ruby 2.4 implements Enumerable#sum

[Ruby 2.4 implements Enumerable#sum](https://www.bigbinary.com/blog/ruby-2-4-introduces-enumerable-sum)

- Author: Mohit Natoo
- Published: November 2, 2016
- Categories: Ruby 2.4, Ruby

In Ruby 2.4, every object belonging to the \`Enumerable\` family can now call
\`sum\` method on it

### String#concat, Array#concat & String#prepend Ruby 2.4

[String#concat, Array#concat & String#prepend Ruby 2.4](https://www.bigbinary.com/blog/string-array-concat-and-string-prepend-take-multiple-arguments-in-ruby-2-4)

- Author: Abhishek Jain
- Published: October 28, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 now allows concat and prepend methods to take multiple arguments

### Hash#compact and Hash#compact! now part of Ruby 2.4

[Hash#compact and Hash#compact! now part of Ruby 2.4](https://www.bigbinary.com/blog/hash-compact-and-hash-compact-now-part-of-ruby-2-4)

- Author: Prathamesh Sonpatki
- Published: October 24, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 has added Hash#compact and Hash#compact! methods into core

## Links

- [Human page](https://www.bigbinary.com/blog/categories/ruby-2-4)
