Why isn’t current directory on my Ruby path? [duplicate]

In Ruby 1.9.2 the Powers that Be introduced an explicit change so that the working directory is no longer in the Ruby path. I thought it was the Apocalypse and a terrible thing, until I learned about require_relative. My apps tend to look like this: require ‘some_gem’ require ‘another_gem’ require_relative ‘lib/init’ And then lib/init.rb can … Read more

Why am I getting objects printed twice?

Every expression in Ruby returns a value; in irb, the value returned by the expression you’ve just executed is displayed after =>. The return value of Enumerable::each is the object that called each – in this case, the array [1,2,3,4]

tech