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/exception
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
..
fixtures
shared
backtrace_locations_spec.rb
backtrace_spec.rb
case_compare_spec.rb
cause_spec.rb
dup_spec.rb
equal_value_spec.rb
errno_spec.rb Update to ruby/spec@ec84479 2020-03-28 00:22:51 +01:00
exception_spec.rb
exit_value_spec.rb Update to ruby/spec@7241f39 2019-12-27 17:36:07 +01:00
frozen_error_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
full_message_spec.rb Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
hierarchy_spec.rb Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
inspect_spec.rb
interrupt_spec.rb
io_error_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
key_error_spec.rb
load_error_spec.rb
message_spec.rb
name_error_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
name_spec.rb Turn class variable warnings into exceptions 2020-04-10 00:29:05 -07:00
new_spec.rb
no_method_error_spec.rb Update to ruby/spec@ec84479 2020-03-28 00:22:51 +01:00
reason_spec.rb Update to ruby/spec@7241f39 2019-12-27 17:36:07 +01:00
receiver_spec.rb Turn class variable warnings into exceptions 2020-04-10 00:29:05 -07:00
result_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
set_backtrace_spec.rb
signal_exception_spec.rb
signm_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
signo_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
standard_error_spec.rb
status_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
success_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
system_call_error_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00
to_s_spec.rb
uncaught_throw_error_spec.rb Update to ruby/spec@d419e74 2019-12-27 16:46:08 +01:00