ruby-changes:15396
From: tenderlove <ko1@a...>
Date: Sun, 11 Apr 2010 08:50:59 +0900 (JST)
Subject: [ruby-changes:15396] Ruby:r27289 (trunk): * ext/psych/parser.c: Fixing a segv in test-all. Thanks Yusuke!
tenderlove 2010-04-11 08:50:50 +0900 (Sun, 11 Apr 2010) New Revision: 27289 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27289 Log: * ext/psych/parser.c: Fixing a segv in test-all. Thanks Yusuke! Modified files: trunk/ext/psych/parser.c Index: ext/psych/parser.c =================================================================== --- ext/psych/parser.c (revision 27288) +++ ext/psych/parser.c (revision 27289) @@ -57,10 +57,10 @@ if(rb_respond_to(yaml, id_read)) { yaml_parser_set_input(&parser, io_reader, (void *)yaml); } else { - Check_Type(yaml, T_STRING); + StringValue(yaml); yaml_parser_set_input_string( &parser, - (const unsigned char *)StringValuePtr(yaml), + (const unsigned char *)RSTRING_PTR(yaml), (size_t)RSTRING_LEN(yaml) ); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/