
Issue #21365 has been updated by ufuk (Ufuk Kayserilioglu). matheusrich (Matheus Richard) wrote in #note-3:
@Eregon I feel like that's more consistent with the rest of the language. I can't remember if any object as a `eval` method. But evaluating some code in a particular instance context makes me think of `instance_eval`.
I am not sure I understand. All objects have an `eval` method in the form of `Kernel#eval`: https://ruby-doc.org/3.4.1/Kernel.html#method-i-eval ---------------------------------------- Feature #21365: Add `Namespace#eval` https://bugs.ruby-lang.org/issues/21365#change-113400 * 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/