Include Case-Insensitive

Sort of. You can't expect to change ruby's constant system to be insensitive, but if you're OK with passing in strings, this might work:

class Module   def include_insensitive(*args)     args.each do |m|       include(const_get(Module.constants.grep(/^#{m}$/i).first))     end     self   end end

module M   def im_in_m     :hi   end end

class C   include_insensitive "m" end

C.new.im_in_m #=> :hi