Граф коммитов

62887 Коммитов

Автор SHA1 Сообщение Дата
卜部昌平 50b18e8129 configure: detect that there is no g++
AC_PROG_CXX checks for several C++ compilers INCLUDING g++.  When none
of them were found it sets the CXX variable to be g++.  This doesn't
make any sense.  Absense of g++ has already been made sure.

Because we don't want insanity (that's the whole reason we test the
environment using autoconf), we need to swipe such insane variable out.
2020-09-03 15:14:09 +09:00
Aaron Patterson 3fb255625b
add lldb functions for getting the heap page / heap page body 2020-09-02 16:45:54 -07:00
Aaron Patterson 933035d303
support T_MATCH in lldb 2020-09-02 16:45:13 -07:00
John Hawthorn 0b81a484f3 Initialize new T_OBJECT as ROBJECT_EMBED
Previously, when an object is first initialized, ROBJECT_EMBED isn't
set. This means that for brand new objects, ROBJECT_NUMIV(obj) is 0 and
ROBJECT_IV_INDEX_TBL(obj) is NULL.

Previously, this combination meant that the inline cache would never be
initialized when setting an ivar on an object for the first time since
iv_index_tbl was NULL, and if it were it would never be used because
ROBJECT_NUMIV was 0. Both cases always fell through to the generic
rb_ivar_set which would then set the ROBJECT_EMBED flag and initialize
the ivar array.

This commit changes rb_class_allocate_instance to set the ROBJECT_EMBED
flag on the object initially and to initialize all members of the
embedded array to Qundef. This allows the inline cache to be set
correctly on first use and to be used on future uses.

This moves rb_class_allocate_instance to gc.c, so that it has access to
newobj_of. This seems appropriate given that there are other allocating
methods in this file (ex. rb_data_object_wrap, rb_imemo_new).
2020-09-02 14:54:29 -07:00
eileencodes eada635033 Add category to `rb_warn_deprecated`
PR https://github.com/ruby/ruby/pull/3418 added a category to
`rb_warn_deprecated_to_remove` but not to `rb_warn_deprecated`. This
adds the same code to `rb_warn_deprecated` so that those warnings also
get a category.

This change also adds tests for `rb_warn_deprecated` and updates the
tests for `rb_warn_deprecated_to_remove` to have clearer names.

I've fixed the call to `rb_method_entry` as we need to be using the
instance method, not singleton.

