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

* file.c (rb_file_join): recursive array has no meaning as path

name.  [ruby-core:23329]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-04-29 06:22:29 +00:00
parent f4f3096dd3
commit fea2ebff1a
3 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Wed Apr 29 15:22:26 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_join): recursive array has no meaning as path
name. [ruby-core:23329]
Tue Apr 28 19:09:45 2009 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* test/test_timeout.rb (TestTimeout#test_timeout): add a test.

7
file.c
View file

@ -3298,7 +3298,7 @@ static VALUE
file_inspect_join(VALUE ary, VALUE argp, int recur)
{
VALUE *arg = (VALUE *)argp;
if (recur) return rb_usascii_str_new2("[...]");
if (recur || ary == arg[0]) rb_raise(rb_eArgError, "recursive array");
return rb_file_join(arg[0], arg[1]);
}
@ -3332,7 +3332,10 @@ rb_file_join(VALUE ary, VALUE sep)
case T_STRING:
break;
case T_ARRAY:
{
if (ary == tmp) {
rb_raise(rb_eArgError, "recursive array");
}
else {
VALUE args[2];
args[0] = tmp;

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
#define RUBY_RELEASE_DATE "2009-04-28"
#define RUBY_RELEASE_DATE "2009-04-29"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk"
@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 4
#define RUBY_RELEASE_DAY 28
#define RUBY_RELEASE_DAY 29
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];