In Ruby, I expect a class that was not needed to raise an "uninitialized constant" error. For example, this applies to CSV .
However, Date behaves strangely: it is available, but does not seem to work until it is needed.
~: irb >> Date.new(2012,7,24) ArgumentError: wrong number of arguments(3 for 0) >> require 'date' => true >> Date.new(2012,7,24) =>
What explains this behavior?
date ruby
Nathan Long Jul 24. 2018-12-12T00: 00Z
source share