summaryrefslogtreecommitdiff
path: root/spec/ruby/core/warning
AgeCommit message (Collapse)Author
2020-11-01Fix Rubyspec (ruby-2.7) failuresKazuki Tsujimoto
https://github.com/ruby/ruby/runs/1337845174
2020-11-01use one-line pattern matching for warning testsKoichi Sasada
2020-10-26Assoc pattern matching (#3703)Nobuyoshi Nakada
[Feature #17260] One-line pattern matching using tASSOC R-assignment is rejected instead. Notes: Merged-By: nobu <nobu@ruby-lang.org>
2020-10-24Update to ruby/spec@4f59d86Benoit Daloze
2020-09-28Add rb_category_warn{,ing} for warning messages with categoriesJeremy Evans
This adds the following C-API functions that can be used to emit warnings with categories included: ```c void rb_category_warn(const char *, const char*, ...) void rb_category_warning(const char*, const char*, ...) ``` Internally in error.c, there is an rb_warn_category function that will call Warning.warn with the string and the category keyword if it doesn't have an arity of 1, and will call Warning.warn with just the string if it has an arity of 1. This refactors the rb_warn_deprecated{,_to_remove} functions to use rb_warn_category. This makes Kernel#warn accept a category keyword and pass it to Warning.warn, so that Ruby methods can more easily emit warnings with categories. rb_warn_category makes sure that the passed category is a already defined category symbol before calling Warning.warn. The only currently defined warning category is :deprecated, since that is what is already used. More categories can be added in later commits. Notes: Merged: https://github.com/ruby/ruby/pull/3508
2020-04-01Drop support for ruby 2.4 from ruby/specNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2892
2019-04-27Update to ruby/spec@15c9619Benoit Daloze
2018-11-27Update to ruby/spec@cdd6ff7eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-04Update to ruby/spec@c1b568beregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-28Update to ruby/spec@a6b8805eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e