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

* ruby.c (load_file_internal): set default source encoding as

UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]

* parse.y (parser_initialize): set default parser encoding as
  UTF-8 instead of US-ASCII.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-11-06 00:49:57 +00:00
parent c9fc6b08ae
commit 58ef0f06c6
24 changed files with 32 additions and 6 deletions

View file

@ -1,3 +1,11 @@
Tue Nov 6 09:37:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
* ruby.c (load_file_internal): set default source encoding as
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]
* parse.y (parser_initialize): set default parser encoding as
UTF-8 instead of US-ASCII.
Tue Nov 6 05:48:06 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* test/ruby/test_require.rb

2
NEWS
View file

@ -248,6 +248,8 @@ with all sufficient information, see the ChangeLog file.
* Added %i and %I for symbol list creation (similar to %w and %W).
* Default source encoding is changed to UTF-8. (was US-ASCII)
=== Compatibility issues (excluding feature bug fixes)
* Signal.trap

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
module REXML
module Encoding
# ID ---> Encoding name

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'rexml/encoding'
module REXML

View file

@ -10580,7 +10580,7 @@ parser_initialize(struct parser_params *parser)
#ifdef YYMALLOC
parser->heap = NULL;
#endif
parser->enc = rb_usascii_encoding();
parser->enc = rb_utf8_encoding();
}
#ifdef RIPPER

2
ruby.c
View file

@ -1692,7 +1692,7 @@ load_file_internal(VALUE arg)
enc = rb_locale_encoding();
}
else {
enc = rb_usascii_encoding();
enc = rb_utf8_encoding();
}
if (NIL_P(f)) {
f = rb_str_new(0, 0);

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require "test/unit"
require "base64"

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require_relative 'test_base'
require 'dl/import'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require 'logger'
require 'tempfile'

View file

@ -1,5 +1,4 @@
# $Id$
# coding: US-ASCII
require 'test/unit'
require 'net/http'
require 'stringio'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'net/http'
require 'test/unit'
require 'stringio'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require_relative 'utils'
if defined?(OpenSSL)

View file

@ -1,4 +1,4 @@
# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*-
# -*- coding: us-ascii; mode: ruby; ruby-indent-level: 4; tab-width: 4 -*-
# vim:sw=4:ts=4
# $Id$
#

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'psych/helper'
module Psych

View file

@ -17,7 +17,7 @@ class TestRipper::Ripper < Test::Unit::TestCase
end
def test_encoding
assert_equal Encoding::US_ASCII, @ripper.encoding
assert_equal Encoding::UTF_8, @ripper.encoding
end
def test_end_seen_eh

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require_relative 'envutil'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require 'tmpdir'
require "fcntl"

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require 'tmpdir'
require 'timeout'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require_relative 'envutil'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
class TestPack < Test::Unit::TestCase

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require 'stringio'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require 'envutil'

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require 'test/unit'
require 'tempfile'
begin

View file

@ -1,3 +1,4 @@
# coding: US-ASCII
require_relative "utils"
require "webrick"
require "test/unit"