summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-13 03:55:44 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-13 03:55:44 +0000
commitb3ecbfaa01e7c75bfea9c895bb7476c58e998131 (patch)
tree1b23f1e6c0b8291136e64917835310a6cbde1fbc /eval.c
parenta2020f907a942f09c651b1006151c932cdf7e77e (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index b75edd115e..ec339cdab1 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);