Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also flag frame names with "!" for ostruct
The ostruct library aliases all methods from Object/Kernel with a bang suffix ("!") to allow them to be callable even though the OpenStruct should support them as field names. Because we use record these names in a table of known frame-aware methods, we have typically warned when aliasing them. This rarely comes up, since aliasing usually is accompanied by wrapping, which breaks their behavior on all implementations, but this aliasing in ostruct is unusual and pervasive, leading to issues like jruby#8200. This patch assumes we're going to have issues with ostruct forever and eagerly adds the "!" names alongside the regular names for all method names that match /[a-z_]/, so taht existing methods and future methods will behavior properly and not warn when aliased. It adds a small amount to startup, since these method names must be added twice, but there are not many such names in the system. Fixes jruby#8200 Replaces jruby#7524
- Loading branch information