1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* eval.c (rb_load): put rb_load_file() in a thread critical

section. [ruby-dev:20490]

* eval.c (compile): put rb_compile_string() in a thread critical
  section.

* variable.c (rb_const_get_0): should not warn if constant is not
  defined. (ruby-bugs-ja PR#509)

* bignum.c (rb_big2dbl): give a warning on overflow.
  (ruby-bugs-ja PR#510)

* util.c (ruby_strtod): change MDMAXEXPT from 511 to 308.

* pack.c (utf8_to_uv): long is sufficient.  LONG_LONG is not
  required.

* bignum.c (rb_big2str): support 32 bit (without `long long' type)
  machines. (ruby-bugs-ja PR#512)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-07-09 22:28:42 +00:00
parent d54accfe3f
commit 662e3cf1f9
11 changed files with 111 additions and 46 deletions

View file

@ -8,7 +8,7 @@ module REXML
if match
ENCODING_CLAIMS[ match ] = encoding_str
else
ENCODING_CLAIMS[ /^\s*<?xml\s*version=(['"]).*?\1\s*encoding=(["'])#{encoding_str}\2/ ] = encoding_str
ENCODING_CLAIMS[ /^\s*<?xml\s*version=(['"]).*?\1\s*encoding=(["'])#{encoding_str}\2/i ] = encoding_str
end
end
@ -20,9 +20,11 @@ module REXML
# ID ---> Encoding name
attr_reader :encoding
def encoding=( enc )
enc = UTF_8 unless enc
@encoding = enc.upcase
require "rexml/encodings/#@encoding" unless @encoding == UTF_8
enc = UTF_8 unless enc
rv = ENCODING_CLAIMS.find{|k,v| /#{v}/i =~ enc }
enc = rv[1] if rv
@encoding = enc
require "rexml/encodings/#@encoding" unless @encoding == UTF_8
end
def check_encoding str