From bd6e77ae1f0253eb6f4bbd1807e8336f97ab9670 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 13 Jun 2002 03:55:44 +0000 Subject: * eval.c (svalue_to_avalue): v may be Qundef. This fix was suggested by Guy Decoux. * hash.c (rb_hash_s_create): use rb_hash_aset() instead of calling st_insert() directly, to dup&freeze string keys. * parse.y (yylex): proper error message for "@@0". * parse.y (yylex): paren to parse_string() must be zero for unparenthesized strings. * parse.y (str_extend): broken string when unterminated "#{". * enum.c (enum_sort_by): had a bug in 1 element enumeration. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index b75edd115..ec339cdab 100644 --- a/eval.c +++ b/eval.c @@ -2100,6 +2100,7 @@ svalue_to_avalue(v) VALUE v; { if (NIL_P(v)) return rb_ary_new2(0); + if (v == Qundef) return rb_ary_new2(0); if (TYPE(v) == T_ARRAY) { if (RARRAY(v)->len > 1) return v; return rb_ary_new3(1, v); -- cgit