1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
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
..
enc support multi-run for test/ruby/enc/test_regex_casefold.rb 2020-01-29 13:08:40 +09:00
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb
sentence.rb Fixed misspellings 2019-12-20 09:32:42 +09:00
test_alias.rb Merge pull request #2721 from jeremyevans/method-inspect-chain-alias-11188 2020-03-22 09:30:20 -07:00
test_argf.rb Fix corruption in ARGF.inplace 2020-08-12 17:54:09 +09:00
test_arithmetic_sequence.rb
test_arity.rb
test_array.rb Fix Array#flatten for recursive array when given positive depth [Bug #17092] 2020-07-30 09:53:42 -04:00
test_assignment.rb Fixed misspellings 2019-12-20 09:32:42 +09:00
test_ast.rb Added NODE_SPECIAL_EXCESSIVE_COMMA info to ARGS of RubyVM::AbstractSyntaxTree. 2020-07-08 17:43:04 +09:00
test_autoload.rb fix for multi-run test. 2020-05-15 14:54:03 +09:00
test_backtrace.rb
test_basicinstructions.rb support multi-run for ruby/test_basicinstructions.rb 2020-01-28 15:23:51 +09:00
test_beginendblock.rb
test_bignum.rb
test_call.rb Dup splat array in certain cases where there is a block argument 2020-06-18 08:19:33 -07:00
test_case.rb
test_class.rb Make yield in singleton class definitions in methods a SyntaxError 2020-02-11 12:44:23 -08:00
test_clone.rb
test_comparable.rb
test_complex.rb
test_complex2.rb
test_complexrational.rb
test_condition.rb
test_const.rb refactoring: use Proc and Constant. 2020-01-29 00:54:05 +09:00
test_continuation.rb
test_default_gems.rb Skip test_validate_gemspec when tarball and git installed too 2019-11-23 01:57:19 +09:00
test_defined.rb Properly resolve refinements in defined? on private call [Bug #16932] 2020-06-04 02:12:57 +09:00
test_dir.rb Assertions for basic use of encoding: option 2020-04-11 12:59:45 +09:00
test_dir_m17n.rb
test_econv.rb Encode ' as ' when using encode(xml: :attr) 2020-07-10 09:34:08 -07:00
test_encoding.rb Get rid of warnings/exceptions at cleanup 2020-02-13 12:46:48 +09:00
test_enum.rb Respect visibility in non-array Enumerable#inject [Bug #13592] 2020-07-24 21:08:50 +09:00
test_enumerator.rb Make Enumerator::Chain#each treat lambdas as lambda 2019-12-03 23:18:28 +02:00
test_env.rb Add Hash#except ENV#except [Feature #15822] 2020-06-18 22:47:32 +09:00
test_eval.rb support multi-run for test/ruby/test_eval.rb 2020-01-28 15:23:51 +09:00
test_exception.rb Fixed infinite loop at error in printing cause [Bug #17033] 2020-07-15 21:39:20 +09:00
test_fiber.rb Thread scheduler for light weight concurrency. 2020-05-14 22:10:55 +12:00
test_file.rb Use a temporary file for chown test 2019-12-18 13:35:58 +09:00
test_file_exhaustive.rb Revert "Should return "." for File.extname("file.") also on Windows" 2019-12-23 11:54:25 +09:00
test_fixnum.rb
test_flip.rb
test_float.rb numeric.c: optimize float ** 2 case by fastpath 2020-05-12 02:14:27 +09:00
test_fnmatch.rb
test_frozen_error.rb Split test_frozen_error.rb 2019-12-31 19:43:36 +09:00
test_gc.rb prevent memory allocation for GC tests 2020-06-12 17:32:49 +09:00
test_gc_compact.rb Moved GC.verify_compaction_references to gc.rb 2020-01-27 10:52:37 +09:00
test_hash.rb Add Hash#except ENV#except [Feature #15822] 2020-06-18 22:47:32 +09:00
test_ifunless.rb
test_inlinecache.rb fix bug on method cache invalidation. 2020-03-11 02:50:44 +09:00
test_integer.rb
test_integer_comb.rb
test_io.rb [stringio] fix stringio codepoint enumerator off by one error 2020-08-27 23:41:22 +09:00
test_io_m17n.rb Encode ' as ' when using encode(xml: :attr) 2020-07-10 09:34:08 -07:00
test_iseq.rb Fix a random test failure by TracePoint 2020-06-24 00:29:53 -07:00
test_iterator.rb Warn when passing a non-literal block to Kernel#lambda 2020-06-11 07:30:48 -07:00
test_jit.rb Enable s390x invokebuiltin JIT test again 2020-08-11 06:49:04 -07:00
test_jit_debug.rb Skip only .dSYM cleanup on macOS 2020-05-03 00:34:03 -07:00
test_key_error.rb
test_keyword.rb Reduce allocations for keyword argument hashes 2020-03-17 12:09:43 -07:00
test_lambda.rb Warn when passing a non-literal block to Kernel#lambda 2020-06-11 07:30:48 -07:00
test_lazy_enumerator.rb Improved Enumerable::Lazy#flat_map 2020-07-23 16:57:26 +09:00
test_literal.rb
test_m17n.rb test/json/test_helper.rb: Do not add a relative path to $LOAD_PATH 2020-03-24 10:45:52 +09:00
test_m17n_comb.rb reroute musl unistd.h weirdness 2020-01-24 10:49:35 +09:00
test_marshal.rb support multi-run for test/ruby/test_marshal.rb 2020-01-28 15:23:51 +09:00
test_math.rb
test_metaclass.rb
test_method.rb Fix Method#super_method for aliased methods 2020-08-27 08:37:03 -07:00
test_mixed_unicode_escapes.rb
test_module.rb Make Module#prepend affect the iclasses of the module 2020-06-18 08:18:31 -07:00
test_name_error.rb Test for [Feature #16832] 2020-05-26 15:09:07 +09:00
test_nomethod_error.rb Make test for no method error more reliable 2020-06-06 13:48:24 -04:00
test_not.rb
test_numeric.rb Update tests for full keyword argument separation 2020-01-02 18:40:45 -08:00
test_object.rb Support obj.clone(freeze: true) for freezing clone 2020-03-22 09:30:07 -07:00
test_objectspace.rb Check argument to ObjectSpace._id2ref 2020-06-16 18:25:35 +09:00
test_optimization.rb disable GC on a test 2020-06-09 15:52:25 +09:00
test_pack.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_parse.rb Fixed error messages at non-ascii %string terminator 2020-08-26 21:36:22 +09:00
test_path.rb Revert "Should return "." for File.extname("file.") also on Windows" 2019-12-23 11:54:25 +09:00
test_pattern_matching.rb Suppress "assigned but unused variable" warnings 2020-06-27 13:52:23 +09:00
test_pipe.rb
test_primitive.rb support multi-run for test/ruby/test_primitive.rb 2020-01-28 15:23:51 +09:00
test_proc.rb Implement Proc#== and #eql? 2020-06-19 12:58:25 -07:00
test_process.rb test/ruby/test_process.rb: GID.from_name may raise Errno:ESRCH 2020-05-30 00:16:44 +09:00
test_rand.rb Removed useless implementation tests 2020-05-17 19:03:05 +09:00
test_range.rb Special case Range#max for integer beginning and Float::Infinity end 2020-07-19 10:25:55 -04:00
test_rational.rb
test_rational2.rb
test_readpartial.rb
test_refinement.rb Prevent SystemStackError when calling super in module with activated refinement 2020-07-27 08:18:11 -07:00
test_regexp.rb Regexp in MatchData can be nil 2020-01-16 11:32:11 +09:00
test_require.rb Skip TestRequire#test_loading_fifo_fd_leak on Android 2020-04-19 23:14:31 +09:00
test_require_lib.rb Detect started threads when require only 2019-12-06 00:12:58 +09:00
test_rubyoptions.rb Drop token info for endless method definition 2020-06-25 01:14:26 +09:00
test_rubyvm.rb
test_rubyvm_mjit.rb
test_settracefunc.rb [Feature #16513] TracePoint#inspect returns "... file:line" (#3391) 2020-08-06 11:56:24 +09:00
test_signal.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_sleep.rb
test_sprintf.rb
test_sprintf_comb.rb
test_stack.rb Removed trailing spaces [ci skip] 2020-05-14 19:57:39 +09:00
test_string.rb register_fstring: avoid duping the passed string when possible 2020-08-19 08:08:56 -07:00
test_stringchar.rb
test_struct.rb Classes made from Struct should have default new singleton method. 2020-05-08 04:18:45 -04:00
test_super.rb This test is not testing attr_writer 2020-04-14 23:59:29 -07:00
test_symbol.rb Suffixed memory leak tests as "memory_leak" 2020-05-07 02:53:39 +09:00
test_syntax.rb Switch reserved for numbered parameter warning to SyntaxError 2020-07-22 08:34:51 -07:00
test_system.rb
test_thread.rb Disable GC until VM objects get initialized [Bug #16616] 2020-02-09 17:15:55 +09:00
test_thread_cv.rb
test_thread_queue.rb Apply timeout-scale to test_thr_kill. 2020-08-06 08:36:53 +09:00
test_threadgroup.rb
test_time.rb Fix Time#ceil when result should be the same as the receiver 2020-07-28 12:53:37 -07:00
test_time_tz.rb Fix Time#to_a behavior with timezone [Bug #17046] 2020-07-24 20:17:31 +09:00
test_trace.rb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_transcode.rb Fixed symbol misused as ID 2020-02-24 15:37:52 +09:00
test_undef.rb
test_unicode_escape.rb
test_variable.rb Raise RuntimeError for class variable overtaken in nonverbose mode 2020-06-18 08:21:29 -07:00
test_vm_dump.rb cause SEGV for the test. 2020-05-26 04:49:11 +09:00
test_weakmap.rb
test_whileuntil.rb
test_yield.rb
ut_eof.rb