summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-29 02:56:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-29 02:56:18 +0000
commitfec60bc7c4f851d0cf1c4670ef8f2d9c597b7598 (patch)
treefe375a324a27f43bd07a192814a516ee99557656 /ext
parent95785964f693e4af9b93513dce3960ebc5aab452 (diff)
* eval.c (avalue_to_svalue): use rb_check_array_type() again.
Clarify how "to_ary" and "to_a" work. [ruby-talk:68155] * eval.c (svalue_to_avalue): ditto. * eval.c (svalue_to_mrhs): ditto. * eval.c (rb_eval): unary splat to use to_a, but we need a hack to exclude Object#to_a until it's removed. * object.c (rb_Array): check obj.respond_to?("to_a"). Currently all object respond_to "to_a", but Object#to_a will be removed. * range.c (Init_Range): undefine to_ary. * re.c (Init_Regexp): ditto. * regex.c (re_compile_pattern): do not warn if "-" is at the top or last of character class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/handle.c5
-rw-r--r--ext/dl/sym.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index 17e8e5221d0..9ca2fa0a542 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -138,7 +138,7 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
const char *name, *stype;
const char *err;
- rb_secure(4);
+ rb_secure(2);
if (rb_scan_args(argc, argv, "11", &sym, &type) == 2) {
SafeStringValue(type);
stype = StringValuePtr(type);
@@ -159,9 +159,8 @@ rb_dlhandle_sym(int argc, VALUE argv[], VALUE self)
name = StringValuePtr(sym);
}
-
Data_Get_Struct(self, struct dl_handle, dlhandle);
- if (! dlhandle->open) {
+ if (!dlhandle->open) {
rb_raise(rb_eRuntimeError, "Closed handle.");
}
handle = dlhandle->ptr;
diff --git a/ext/dl/sym.c b/ext/dl/sym.c
index 2034c0a7ff2..4a2d736465e 100644
--- a/ext/dl/sym.c
+++ b/ext/dl/sym.c
@@ -330,7 +330,7 @@ rb_dlsym_call(int argc, VALUE argv[], VALUE self)
long ftype;
void *func;
- rb_secure(2);
+ rb_secure_update(self);
Data_Get_Struct(self, struct sym_data, sym);
DEBUG_CODE({
printf("rb_dlsym_call(): type = '%s', func = 0x%x\n", sym->type, sym->func);