From: nobu@... Date: 2018-06-19T08:32:07+00:00 Subject: [ruby-core:87514] [Ruby trunk Bug#14853] [BACKPORT] NameError#receiver at private constant returns a hidden object Issue #14853 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #14853: [BACKPORT] NameError#receiver at private constant returns a hidden object https://bugs.ruby-lang.org/issues/14853 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: r63695 * Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED ---------------------------------------- Fixed by r63696. ```ruby module M X = 1 private_constant :X end begin Module.new{include M}::X rescue NameError => e e.receiver.object_id # undefined method `object_id' for # (NoMethodError) end ``` This is an `ICLASS` object which must not appear in the ruby level. -- https://bugs.ruby-lang.org/ Unsubscribe: