RubyGems does some magic with require
so you can load gems as though they were regular Ruby libraries. There’s some weirdness, though:
irb(main):001:0> require 'syntaxi'
=> false
irb(main):002:0> Syntaxi
=> Syntaxi
irb(main):003:0> Gem::RubyGemsVersion
=> "0.8.11"
require
returned false even though it actually loaded the gem. Of course, I didn’t realize it was loaded, naïvely believing require
knew what it was talking about. require_gem "syntaxi"
worked, why not this? After some mucking around in rubygems/custom_require.rb
, I decided it was at least partly working: Gem::GemPathSearcher#find
worked, as did Gem.activate
. The only thing left in the overridden require
was require__
, which is the original Kernel#require
.
That’s when I found an email on the rubygems-developers list explaining things. Everything’s fine, ignore that false, move along.
2 February 2006Yeah, it’s not very clever. I’ve already deleted a bunch of spam on this post, though. They really like it.
grant17 March 2006
kodak digital camera kodak digital camera canon camera canon camera olympus digital cameras olympus digital cameras digital camera battery charger digital camera battery charger digital camera prices digital camera prices nikon cameras nikon cameras kodak cameras kodak cameras sony cameras sony cameras best digital cameras best digital cameras olympus camera olympus camera camera reviews camera reviews video cameras video cameras cannon cameras cannon cameras
kodak cameras16 March 2006