1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core
Jeremy Evans 900e83b501 Turn class variable warnings into exceptions
This changes the following warnings:

* warning: class variable access from toplevel
* warning: class variable @foo of D is overtaken by C

into RuntimeErrors.  Handle defined?(@@foo) at toplevel
by returning nil instead of raising an exception (the previous
behavior warned before returning nil when defined? was used).

Refactor the specs to avoid the warnings even in older versions.
The specs were checking for the warnings, but the purpose of
the related specs as evidenced from their description is to
test for behavior, not for warnings.

Fixes [Bug #14541]
2020-04-10 00:29:05 -07:00
..
argf Fixed misspellings 2019-12-20 09:32:42 +09:00
array Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
basicobject Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
binding Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
builtin_constants Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
class Update to ruby/spec@4eec3dc 2019-11-30 21:26:52 +01:00
comparable Update to ruby/spec@ec84479 2020-03-28 00:22:51 +01:00
complex Update to ruby/spec@f8a2d54 2020-01-28 20:47:48 +01:00
data Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
dir Use rb_warn_deprecated for File.exists? and Dir.exists? 2020-04-06 21:43:32 +09:00
encoding spec/ruby/core/encoding/locale_charmap_spec.rb: locale_charmap is UTF-8 on Android 2020-02-13 23:00:03 +09:00
enumerable Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
enumerator Update to ruby/spec@f8a2d54 2020-01-28 20:47:48 +01:00
env Fixed misspellings 2019-12-20 09:32:42 +09:00
exception Turn class variable warnings into exceptions 2020-04-10 00:29:05 -07:00
false [EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return a frozen String 2019-09-27 13:52:33 +09:00
fiber Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
file Use rb_warn_deprecated for File.exists? and Dir.exists? 2020-04-06 21:43:32 +09:00
filetest Use rb_warn_deprecated for File.exists? and Dir.exists? 2020-04-06 21:43:32 +09:00
float Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
gc Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
hash Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
integer Refined "Drop support for ruby 2.4 from ruby/spec" 2020-04-03 09:44:40 +09:00
io Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
kernel Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
main Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
marshal Update to ruby/spec@f8a2d54 2020-01-28 20:47:48 +01:00
matchdata Update to ruby/spec@4eec3dc 2019-11-30 21:26:52 +01:00
math Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
method Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
module Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
mutex [ruby/spec] Just test that sleep completes 2020-02-06 15:42:16 +09:00
nil Update to ruby/spec@41bf282 2020-02-28 19:07:17 +01:00
numeric Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
objectspace Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
proc Proc made by Symbol#to_proc should be a lambda [Bug #16260] 2020-02-19 15:46:26 +09:00
process Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
queue
random Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
range Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
rational Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
regexp Update to ruby/spec@ec84479 2020-03-28 00:22:51 +01:00
signal Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
sizedqueue Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
string Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
struct Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
symbol Update to ruby/spec@ec84479 2020-03-28 00:22:51 +01:00
systemexit
thread Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
threadgroup Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
time Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
tracepoint Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
true [EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return a frozen String 2019-09-27 13:52:33 +09:00
unboundmethod Update to ruby/spec@519df35 2019-09-29 16:03:58 +02:00
warning Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00