public
Created

Demonstrates an issue with selective core_ext and Time.=== on ActiveSupport 3.2.4-3.2.6

  • Download Gist
time_ext.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.