diff --git a/ChangeLog b/ChangeLog index ea7d882ffd..697dcd262e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 9 13:03:34 2008 Yukihiro Matsumoto + + * string.c (rb_enc_cr_str_buf_cat): do not recalculate coderange + value if it's given from outside. + Wed Jan 9 08:42:01 2008 James Edward Gray II * enum.c: Updating the documentation of Enumrable#zip to reflect diff --git a/string.c b/string.c index d72d0352c7..57b5cd837b 100644 --- a/string.c +++ b/string.c @@ -1076,12 +1076,14 @@ rb_enc_cr_str_buf_cat(VALUE str, const char *ptr, long len, (ptr_a8 && str_cr != ENC_CODERANGE_7BIT)) { ptr_cr = ENC_CODERANGE_UNKNOWN; } - else { + else if (ptr_cr == ENC_CODERANGE_UNKNOWN) { ptr_cr = coderange_scan(ptr, len, rb_enc_from_index(ptr_encindex)); } } else { - ptr_cr = coderange_scan(ptr, len, rb_enc_from_index(ptr_encindex)); + if (ptr_cr == ENC_CODERANGE_UNKNOWN) { + ptr_cr = coderange_scan(ptr, len, rb_enc_from_index(ptr_encindex)); + } if (str_cr == ENC_CODERANGE_UNKNOWN) { if (str_a8 || ptr_cr != ENC_CODERANGE_7BIT) { str_cr = rb_enc_str_coderange(str); diff --git a/version.h b/version.h index 251ef29a5c..90b95c846d 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-01-08" +#define RUBY_RELEASE_DATE "2008-01-09" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080108 +#define RUBY_RELEASE_CODE 20080109 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 8 +#define RUBY_RELEASE_DAY 9 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];