summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-06 09:24:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-06 09:24:59 +0000
commit9e77e91a13a8ae1d8bb4bba8974da390fbadedc0 (patch)
tree53dafc7d4f53ccc940badbc36862ad24cc1da929 /marshal.c
parent1fa5c630cda65f69d2ccffb614f45b5e9470b167 (diff)
* eval.c (ruby_cleanup): $SAFE is turned off in the finalization.
Each END proc should preserve its own $SAFE level. [ruby-core:01119] * marshal.c (marshal_load): remove unused variable "hash". [ruby-core:01120] * hash.c (env_str_new): freeze strings from ENV. [ruby-talk:72860] * array.c (rb_ary_first): optional argument to retrieve first n elements. * array.c (rb_ary_last): optional argument to retrieve last n elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/marshal.c b/marshal.c
index a0c4680a1e..4718f79209 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1284,7 +1284,6 @@ marshal_load(argc, argv)
int major, minor;
VALUE v;
struct load_arg arg;
- volatile VALUE hash; /* protect from GC */
rb_scan_args(argc, argv, "11", &port, &proc);
if (rb_respond_to(port, rb_intern("to_str"))) {
@@ -1319,7 +1318,7 @@ marshal_load(argc, argv)
}
arg.symbol = st_init_numtable();
- arg.data = hash = rb_hash_new();
+ arg.data = rb_hash_new();
if (NIL_P(proc)) arg.proc = 0;
else arg.proc = proc;
v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);