* variable.c (rb_f_global_variables): variable names should not

duplicate.  [ruby-dev:32344]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-11-26 01:17:17 +00:00
parent b2e60b2ce7
commit f7bd951bea
3 changed files with 12 additions and 9 deletions

View File

@ -50,6 +50,11 @@ Fri Nov 23 15:27:43 2007 Tanaka Akira <akr@fsij.org>
[ruby-dev:32113] [ruby-dev:32113]
Fri Nov 23 15:16:48 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* variable.c (rb_f_global_variables): variable names should not
duplicate. [ruby-dev:32344]
Fri Nov 23 13:34:08 2007 Tanaka Akira <akr@fsij.org> Fri Nov 23 13:34:08 2007 Tanaka Akira <akr@fsij.org>
* struct.c (rb_struct_define_without_accessor): new function. * struct.c (rb_struct_define_without_accessor): new function.

View File

@ -716,14 +716,12 @@ rb_f_global_variables(void)
{ {
VALUE ary = rb_ary_new(); VALUE ary = rb_ary_new();
char buf[4]; char buf[4];
const char *s = "&`'+123456789"; const char *s = "123456789";
st_foreach_safe(rb_global_tbl, gvar_i, ary); st_foreach_safe(rb_global_tbl, gvar_i, ary);
if (!NIL_P(rb_backref_get())) { while (*s) {
while (*s) { sprintf(buf, "$%c", *s++);
sprintf(buf, "$%c", *s++); rb_ary_push(ary, ID2SYM(rb_intern(buf)));
rb_ary_push(ary, rb_str_new2(buf));
}
} }
return ary; return ary;
} }

View File

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0" #define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-11-23" #define RUBY_RELEASE_DATE "2007-11-26"
#define RUBY_VERSION_CODE 190 #define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20071123 #define RUBY_RELEASE_CODE 20071126
#define RUBY_PATCHLEVEL 0 #define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0 #define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 11 #define RUBY_RELEASE_MONTH 11
#define RUBY_RELEASE_DAY 23 #define RUBY_RELEASE_DAY 26
#ifdef RUBY_EXTERN #ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[]; RUBY_EXTERN const char ruby_version[];