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 a0579f3606 Make prepending a refined module after inclusion not break refinements
After the previous commit, this was still broken. The reason it
was broken is that a refined module that hasn't been prepended to
yet keeps the refined methods in the module's method table. When
prepending, the module's method table is moved to the origin
iclass, and then the refined methods are moved from the method
table to a new method table in the module itself.

Unfortunately, that means that if a class has included the module,
prepending breaks the refinements, because when the methods are
moved from the origin iclass method table to the module method
table, they are removed from the method table from the iclass
created when the module was included earlier.

Fix this by always creating an origin class when including a
module that has any refinements, even if the refinements are
not currently used.  I wasn't sure the best way to do that.
The approach I choose was to use an object flag. The flag is
set on the module when Module#refine is called, and if the
flag is present when the module is included in another module
or class, an origin iclass is created for the module.

Fixes [Bug #13446]
2019-11-28 19:57:04 +09:00
..
-ext- test/-ext-/string/test_fstring.rb: suppress a warning for taint 2019-11-18 09:25:49 -06:00
base64
benchmark
bigdecimal More fixes for $SAFE/taint post merging 2019-11-18 01:00:25 +02:00
cgi Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
coverage
csv Remove unneeded exec bits from some files 2019-11-09 21:36:30 +09:00
date [ruby/date] Add more timezone abbreviations 2019-11-01 17:30:14 +09:00
dbm [ruby/dbm] Remove taint support 2019-10-26 07:03:33 +09:00
digest
drb Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
dtrace test/dtrace/helper.rb: Etc.getgrnam may return nil on some platforms 2019-10-06 15:23:00 +09:00
erb
etc
excludes Migrate Wercker MJIT tests to Actions (#2676) 2019-11-12 21:48:05 -08:00
fiddle More fixes for $SAFE/taint post merging 2019-11-18 01:00:25 +02:00
fileutils [ruby/fileutils] Use pend instead of skip 2019-10-03 18:32:29 +09:00
gdbm
io Revert "[ruby/io-console] Skip cursor position test on Solaris" 2019-09-25 09:48:44 +09:00
irb Add require "irb" to test/irb/test_completion.rb 2019-11-28 15:32:21 +09:00
json Look up constant instead of caching in a global 2019-10-17 13:30:09 -07:00
lib Enforce --jit-debug test by another way 2019-10-15 22:47:20 -07:00
logger Fix keyword argument warnings in the tests from Class#new 2019-09-06 19:41:23 -07:00
matrix Add abs to Matrix (#2199) 2019-08-21 16:36:39 -04:00
misc
mkmf Fix keyword argument separation warnings in test 2019-08-30 12:39:31 -07:00
monitor Monitor#exit: check monitor ownership. 2019-11-12 10:07:45 +09:00
net Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
nkf
objspace
open-uri
openssl Skip very time consuming test [Bug #16196] 2019-10-10 21:02:45 +09:00
optparse test/optparse/test_did_you_mean.rb - fix suggestion order 2019-10-21 09:53:56 +09:00
ostruct
pathname Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
psych [ruby/psych] Remove taint support 2019-11-12 10:35:47 +09:00
racc Fix typos 2019-11-17 13:11:25 +09:00
rdoc Fix ghost method line no 2019-11-28 08:19:05 +09:00
readline More fixes for $SAFE/taint post merging 2019-11-18 01:00:25 +02:00
reline Add test/reline/test_string_processing.rb 2019-11-21 07:28:18 +09:00
resolv
rexml Import REXML 3.2.3 (#2548) 2019-10-12 12:07:15 +09:00
rinda
ripper [ripper] Fixed unique key check in pattern matching 2019-11-26 22:54:35 +09:00
rss Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
ruby Make prepending a refined module after inclusion not break refinements 2019-11-28 19:57:04 +09:00
rubygems Merge RubyGems 3.1.0.pre3 2019-11-11 16:59:49 +09:00
sdbm
socket Remove check of ai.protocol 2019-09-10 12:39:49 +09:00
stringio [ruby/stringio] Remove taint support 2019-10-31 16:24:02 +09:00
strscan Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
syslog Honor Syslog::Logger#level overrides 2019-09-26 15:01:44 -07:00
uri Check for invalid hex escapes in URI#query= 2019-10-08 07:30:55 -07:00
webrick [ruby/webrick] Support literal IPv6 addresses in X-Forwarded-Host 2019-10-24 19:47:20 +09:00
win32ole Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
yaml
zlib [ruby/zlib] Fix setting mtime to zero in GzipWriter 2019-10-31 22:23:58 +09:00
runner.rb
test_abbrev.rb
test_delegate.rb Support delegates for BasicObject 2019-10-10 13:15:00 -07:00
test_extlibs.rb
test_find.rb
test_forwardable.rb [ruby/forwardable] Fix NoMethodError on ruby 2.4 or earlier 2019-10-26 09:25:17 +09:00
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 Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
test_shellwords.rb Do not escape + in Shellwords.escape 2019-09-27 07:43:32 -07:00
test_singleton.rb
test_syslog.rb test/test_syslog.rb (test_log): skipped on Android 2019-10-11 21:13:52 +09:00
test_tempfile.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
test_time.rb Support %U/%u/%W/%w/%V/%g/%G formats in Time.strptime 2019-11-21 03:32:20 +02:00
test_timeout.rb
test_tmpdir.rb Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
test_tracer.rb Use realpath to try to fix failures with symlinks 2019-11-23 11:41:27 +09:00
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb