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

* parse.y (rb_intern3): get rid of type-punning cast.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-03-17 19:41:00 +00:00
parent d47e0b989f
commit 83b8f94f4e
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Thu Mar 18 04:40:56 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (rb_intern3): get rid of type-punning cast.
Thu Mar 18 02:29:42 2010 Yusuke Endoh <mame@tsg.ne.jp>
* compile.c (iseq_build_body): add mark to jump table hash of case.

View file

@ -9496,6 +9496,7 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
ID id;
long last;
int mb;
st_data_t data;
struct RString fake_str;
fake_str.basic.flags = T_STRING|RSTRING_NOEMBED|FL_FREEZE;
fake_str.basic.klass = rb_cString;
@ -9509,8 +9510,8 @@ rb_intern3(const char *name, long len, rb_encoding *enc)
rb_raise(rb_eEncodingError, "invalid encoding symbol");
}
if (st_lookup(global_symbols.sym_id, str, (st_data_t *)&id))
return id;
if (st_lookup(global_symbols.sym_id, str, &data))
return (ID)data;
if (rb_cString && !rb_enc_asciicompat(enc)) {
id = ID_JUNK;