
Issue #21365 has been updated by fxn (Xavier Noria). I want to clarify that I explained that `instance_eval` works, and what it does, because `Namespace` is a `Module`. But that does not mean I believe that is good. Namespaces try to be one thing, but by being modules they carry other things that, in my view, are not quite coherent with the feature. It is another instance of my hunch that namespaces should be a new entity with new rules. In this particular case, I believe they should not respond to `instance_eval`, or `module_eval` or anything. Precisely, the proposed `eval` in this ticket is what makes sense to me: "run this code in your execution context". ---------------------------------------- Feature #21365: Add `Namespace#eval` https://bugs.ruby-lang.org/issues/21365#change-113450 * 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/