Feature: https://bugs.ruby-lang.org/issues/17122
2020-09-02 12:44:33 -07:00
Burdette Lamar 54fb8fb62a
Comply with guide for method doc: array.c (#3506)
Methods:

    any?
    all?
    one?
    none?
    sum
    shuffle!
    shuffle
    sample
2020-09-02 14:02:34 -05:00
Jeremy Evans d9b8411a7b Document that StringScanner#matched_size returns size in bytes [ci skip]
Fixes [Bug #17139]
2020-09-02 10:41:49 -07:00
git 0938bad0a5 * 2020-09-03 [ci skip] 2020-09-03 02:38:01 +09:00
Jeremy Evans cc5b7ed1dc Document limitation of Pathname#relative_path_from [ci skip]
This method is explicitly documented to not access the filesystem,
and the only way to get the correct behavior for a case where the
filesystem's case sensitivity differs from the operating system
default would be to access the filesystem.

Fixes [Bug #15417]
2020-09-02 10:34:33 -07:00
Nobuyoshi Nakada 93b78abd77
new_dstr: hoisted out from literal_concat and evstr2dstr 2020-09-02 13:30:16 +09:00
Nobuyoshi Nakada 6321330461
Removed trailing spaces [ci skip] 2020-09-02 13:30:16 +09:00
Marc-Andre Lafortune 5e16857315 Fix constant names set using const_set on a singleton class
Fixes [Bug #14895]
2020-09-02 00:05:14 -04:00
Peter Zhu 11922b5e03 Fix error message for wb unprotected objects count
This error is about wb unprotected objects, not old objects.
2020-09-01 22:03:13 -04:00
Alan Wu 4c3f0597de Remove the pc argument of vm_trace()
This makes the binary 272 bytes smaller on -O3 GCC 10.2.0.
2020-09-01 22:02:29 -04:00
Marc-Andre Lafortune 94b54b038c Reapply "Special case Range#max for integer beginning and Float::Infinity end" (tests)
Reverted in e080a4cdee
2020-09-01 21:02:12 -04:00
eileencodes 6e8ec9ab6d Support passing a category to `Warning.warn`
This change adds a `category` kwarg to make it easier to monkey patch
`Warning.warn`. Warnings already have a category, but that warning isn't
exposed. This implements a way to get the category so that warnings with
a specific category, like deprecated, can be treated differently than
other warnings in an application.

The change here does an arity check on the method to support backwards
compatibility for applications that may already have a warning monkey
patch.

For our usecase we want to `raise` for deprecation warnings in order to
get the behavior for the next Ruby version. For example, now that we
fixed all our warnings and deployed Ruby 2.7 to production, we want to
be able to have deprecation warnings behave like they would in 3.0: raise
an error. For other warnings, like uninialized constants, that behavior
won't be removed from Ruby in the next version, so we don't need to
raise errors.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2020-09-01 16:16:06 -07:00
Jeremy Evans de10a1f358 Update documentation for Range#max 2020-09-01 10:52:47 -07:00
Jeremy Evans 4db4faef0f Revert "Fix Range#{max,minmax} for range with integer beginning and non-integer end"
This reverts commit 8900a25581.
2020-09-01 10:52:47 -07:00
Jeremy Evans e080a4cdee Revert "Special case Range#max for integer beginning and Float::Infinity end"
This reverts commit 05bf811c28.
2020-09-01 10:52:47 -07:00
Burdette Lamar 94430d009a
Comply with guide for method doc: array.c (#3499)
Methods considered:

    count
    flatten!
    flatten
    cycle
    permutation
    combination
    repeated_permutation
    repeated_combination
    product
    take
    take_while
    drop
    drop_while
2020-09-01 12:49:48 -05:00
git 9d4c51478c * 2020-09-02 [ci skip] 2020-09-02 01:46:35 +09:00
Nobuyoshi Nakada 41cf17bef0
Fixed argument types 2020-09-02 01:41:20 +09:00
Nobuyoshi Nakada f6822e4ed0
Format with proper conversion specifiers instead of casts 2020-09-02 01:41:18 +09:00
Jeremy Evans be9dbe1c3e Fix pthread_setname_np arguments on NetBSD
The previous attempt to fix this in
b87df1bf24 reversed the argument
order instead of just fixing the quote escaping.

From Takahiro Kambe.

Fixes [Bug #15178]
2020-09-01 07:16:31 -07:00
David Rodríguez 6b43200948 Fix syncing bundler man pages
`rm_rf` does not support globbing, so not all files get deleted.
2020-09-01 21:18:15 +09:00
Nobuyoshi Nakada 8d1de3154c
Use RSTRING_LENINT for overflow check 2020-09-01 19:03:41 +09:00
Peter Zhu 21ad4075a7
Don't read past the end of the Ruby string
Ruby strings don't always have a null terminator, so we can't use
it as a regular C string. By reading only the first len bytes of
the Ruby string, we won't read past the end of the Ruby string.
2020-09-01 19:01:32 +09:00
Koichi Sasada a137874e67 add RUBY_DEBUG=ci envval for GH actions
RUBY_DEBUG=ci envval shows more information on rb_bug().
2020-09-01 06:14:35 +09:00
Nobuyoshi Nakada fbf79f1c11
Use the previous winflexbison3
winflexbison3 v2.5.23.20200829 seems to install nothing.
2020-09-01 14:42:19 +09:00
Hiroshi SHIBATA cceba23515 minitest is working fine with Ruby 3 2020-09-01 11:21:41 +09:00
Hiroshi SHIBATA e00eba1ce2 xmlrpc has been removed from the bundled gems 2020-09-01 11:21:41 +09:00
Hiroshi SHIBATA a3d90f1b9b bump version to minitest-5.14.2 2020-09-01 11:21:41 +09:00
Hiroshi SHIBATA 377159370b Revert the workaround of minitest and hoe
86737c509c
  3e1aea4613
2020-09-01 11:21:41 +09:00
卜部昌平 b01d852c2a congigure.ac: favour gcc on Linux
Requested by Naruse.
2020-09-01 11:05:10 +09:00
Burdette Lamar 50736f127a
Comply with guide for method doc: array.c (#3489)
Methods considered:

    &
    intersection
    |
    union
    max
    min
    minmax
    uniq!
    uniq
    compact!
    compact
2020-08-31 16:25:11 -05:00
Burdette Lamar e744d4070c
Comply with guide for method doc: array.c (#3484)
Methods:

    +
    concat
    *
    assoc
    rassoc
    ==
    eql?
    hash
    include?
    <=>
    -
    difference
2020-08-31 14:53:54 -05:00
git 18bcfe7144 * 2020-09-01 [ci skip] 2020-09-01 03:16:30 +09:00
Burdette Lamar 1f4c507afb
Comply with guide for method doc: array.c (#3477)
Methods considered:

    delete_at
    slice!
    reject!
    reject
    delete_if
    zip
    transpose
    replace
    clear
    fill
2020-08-31 13:16:10 -05:00
Nobuyoshi Nakada 2e80c8347e
Deprecate iterator? method
[Feature #15547] [Fix GH-2071]
2020-08-31 22:14:14 +09:00
Sutou Kouhei c23c880f56
[ruby/strscan] Bump version
https://github.com/ruby/strscan/commit/df90d541fa
2020-08-31 21:57:35 +09:00
Nobuyoshi Nakada c76508b88c
[ruby/strscan] Replaced examples using $KCODE with encodings
`$KCODE` has been deprecated and not effective since years ago.

https://github.com/ruby/strscan/commit/7c4dbd4cb3
2020-08-31 21:57:35 +09:00
Kazuhiro NISHIYAMA 01f28405b1
Update version to 3.0.0 in NEWS.md 2020-08-31 20:49:08 +09:00
Yusuke Endoh 53ba9fb74e Prohibit setter method names in endless method definition
https://bugs.ruby-lang.org/issues/16746#note-26
2020-08-31 20:30:27 +09:00
Hiroshi SHIBATA 86737c509c Removed minitest and hoe because they didn't support Ruby 3 yet 2020-08-31 18:51:59 +09:00
卜部昌平 b674fc9ca2
Thread.exclusive: delete
Has been deprecated since 2069c9e031.

[Feature #17125][ruby-core:99636]
2020-08-31 18:08:57 +09:00
Nobuyoshi Nakada eb9342d348
The deprecation of enumerators with block has been withdrawn
https://bugs.ruby-lang.org/issues/6670#change-75907
2020-08-31 17:45:27 +09:00
Nobuyoshi Nakada 0eec4ae851
Get rid of using Socket.gethostbyname 2020-08-31 17:45:27 +09:00
Hiroshi SHIBATA 3e1aea4613
Temporary removed minitest from bundled gems.
It requires Ruby 2.x.

  https://github.com/seattlerb/minitest/blob/master/Rakefile#L14
2020-08-31 17:18:14 +09:00
Nobuyoshi Nakada 34c20c995d
[DOC] Fixed wording [ci skip] 2020-08-31 16:53:57 +09:00
Nobuyoshi Nakada f588caa797
[DOC] Indent a code block in NEWS [ci skip] 2020-08-31 16:53:57 +09:00