summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-18 18:32:24 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-18 18:32:24 +0000
commit69ee4246e59593b8bea71d4ad8a151d5a3d52ae9 (patch)
treed1f0ac8fd11e9f8e7ee149635f9b74fec25391d0
parentdb881044bcaf3fce9fbce99f6af8d3cd353ef05e (diff)
* transcode.c (str_transcode0): fix: :xml option doesn't
work on str.encode([options]) form without default_internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--transcode.c3
-rw-r--r--version.h4
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 94c168e9b92..c4d9cb310de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jan 19 03:06:22 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * transcode.c (str_transcode0): fix: :xml option doesn't
+ work on str.encode([options]) form without default_internal.
+
Sun Jan 18 16:56:46 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (addrinfo_inspect_sockaddr): new
diff --git a/transcode.c b/transcode.c
index b01d4a1f086..1997e310c33 100644
--- a/transcode.c
+++ b/transcode.c
@@ -2457,7 +2457,8 @@ str_transcode0(int argc, VALUE *argv, VALUE *self, int ecflags, VALUE ecopts)
if (argc == 0) {
arg1 = rb_enc_default_internal();
if (NIL_P(arg1)) {
- return -1;
+ if (!ecflags) return -1;
+ arg1 = rb_obj_encoding(str);
}
ecflags |= ECONV_INVALID_REPLACE | ECONV_UNDEF_REPLACE;
}
diff --git a/version.h b/version.h
index 7174867488a..3823932d1b5 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
-#define RUBY_RELEASE_DATE "2009-01-18"
+#define RUBY_RELEASE_DATE "2009-01-19"
#define RUBY_PATCHLEVEL 5000
#define RUBY_BRANCH_NAME "trunk"
@@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 1
-#define RUBY_RELEASE_DAY 18
+#define RUBY_RELEASE_DAY 19
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];