[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23239] Re: What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file?

From: Wolfgang Nádasi-Donner <ed.odanow@...>
Date: 2009-04-17 16:32:02 UTC
List: ruby-core #23239
Wolfgang N叩dasi-Donner schrieb:
> ...
> unless (require 'somelib.rb') == __ENCODING__
I think it may be better to introduce a new method Kernel#lib_encoding. 
It will be called with one parameter, a String containing the library 
name in the same format as for Kernel#load or Kernel#require.

This method will look for the named library and return an encoding, if 
it is an Ruby source (it has an extension of 'rb' or 'rbw') or nil, if 
it is somethong else (binary).

This method will not do the work of require/load, it will only take a 
look for the encoding.

Wolfgang N叩dasi-Donner

In This Thread