1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
Jeremy Evans c60aaed185
Fix Method#super_method for aliased methods
Previously, Method#super_method looked at the called_id to
determine the method id to use, but that isn't correct for
aliased methods, because the super target depends on the
original method id, not the called_id.

Additionally, aliases can reference methods defined in other
classes and modules, and super lookup needs to start in the
super of the defined class in such cases.

This adds tests for Method#super_method for both types of
aliases, one that uses VM_METHOD_TYPE_ALIAS and another that
does not.  Both check that the results for calling super
methods return the expected values.

To find the defined class for alias methods, add an rb_ prefix
to find_defined_class_by_owner in vm_insnhelper.c and make it
non-static, so that it can be called from method_super_method
in proc.c.

This bug was original discovered while researching [Bug #11189].

Fixes [Bug #17130]
2020-08-27 08:37:03 -07:00
..
-ext- vm_backtrace.c: let rb_profile_frames show cfunc frames 2020-07-28 13:18:08 +09:00
base64
benchmark
bigdecimal bidecimal: improve tests' independence (#3297) 2020-07-12 17:30:29 +09:00
cgi
coverage test/coverage/test_coverage.rb: Add a test for [Bug #16967] 2020-06-20 09:28:03 +09:00
csv [ruby/csv] CSV.generate_line: use the encoding of the first non ASCII field as the expected encoding 2020-07-20 02:32:55 +09:00
date [ruby/date] Fix cannot load complex into simple error when loading marshal dump (Fixes #20) 2020-06-20 18:35:03 +09:00
dbm
did_you_mean
digest
drb
dtrace
erb Fixup 3292f4d965 2020-08-21 20:40:26 +09:00
etc
excludes
fiber test/fiber/test_backtrace.rb: prevent a warning 2020-08-18 14:36:39 +09:00
fiddle Apply timeout-scale to test_nogvl_poll. 2020-07-30 18:28:41 +09:00
fileutils Fix Encoding::CompatibilityError in FileUtils::Entry_#join 2020-06-22 18:34:24 +09:00
gdbm
io [ruby/io-console] Bug 17128: In test_set_winsize_console, wrapped re-size in a begin-rescue-else. 2020-08-27 23:46:02 +09:00
irb Skip irb/test_history on Windows too 2020-08-20 13:24:55 +09:00
json test/json/json_fixtures_test.rb: Prevent an "out of range" warning 2020-07-03 11:47:09 +09:00
lib
logger
matrix
mkmf Make the mkmf methods private in the global [Bug #16896] 2020-07-13 18:44:22 +09:00
monitor Fix MonitorMixin when the super's initialize has kwargs 2020-07-17 16:37:18 -07:00
net [ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+ 2020-08-03 18:56:14 +09:00
nkf
objspace Fix ObjectSpace.trace_object_allocations_stop to not raise if the tracepoint were not initialized 2020-08-19 08:13:09 -07:00
open-uri Remove the deprecated override of Kernel#open in open-uri 2020-08-16 07:41:40 -07:00
openssl Test out fix for OpenSSL test flakiness 2020-08-11 12:01:51 -04:00
optparse
ostruct
pathname Prefer more descriptive assertion methods 2020-06-21 11:31:48 +09:00
psych [ruby/psych] Fix anchor lookup with symbolized names 2020-06-23 15:26:29 +09:00
racc
rdoc Use https instead of http 2020-07-28 19:51:54 +09:00
readline Suppress bell during the test 2020-07-18 19:33:11 +09:00
reline [ruby/reline] Keep original characters in inputrc 2020-08-18 19:08:40 +09:00
resolv
rinda Revert "Try increasing read timeout of rinda tests" 2020-06-26 22:43:59 -07:00
ripper Drop token info for endless method definition 2020-06-25 01:14:26 +09:00
ruby Fix Method#super_method for aliased methods 2020-08-27 08:37:03 -07:00
rubygems [rubygems/rubygems] Enable Layout/LeadingEmptyLines in rubygems 2020-07-31 21:07:19 +09:00
socket Make Socket.getaddrinfo interruptible (#2827) 2020-08-27 16:39:13 +09:00
stringio [stringio] fix stringio codepoint enumerator off by one error 2020-08-27 23:41:22 +09:00
strscan
syslog
uri
webrick Add tests of nested multibyte path and DirectoryIndex 2020-06-22 17:31:07 +09:00
win32ole
yaml
zlib
runner.rb
test_abbrev.rb
test_delegate.rb Add instance_methods to class generated by DelegateClass 2020-07-09 15:01:10 -07:00
test_extlibs.rb Removed sdbm entries from toolchanins 2020-06-19 08:26:47 +09:00
test_find.rb
test_forwardable.rb
test_ipaddr.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb
test_set.rb
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb