[#122258] [Ruby Misc#21367] Remove link to ruby-doc.org from www.ruby-lang.org/en/documentation/ — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>
Issue #21367 has been reported by p8 (Petrik de Heus).
11 messages
2025/05/23
[ruby-core:122297] [Ruby Feature#21365] Add `Namespace#eval`
From:
"fxn (Xavier Noria) via ruby-core" <ruby-core@...>
Date:
2025-05-26 14:45:03 UTC
List:
ruby-core #122297
Issue #21365 has been updated by fxn (Xavier Noria). `instance_eval` modifies the nesting in the eval'ed code. Since namespaces are modules, `instance_eval` already works: ```ruby ns = Namespace.new ns.instance_eval "p Module.nesting" ``` That prints `[Namespace]`. I believe @tenderlove's wants a regular top-level execution context, where the nesting would be empty, in particular (mod https://bugs.ruby-lang.org/issues/21318). ---------------------------------------- Feature #21365: Add `Namespace#eval` https://bugs.ruby-lang.org/issues/21365#change-113441 * Author: tenderlovemaking (Aaron Patterson) * Status: Open ---------------------------------------- I would like a way to eval code on to a `Namespace` object. Could we add an eval method that _doesn't_ take a binding object? Writing a new file every time I want to test Namespaces is too cumbersome. Thanks! -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/