From: Charles Oliver Nutter Date: 2007-09-01T01:52:24+09:00 Subject: Re: Pragmas in Ruby 1.9 David Flanagan wrote: > 2) If we need to introduce more general pragmas, I suggest overloading > Kernel.require. It should behave as usual if passed a string. But it > can handle pragmas if passed a hash. Some possible examples (using Ruby > 1.9 hash syntax): > > require encoding: "utf-8" > require unsafe: "fibers" > require thread-model: "concurrent" > require version: 1.9 > require decimal: true > require strict: true If this ever happens, I hope it's first accompanied by a standardized mechanism for extending (without replacing) require. Already rubygems and rails add their own require logic, and there's complications in both to make sure they work right. A standard way to extend require's behavior programmatically without physically replacing require would help guarantee future require extensions don't break old ones. - Charlie