Skip to content

Commit

Permalink
merge revision(s) 16307:
Browse files Browse the repository at this point in the history
	* struct.c (rb_struct_s_def): to_str should be called only once.
	  [ruby-core:16647]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Jun 15, 2008
1 parent f462307 commit 79a77c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Sun Jun 15 22:44:25 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* struct.c (rb_struct_s_def): to_str should be called only once.
[ruby-core:16647]

Sun Jun 15 22:42:54 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
Expand Down
13 changes: 4 additions & 9 deletions struct.c
Expand Up @@ -307,19 +307,14 @@ rb_struct_s_def(argc, argv, klass)
ID id;

rb_scan_args(argc, argv, "1*", &name, &rest);
if (!NIL_P(name) && SYMBOL_P(name)) {
rb_ary_unshift(rest, name);
name = Qnil;
}
for (i=0; i<RARRAY(rest)->len; i++) {
id = rb_to_id(RARRAY(rest)->ptr[i]);
RARRAY(rest)->ptr[i] = ID2SYM(id);
}
if (!NIL_P(name)) {
VALUE tmp = rb_check_string_type(name);

if (NIL_P(tmp)) {
id = rb_to_id(name);
rb_ary_unshift(rest, ID2SYM(id));
name = Qnil;
}
}
st = make_struct(name, rest, klass);
if (rb_block_given_p()) {
rb_mod_module_eval(0, 0, st);
Expand Down
2 changes: 1 addition & 1 deletion version.h
Expand Up @@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080615
#define RUBY_PATCHLEVEL 203
#define RUBY_PATCHLEVEL 204

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
Expand Down

0 comments on commit 79a77c8

Please sign in to comment.