1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

15 commits

Author SHA1 Message Date
Benoit Daloze
6998d75824 Update to ruby/spec@b65d01f 2021-07-29 22:11:21 +02:00
Benoit Daloze
cffdacb15a Ignore <internal: entries from core library methods for Kernel#warn(message, uplevel: n)
* Fixes [Bug #17259]
2020-10-26 08:47:33 +01:00
Benoit Daloze
148961adcd Update to ruby/spec@4f59d86 2020-10-24 15:53:53 +02:00
Jeremy Evans
346301e232 Add rb_category_warn{,ing} for warning messages with categories
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.
2020-09-28 08:38:06 -07:00
Benoit Daloze
126fd5f15c Update to ruby/spec@07164da 2020-07-27 21:41:08 +02:00
Nobuyoshi Nakada
826f44834f Drop support for ruby 2.4 from ruby/spec 2020-04-01 15:36:20 +09:00
Nobuyoshi Nakada
8a7e0aaaef
Warn non-nil $/ [Feature #14240] 2020-02-23 13:37:40 +09:00
Benoit Daloze
809f0b8a13 Update to ruby/spec@f8a2d54 2020-01-28 20:47:48 +01:00
Benoit Daloze
a17bc04d15 Update to ruby/spec@e69a14c 2019-09-29 18:01:32 +02:00
Benoit Daloze
5c276e1cc9 Update to ruby/spec@875a09e 2019-07-27 12:40:09 +02:00
Benoit Daloze
a1b4816759 Update to ruby/spec@15c9619 2019-04-27 18:53:23 +02:00
eregon
da7976235f Update to ruby/spec@7a16e01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-21 15:38:59 +00:00
eregon
67078e81f5 Update to ruby/spec@4bc7a2b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-13 21:41:45 +00:00
eregon
401b64c4e8 Update to ruby/spec@c1b568b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-04 15:09:32 +00:00
eregon
1d15d5f080 Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory.
  [Misc #13792] [ruby-core:82287]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-20 20:18:52 +00:00
Renamed from spec/rubyspec/core/kernel/warn_spec.rb (Browse further)