mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (is_defined): core dumped during instance_eval for
special constants. * eval.c (rb_eval): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
998b538f77
commit
d57ab81877
7 changed files with 44 additions and 16 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Tue May 8 17:12:43 2001 K.Kosako <kosako@sofnec.co.jp>
|
||||||
|
|
||||||
|
* 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 <matz@ruby-lang.org>
|
Mon May 7 15:58:45 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (arg): "||=" should not warn for uninitialized instance
|
* parse.y (arg): "||=" should not warn for uninitialized instance
|
||||||
|
|
|
@ -124,7 +124,7 @@ realclean: distclean
|
||||||
test: miniruby$(EXEEXT)
|
test: miniruby$(EXEEXT)
|
||||||
@./miniruby$(EXEEXT) $(srcdir)/rubytest.rb
|
@./miniruby$(EXEEXT) $(srcdir)/rubytest.rb
|
||||||
|
|
||||||
rbconfig.rb: miniruby$(EXEEXT)
|
rbconfig.rb: miniruby$(EXEEXT) $(srcdir)/mkconfig.rb config.status
|
||||||
@@MINIRUBY@ $(srcdir)/mkconfig.rb rbconfig.rb
|
@@MINIRUBY@ $(srcdir)/mkconfig.rb rbconfig.rb
|
||||||
|
|
||||||
fake.rb: miniruby$(EXEEXT)
|
fake.rb: miniruby$(EXEEXT)
|
||||||
|
|
10
eval.c
10
eval.c
|
@ -1805,6 +1805,12 @@ is_defined(self, node, buf)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NODE_CVAR:
|
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 (!FL_TEST(ruby_cbase, FL_SINGLETON)) {
|
||||||
if (rb_cvar_defined(ruby_cbase, node->nd_vid)) {
|
if (rb_cvar_defined(ruby_cbase, node->nd_vid)) {
|
||||||
return "class variable";
|
return "class variable";
|
||||||
|
@ -2722,6 +2728,10 @@ rb_eval(self, n)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NODE_CVAR: /* normal method */
|
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)) {
|
if (!FL_TEST(ruby_cbase, FL_SINGLETON)) {
|
||||||
result = rb_cvar_get(ruby_cbase, node->nd_vid);
|
result = rb_cvar_get(ruby_cbase, node->nd_vid);
|
||||||
break;
|
break;
|
||||||
|
|
2
file.c
2
file.c
|
@ -2137,7 +2137,7 @@ rb_find_file(file)
|
||||||
if (is_macos_native_path(file)) {
|
if (is_macos_native_path(file)) {
|
||||||
FILE *f;
|
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);
|
rb_raise(rb_eSecurityError, "loading from unsafe file %s", file);
|
||||||
}
|
}
|
||||||
f= fopen(file, "r");
|
f= fopen(file, "r");
|
||||||
|
|
26
lib/mkmf.rb
26
lib/mkmf.rb
|
@ -12,12 +12,14 @@ SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"]
|
||||||
$config_cache = CONFIG["compile_dir"]+"/ext/config.cache"
|
$config_cache = CONFIG["compile_dir"]+"/ext/config.cache"
|
||||||
|
|
||||||
$srcdir = CONFIG["srcdir"]
|
$srcdir = CONFIG["srcdir"]
|
||||||
$libdir = CONFIG["libdir"]+"/ruby/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
|
$libdir = CONFIG["libdir"]
|
||||||
$archdir = $libdir+"/"+CONFIG["arch"]
|
$rubylibdir = CONFIG["rubylibdir"]
|
||||||
$sitelibdir = CONFIG["sitedir"]+"/"+CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
|
$archdir = CONFIG["archdir"]
|
||||||
$sitearchdir = $sitelibdir+"/"+CONFIG["arch"]
|
$sitedir = CONFIG["sitedir"]
|
||||||
|
$sitelibdir = CONFIG["sitelibdir"]
|
||||||
|
$sitearchdir = CONFIG["sitearchdir"]
|
||||||
|
|
||||||
if File.exist? $archdir + "/ruby.h"
|
if File.exist? Config::CONFIG["archdir"] + "/ruby.h"
|
||||||
$hdrdir = $archdir
|
$hdrdir = $archdir
|
||||||
elsif File.exist? $srcdir + "/ruby.h"
|
elsif File.exist? $srcdir + "/ruby.h"
|
||||||
$hdrdir = $srcdir
|
$hdrdir = $srcdir
|
||||||
|
@ -438,6 +440,8 @@ LIBPATH = #{libpath}
|
||||||
|
|
||||||
RUBY_INSTALL_NAME = #{CONFIG["RUBY_INSTALL_NAME"]}
|
RUBY_INSTALL_NAME = #{CONFIG["RUBY_INSTALL_NAME"]}
|
||||||
RUBY_SO_NAME = #{CONFIG["RUBY_SO_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?
|
if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty?
|
||||||
"\nDESTDIR = " + destdir
|
"\nDESTDIR = " + destdir
|
||||||
|
@ -446,11 +450,13 @@ else
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
prefix = $(DESTDIR)#{CONFIG["prefix"].sub(drive, '')}
|
prefix = $(DESTDIR)#{CONFIG["prefix"].sub(drive, '')}
|
||||||
exec_prefix = $(DESTDIR)#{CONFIG["exec_prefix"].sub(drive, '')}
|
exec_prefix = #{CONFIG["exec_prefix"].sub(drive, '')}
|
||||||
libdir = $(DESTDIR)#{$libdir.sub(drive, '')}#{target_prefix}
|
libdir = #{$libdir.sub(drive, '')}#{target_prefix}
|
||||||
archdir = $(DESTDIR)#{$archdir.sub(drive, '')}#{target_prefix}
|
rubylibdir = #{$rubylibdir.sub(drive, '')}#{target_prefix}
|
||||||
sitelibdir = $(DESTDIR)#{$sitelibdir.sub(drive, '')}#{target_prefix}
|
archdir = #{$archdir.sub(drive, '')}#{target_prefix}
|
||||||
sitearchdir = $(DESTDIR)#{$sitearchdir.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. ####
|
#### End of system configuration section. ####
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ File.foreach "config.status" do |$_|
|
||||||
next if $so_name and name =~ /^RUBY_SO_NAME$/
|
next if $so_name and name =~ /^RUBY_SO_NAME$/
|
||||||
v = " CONFIG[\"" + name + "\"] = " +
|
v = " CONFIG[\"" + name + "\"] = " +
|
||||||
val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?(\w+)\}?/) {
|
val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?(\w+)\}?/) {
|
||||||
"\#{CONFIG[\\\"#{$1}\\\"]}"
|
"$(#{$1})"
|
||||||
} + "\n"
|
} + "\n"
|
||||||
if fast[name]
|
if fast[name]
|
||||||
v_fast << v
|
v_fast << v
|
||||||
|
@ -89,6 +89,11 @@ end
|
||||||
|
|
||||||
print v_fast, v_others
|
print v_fast, v_others
|
||||||
print <<EOS
|
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}"
|
CONFIG["compile_dir"] = "#{Dir.pwd}"
|
||||||
MAKEFILE_CONFIG = {}
|
MAKEFILE_CONFIG = {}
|
||||||
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
||||||
|
@ -96,7 +101,7 @@ print <<EOS
|
||||||
val.gsub!(/\\$\\(([^()]+)\\)/) do |var|
|
val.gsub!(/\\$\\(([^()]+)\\)/) do |var|
|
||||||
key = $1
|
key = $1
|
||||||
if CONFIG.key? key
|
if CONFIG.key? key
|
||||||
"\#{Config::expand(CONFIG[\\\"\#{key}\\\"])}"
|
Config::expand(CONFIG[key])
|
||||||
else
|
else
|
||||||
var
|
var
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define RUBY_VERSION "1.6.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_VERSION_CODE 164
|
||||||
#define RUBY_RELEASE_CODE 20010507
|
#define RUBY_RELEASE_CODE 20010508
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue