mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* struct.c (make_struct): preserve encoding of struct name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fff981ee6d
commit
79cdf2ffa2
3 changed files with 10 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 6 00:31:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* struct.c (make_struct): preserve encoding of struct name.
|
||||
|
||||
Wed Mar 05 22:49:20 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* string.c (is_utf8_lead_byte, count_utf8_lead_bytes_with_ulong):
|
||||
|
|
8
struct.c
8
struct.c
|
@ -181,14 +181,12 @@ make_struct(VALUE name, VALUE members, VALUE klass)
|
|||
rb_class_inherited(klass, nstr);
|
||||
}
|
||||
else {
|
||||
char *cname = StringValuePtr(name);
|
||||
|
||||
id = rb_intern(cname);
|
||||
id = SYM2ID(rb_str_intern(name));
|
||||
if (!rb_is_const_id(id)) {
|
||||
rb_name_error(id, "identifier %s needs to be constant", cname);
|
||||
rb_name_error(id, "identifier %s needs to be constant", StringValuePtr(name));
|
||||
}
|
||||
if (rb_const_defined_at(klass, id)) {
|
||||
rb_warn("redefining constant Struct::%s", cname);
|
||||
rb_warn("redefining constant Struct::%s", StringValuePtr(name));
|
||||
rb_mod_remove_const(klass, ID2SYM(id));
|
||||
}
|
||||
nstr = rb_define_class_under(klass, rb_id2name(id), klass);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2008-03-05"
|
||||
#define RUBY_RELEASE_DATE "2008-03-06"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20080305
|
||||
#define RUBY_RELEASE_CODE 20080306
|
||||
#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 3
|
||||
#define RUBY_RELEASE_DAY 5
|
||||
#define RUBY_RELEASE_DAY 6
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Add table
Reference in a new issue