diff options
author | Marc-André Lafortune <github@marc-andre.ca> | 2021-12-06 23:05:53 -0500 |
---|---|---|
committer | Marc-André Lafortune <github@marc-andre.ca> | 2021-12-06 23:21:07 -0500 |
commit | 95d9bcf2b2921baee5dfacdf9dfd606a4c5167a8 (patch) | |
tree | 18ea00a86476c9ebf1590e76863a0960b3454e20 /test/ostruct/test_ostruct.rb | |
parent | dfd9728c87640d9699b1e7c63a6fefb6b2797fbc (diff) |
[ruby/ostruct] Alias less methods
Skips methods that do not end with letter (in particular `!~` and `=~`)
For JRuby, also skip `instance_exec`, `instance_eval` and `eval`
Diffstat (limited to 'test/ostruct/test_ostruct.rb')
-rw-r--r-- | test/ostruct/test_ostruct.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb index 4ec4d43084..6487cc831c 100644 --- a/test/ostruct/test_ostruct.rb +++ b/test/ostruct/test_ostruct.rb @@ -280,6 +280,7 @@ class TC_OpenStruct < Test::Unit::TestCase os = OpenStruct.new(method: :foo, hash: 42) assert_equal(os.object_id, os.method!(:object_id).call) assert_not_equal(42, os.hash!) + refute os.methods.include?(:"!~!") end def test_override_subclass |