From 3b37a6847edb2da6225d9785a4579e0cb603dab1 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 3 Oct 2001 07:19:19 +0000 Subject: * marshal.c (r_object): better allocation type check for TYPE_UCLASS. usage of allocation framework is disabled for now. * variable.c (rb_class_path): Module may have subclass. * string.c (rb_str_update): should maintain original negative offset. * string.c (rb_str_subpat_set): ditto * string.c (rb_str_aset): ditto. * re.c (rb_reg_nth_match): should check negative nth. * re.c (rb_reg_nth_defined): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/socket.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/socket') diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 9527cf3da..5b7d8ebef 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -177,8 +177,7 @@ sock_new(class, fd) int fd; { OpenFile *fp; - NEWOBJ(sock, struct RFile); - OBJSETUP(sock, class, T_FILE); + VALUE sock = rb_obj_alloc(class); MakeOpenFile(sock, fp); fp->f = rb_fdopen(fd, "r"); @@ -190,7 +189,7 @@ sock_new(class, fd) fp->mode = FMODE_READWRITE; rb_io_synchronized(fp); - return (VALUE)sock; + return sock; } static VALUE -- cgit