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

* encoding.c (enc_new): don't free rb_encoding to avoid SEGV by

`miniruby -e exit' on x86_64 GNU/Linux.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-19 11:43:24 +00:00
parent 3449e0710c
commit bbeefa53ca
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Jan 19 20:41:29 2008 Tanaka Akira <akr@fsij.org>
* encoding.c (enc_new): don't free rb_encoding to avoid SEGV by
`miniruby -e exit' on x86_64 GNU/Linux.
Sat Jan 19 18:40:19 2008 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb (once): use an instance variable which points a hash
@ -2679,7 +2684,7 @@ Sun Dec 23 10:23:23 2007 Martin Duerst <duerst@it.aoyama.ac.jp>
Sun Dec 23 09:07:02 2007 Tanaka Akira <akr@fsij.org>
* include/ruby/encoding.h, encoding.c, re.c, io.c, parse.y, numeric.c,
ruby.c, transcode.c, ext/nkf/nkf.c: rename rb_ascii_encoding. to
ruby.c, transcode.c, ext/nkf/nkf.c: rename rb_ascii_encoding to
rb_ascii8bit_encoding. rb_ascii_encoding is ambiguous with
ASCII-8BIT and US-ASCII.

View file

@ -73,7 +73,7 @@ enc_mark(void *ptr)
static VALUE
enc_new(rb_encoding *encoding)
{
VALUE enc = Data_Wrap_Struct(rb_cEncoding, enc_mark, -1, encoding);
VALUE enc = Data_Wrap_Struct(rb_cEncoding, enc_mark, 0, encoding);
encoding->auxiliary_data = (void *)enc;
return enc;
}