From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 348D319E003E for ; Thu, 24 Dec 2015 19:37:27 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id B575BB5D8B0 for ; Thu, 24 Dec 2015 20:09:50 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 4D7A518CC7E6 for ; Thu, 24 Dec 2015 20:09:51 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 8D0DA120531; Thu, 24 Dec 2015 20:09:49 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 9E243120525 for ; Thu, 24 Dec 2015 20:09:45 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=V0c9g4sL0IpE0wRWf+HtQrjFaiI=; b=qzF8piAOtVybcRXy80 QduBAc7Rg2ejQ85hV0+mtkpvkPNGt9bREscunWC77KCqznV+HXSHoZkDC5AVtlqu YYC4mhNPa36P/ECY6fM7ji59lecC6TeLorkpnCy5p/JOqEKKxwFxtpSt8YzMVOlc WgUeGVWchQcz0Z64QKtV+Frw8= Received: by filter0451p1mdw1.sendgrid.net with SMTP id filter0451p1mdw1.16265.567BD27146 2015-12-24 11:09:37.89081032 +0000 UTC Received: from herokuapp.com (ec2-54-211-131-4.compute-1.amazonaws.com [54.211.131.4]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id X-w1ifrOToOCElJDxzbFWw for ; Thu, 24 Dec 2015 11:09:38.145 +0000 (UTC) Date: Thu, 24 Dec 2015 11:09:38 +0000 From: eregontp@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 47069 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11740 X-Redmine-Issue-Author: Eregon X-Redmine-Issue-Assignee: ko1 X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS7Nfg1XD2Um8Wp1yo4IlanhH/08Xp0z8ArZ0G KoknnKfnx0xlLrgft0GPlSwqqot67iqgMzAuXFFKR0bPq6oIwxUdnbTzjw1mOmbLrkPLb3XL3Ye3ss 9aFuSQ96ZuwnecQZFGOCNZ4JHGCxu5ObiBhOu1STMfXv6dE4A63sb8jmLg== X-ML-Name: ruby-core X-Mail-Count: 72471 Subject: [ruby-core:72471] [Ruby trunk - Bug #11740] ObjectSpace.each_object exposes internal metaclasses X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11740 has been updated by Benoit Daloze. Looks good now, thanks! ---------------------------------------- Bug #11740: ObjectSpace.each_object exposes internal metaclasses https://bugs.ruby-lang.org/issues/11740#change-55758 * Author: Benoit Daloze * Status: Closed * Priority: Normal * Assignee: Koichi Sasada * ruby -v: ruby 2.3.0dev (2015-11-19 trunk 52672) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ObjectSpace.each_object exposes internal metaclasses and this might result in assumptions being violated since the metaclass structure is not well preserved. See the attached script for an example. The #bla method should always be defined on the metaclass of "klass". See https://bugs.ruby-lang.org/issues/11360#note-2 as well in which I warned against this problem ;) ---Files-------------------------------- objspace_expose_intern_meta.rb (413 Bytes) -- https://bugs.ruby-lang.org/