diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | eval.c | 10 | ||||
-rw-r--r-- | file.c | 2 | ||||
-rw-r--r-- | lib/mkmf.rb | 28 | ||||
-rw-r--r-- | mkconfig.rb | 9 | ||||
-rw-r--r-- | version.h | 4 |
7 files changed, 45 insertions, 17 deletions
@@ -1,3 +1,10 @@ +Tue May 8 17:12:43 2001 K.Kosako <[email protected]> + + * eval.c (is_defined): core dumped during instance_eval for + special constants. + + * eval.c (rb_eval): ditto. + Mon May 7 15:58:45 2001 Yukihiro Matsumoto <[email protected]> * parse.y (arg): "||=" should not warn for uninitialized instance diff --git a/Makefile.in b/Makefile.in index 8e366a29ae..37f644d786 100644 --- a/Makefile.in +++ b/Makefile.in @@ -124,7 +124,7 @@ realclean: distclean test: miniruby$(EXEEXT) @./miniruby$(EXEEXT) $(srcdir)/rubytest.rb -rbconfig.rb: miniruby$(EXEEXT) +rbconfig.rb: miniruby$(EXEEXT) $(srcdir)/mkconfig.rb config.status @@MINIRUBY@ $(srcdir)/mkconfig.rb rbconfig.rb fake.rb: miniruby$(EXEEXT) @@ -1805,6 +1805,12 @@ is_defined(self, node, buf) break; case NODE_CVAR: + if (NIL_P(ruby_cbase)) { + if (rb_cvar_defined(CLASS_OF(self), node->nd_vid)) { + return "class variable"; + } + break; + } if (!FL_TEST(ruby_cbase, FL_SINGLETON)) { if (rb_cvar_defined(ruby_cbase, node->nd_vid)) { return "class variable"; @@ -2722,6 +2728,10 @@ rb_eval(self, n) break; case NODE_CVAR: /* normal method */ + if (NIL_P(ruby_cbase)) { + result = rb_cvar_get(CLASS_OF(self), node->nd_vid); + break; + } if (!FL_TEST(ruby_cbase, FL_SINGLETON)) { result = rb_cvar_get(ruby_cbase, node->nd_vid); break; @@ -2137,7 +2137,7 @@ rb_find_file(file) if (is_macos_native_path(file)) { FILE *f; - if (safe_level >= 2 && !rb_path_check(file)) { + if (rb_safe_level() >= 2 && !rb_path_check(file)) { rb_raise(rb_eSecurityError, "loading from unsafe file %s", file); } f= fopen(file, "r"); diff --git a/lib/mkmf.rb b/lib/mkmf.rb index d1f830aca6..2208d6733f 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -12,12 +12,14 @@ SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"] $config_cache = CONFIG["compile_dir"]+"/ext/config.cache" $srcdir = CONFIG["srcdir"] -$libdir = CONFIG["libdir"]+"/ruby/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"] -$archdir = $libdir+"/"+CONFIG["arch"] -$sitelibdir = CONFIG["sitedir"]+"/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"] -$sitearchdir = $sitelibdir+"/"+CONFIG["arch"] - -if File.exist? $archdir + "/ruby.h" +$libdir = CONFIG["libdir"] +$rubylibdir = CONFIG["rubylibdir"] +$archdir = CONFIG["archdir"] +$sitedir = CONFIG["sitedir"] +$sitelibdir = CONFIG["sitelibdir"] +$sitearchdir = CONFIG["sitearchdir"] + +if File.exist? Config::CONFIG["archdir"] + "/ruby.h" $hdrdir = $archdir elsif File.exist? $srcdir + "/ruby.h" $hdrdir = $srcdir @@ -438,6 +440,8 @@ LIBPATH = #{libpath} RUBY_INSTALL_NAME = #{CONFIG["RUBY_INSTALL_NAME"]} RUBY_SO_NAME = #{CONFIG["RUBY_SO_NAME"]} +arch = #{CONFIG["arch"]} +ruby_version = #{Config::CONFIG["ruby_version"]} #{ if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty? "\nDESTDIR = " + destdir @@ -446,11 +450,13 @@ else end } prefix = $(DESTDIR)#{CONFIG["prefix"].sub(drive, '')} -exec_prefix = $(DESTDIR)#{CONFIG["exec_prefix"].sub(drive, '')} -libdir = $(DESTDIR)#{$libdir.sub(drive, '')}#{target_prefix} -archdir = $(DESTDIR)#{$archdir.sub(drive, '')}#{target_prefix} -sitelibdir = $(DESTDIR)#{$sitelibdir.sub(drive, '')}#{target_prefix} -sitearchdir = $(DESTDIR)#{$sitearchdir.sub(drive, '')}#{target_prefix} +exec_prefix = #{CONFIG["exec_prefix"].sub(drive, '')} +libdir = #{$libdir.sub(drive, '')}#{target_prefix} +rubylibdir = #{$rubylibdir.sub(drive, '')}#{target_prefix} +archdir = #{$archdir.sub(drive, '')}#{target_prefix} +sitedir = #{$sitedir.sub(drive, '')}#{target_prefix} +sitelibdir = #{$sitelibdir.sub(drive, '')}#{target_prefix} +sitearchdir = #{$sitearchdir.sub(drive, '')}#{target_prefix} #### End of system configuration section. #### diff --git a/mkconfig.rb b/mkconfig.rb index c190861b5e..950cb5f6c3 100644 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -40,7 +40,7 @@ File.foreach "config.status" do |$_| next if $so_name and name =~ /^RUBY_SO_NAME$/ v = " CONFIG[\"" + name + "\"] = " + val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?(\w+)\}?/) { - "\#{CONFIG[\\\"#{$1}\\\"]}" + "$(#{$1})" } + "\n" if fast[name] v_fast << v @@ -89,6 +89,11 @@ end print v_fast, v_others print <<EOS + CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)" + CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)" + CONFIG["archdir"] = "$(rubylibdir)/$(arch)" + CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" + CONFIG["sitearchdir"] = "$(sitelibdir)/$(arch)" CONFIG["compile_dir"] = "#{Dir.pwd}" MAKEFILE_CONFIG = {} CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup} @@ -96,7 +101,7 @@ print <<EOS val.gsub!(/\\$\\(([^()]+)\\)/) do |var| key = $1 if CONFIG.key? key - "\#{Config::expand(CONFIG[\\\"\#{key}\\\"])}" + Config::expand(CONFIG[key]) else var end @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.6.4" -#define RUBY_RELEASE_DATE "2001-05-07" +#define RUBY_RELEASE_DATE "2001-05-08" #define RUBY_VERSION_CODE 164 -#define RUBY_RELEASE_CODE 20010507 +#define RUBY_RELEASE_CODE 20010508 |