Create a gist now

Instantly share code, notes, and snippets.

Demonstrates an issue with selective core_ext and Time.=== on ActiveSupport 3.2.4-3.2.6
ACTIVESUPPORT_SOURCE = ARGV.pop
if ACTIVESUPPORT_SOURCE
if File.directory?(ACTIVESUPPORT_SOURCE)
puts "Using ActiveSupport from #{ACTIVESUPPORT_SOURCE}"
$LOAD_PATH << ACTIVESUPPORT_SOURCE
else ACTIVESUPPORT_SOURCE
puts "Using ActiveSupport gem version #{ACTIVESUPPORT_SOURCE}"
require 'rubygems'
gem 'activesupport', ACTIVESUPPORT_SOURCE
end
else
require 'rubygems' # use whatever's automatically loaded
end
require 'active_support/core_ext/string'
begin
Time === 'foo'
puts "No problem"
rescue => e
puts "Failed.\n#{e.class}: #{e}"
puts e.backtrace.join("\n ")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment