CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=0, private, must-revalidate
content-type: text/html; charset=utf-8
etag: W/"6f39802f9a1435f5aafd72b7d7da6328"
nel: {"report_to":"heroku-nel","response_headers":["Via"],"max_age":3600,"success_fraction":0.01,"failure_fraction":0.1}
referrer-policy: strict-origin-when-cross-origin
report-to: {"group":"heroku-nel","endpoints":[{"url":"https://nel.heroku.com/reports?s=nJ2ggrAn70aEPc4Xw8WZ51Rmre7uxr%2F2LZlQt11MPTM%3D\u0026sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d\u0026ts=1753392144"}],"max_age":3600}
reporting-endpoints: heroku-nel="https://nel.heroku.com/reports?s=nJ2ggrAn70aEPc4Xw8WZ51Rmre7uxr%2F2LZlQt11MPTM%3D&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&ts=1753392144"
server: Heroku
set-cookie: _redmine_session=ZDl4T3pOanNvMW41VDB5c1Q0aVJncGtDMGNDOGRaMEtYU2lkNFhGVjdlUnMvWFROZ0pLNjk3OFVHY3F2TXhRYXV4cmNWS2tDQ0txVERMZFd3K3FJRU1pYjRVaGliMFJydFFQblhjRGhQaDc0ZGN0RUVtMHlwUFRMd0VXbnRoUC9hSUdOQ09zZ2VnZ2RqaDNQbUluWXpIN2QvTXhSMXc0QWhJbGMvS1VmeEdoYnZaQVlTaUNWUktKdDlaeC9vS1M5LS0ySlozLzRzaXIrM1J2UzR1OCsvbjRnPT0%3D--3524a03c362ce564a75337219d3677d94cd3507d; path=/; secure; httponly; samesite=lax
strict-transport-security: max-age=63072000; includeSubDomains
vary: Accept
via: 2.0 heroku-router
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-request-id: b6cce643-1540-d8c8-1f36-ed92c4a6b333
x-runtime: 0.118998
x-xss-protection: 1; mode=block
content-length: 31623
date: Thu, 24 Jul 2025 21:22:24 GMT
Bug #21320: Namespaces leak with constant lookup - Ruby - Ruby Issue Tracking System
Project
General
Profile
Tags
Custom queries
Actions
Bug #21320
openNamespaces leak with constant lookup
Added by fxn (Xavier Noria) 3 months ago. Updated about 2 months ago.
Description
The following program
X = :top
class C
X = :super
end
class D < C
p X
end
prints :super
normally, and :top
if running under a namespace.
Updated by fxn (Xavier Noria) 3 months ago
This is probably a consequence of https://bugs.ruby-lang.org/issues/21318.
Updated by Eregon (Benoit Daloze) 3 months ago
Full repro:
# Copy the description program to program.rb, e.g. $ xsel -b > program.rb
$ RUBY_NAMESPACE=1 ruby -ve 'puts "in main"; require "./program"; puts "in namespace"; Namespace.new.require "./program"'
ruby 3.5.0dev (2025-05-10T07:50:29Z namespace-on-read-.. bd4f57f96b) +PRISM [x86_64-linux]
ruby: warning: Namespace is experimental, and the behavior may change in the future!
See doc/namespace.md for know issues, etc.
in main
:super
in namespace
:top
Actions
Like0
Like0Like0Like0
Powered by Redmine © 2006-2025 Jean-Philippe Lang
Loading...