summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-05 11:13:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-05 11:13:18 +0000
commit2073258a7d192e8d2bc853e10464a7a5fcac8f2d (patch)
tree9c7290dc3a782104d0b14f2feaffc6131744f4e2 /file.c
parentb1ae6e473e1c1865a1dcd5e4e5d242345c20cc77 (diff)
obj_init_copy
* object.c (rb_obj_init_copy): should check if trusted too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/file.c b/file.c
index 846f3147f9..6fc64a4739 100644
--- a/file.c
+++ b/file.c
@@ -4470,12 +4470,7 @@ rb_stat_init_copy(VALUE copy, VALUE orig)
{
struct stat *nst;
- if (copy == orig) return orig;
- rb_check_frozen(copy);
- /* need better argument type check */
- if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
- rb_raise(rb_eTypeError, "wrong argument class");
- }
+ if (!OBJ_INIT_COPY(copy, orig)) return copy;
if (DATA_PTR(copy)) {
xfree(DATA_PTR(copy));
DATA_PTR(copy) = 0;