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

63735 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 0f51105ece
make-snapshot: measure archiving times 2020-11-22 11:01:17 +09:00
Nobuyoshi Nakada 821aa35c8b
make-snapshot: suppress messages copying cached files unless verbose 2020-11-22 10:59:32 +09:00
Nobuyoshi Nakada 11cd9339a8
make-snapshot: clean autoconf caches for reproduceable packages 2020-11-22 10:49:02 +09:00
git 5512de7603 * 2020-11-22 [ci skip] 2020-11-22 09:10:35 +09:00
Nobuyoshi Nakada 43a9a974e2
[Bug #17021] Make host_* values consistent with target_* 2020-11-21 23:21:52 +09:00
Nobuyoshi Nakada ece917bab3
Added rubyspec-capiext target
This target builds extensions for rubyspec optional C-API tests.
2020-11-21 23:17:48 +09:00
Takashi Kokubun a6db9e8d7b
Remove the unused o_file definition
It's calculated inside compile_c_to_so again.
2020-11-21 00:29:52 -08:00
Takashi Kokubun 8750d001c2
Fix wrong #ifdef usages with #if
Apparently #ifdef is always true
2020-11-20 23:48:43 -08:00
Takashi Kokubun 27d5af59a3
Unify some confusing macro usages
_MSC_VER used to be the macro to switch JIT compaction. However, since
d4381d2ceb, the correct macro to switch it was changed from _MSC_VER
to _WIN32. As I didn't properly replace all relevant _MSC_VER usages
to _WIN32, these macros have been used inconsistently.

nobu replaced _WIN32 with USE_HEADER_TRANSFORMATION in 5eb446d12f.
Therefore we had USE_HEADER_TRANSFORMATION and _MSC_VER. This commit
makes sure such inconsistent _MSC_VER usages will be unified to the new
header, also renaming it to USE_JIT_COMPACTION to be more precise about
the requirements. The header transformation itself is not quite relevant
to places changed in this commit.
2020-11-20 23:39:30 -08:00
Jeremy Evans d645f18f0f Minor fixes to NEWS for String subclass method change [ci skip] 2020-11-20 23:36:46 -08:00
Takashi Kokubun ed8e552d4d
Shrink the blocking region for compile_compact_jit_code
Isn't setting `in_compact = true` enough to avoid a race condition
between JIT compaction and unload_units? Now I think it is.

This change will make it easier to spend more time on compile_compact_jit_code.
For now it seems to take only 0.0723ms though.
2020-11-20 22:47:54 -08:00
Takashi Kokubun 3f8c60cf09
Remove obsoleted str_new_empty
since 58325daae3.

../string.c:1339:1: warning: ‘str_new_empty’ defined but not used [-Wunused-function]
 1339 | str_new_empty(VALUE str)
      | ^~~~~~~~~~~~~
2020-11-20 22:22:29 -08:00
Takashi Kokubun 0960f56a1d
Eliminate IVC sync between JIT and Ruby threads (#3799)
Thanks to Ractor (https://github.com/ruby/ruby/pull/2888 and https://github.com/ruby/ruby/pull/3662),
inline caches support parallel access now.
2020-11-20 22:18:37 -08:00
Jeremy Evans 4988758e3a Update NEWS for String subclass method change [ci skip] 2020-11-20 16:42:38 -08:00
Jeremy Evans 58325daae3 Make String methods return String instances when called on a subclass instance
This modifies the following String methods to return String instances
instead of subclass instances:

* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop
* String#delete
* String#delete_prefix
* String#delete_suffix
* String#downcase
* String#dump
* String#each/#each_line
* String#gsub
* String#ljust
* String#lstrip
* String#partition
* String#reverse
* String#rjust
* String#rpartition
* String#rstrip
* String#scrub
* String#slice!
* String#slice/#[]
* String#split
* String#squeeze
* String#strip
* String#sub
* String#succ/#next
* String#swapcase
* String#tr
* String#tr_s
* String#upcase

This also fixes a bug in String#swapcase where it would return the
receiver instead of a copy of the receiver if the receiver was the
empty string.

Some string methods were left to return subclass instances:

* String#+@
* String#-@

Both of these methods will return the receiver (subclass instance)
in some cases, so it is best to keep the returned class consistent.

Fixes [#10845]
2020-11-20 16:30:23 -08:00
Nobuhiro IMAI 4f5d14eb8c [DOC] Ripper.{lex,tokenize} now always return full tokens. [ci skip] 2020-11-20 15:46:17 -08:00
git 18599b5749 * 2020-11-21 [ci skip] 2020-11-21 08:27:10 +09:00
Jeremy Evans 08686e71d5 Do not allow Module#include to insert modules before the origin in the lookup chain
Module#include should only be able to insert modules after the origin,
otherwise it ends up working like Module#prepend.

This fixes the case where one of the modules in the included module
chain is included in a module that is already prepended to the receiver.

Fixes [Bug #7844]
2020-11-20 15:26:43 -08:00
Nobuyoshi Nakada 1f7b557890
Update expected IRB result 2020-11-20 18:30:05 +09:00
Nobuyoshi Nakada 69d871eeeb
[Feature #17276] Moved raise_errors support to Ripper::Lexer#parse 2020-11-20 17:18:27 +09:00
Nobuyoshi Nakada fac2498e02 [Bug #11213] let defined?(super) call respond_to_missing? 2020-11-20 16:04:45 +09:00
Kazuhiro NISHIYAMA 4b899f9164 Try to fix download error
https://github.com/ruby/ruby/runs/1428320660?check_suite_focus=true#step:9:10
```
tool/downloader.rb:243:in `rescue in download': failed to download config.guess (RuntimeError)
OpenURI::HTTPError: 403 Forbidden: https://cdn.jsdelivr.net/gh/gcc-mirror/gcc@master/config.guess
```
2020-11-20 14:18:14 +09:00
S-H-GAMELINKS 8cbd5f218b rename 2020-11-20 11:47:47 +09:00
S-H-GAMELINKS c11c25baef fix code 2020-11-20 11:47:47 +09:00
S-H-GAMELINKS d79cdcb113 add flo_prev_or_next func 2020-11-20 11:47:47 +09:00
Nobuhiro IMAI 1800f3fa5c
Ripper.{lex,tokenize} return full tokens even if syntax error
yet another implements [Feature #17276]
2020-11-20 11:44:57 +09:00
git 80d3f21994 * 2020-11-20 [ci skip] 2020-11-20 09:25:12 +09:00
Kevin Murphy 0026f644d7 Document Different Coverage Modes
This commits adds in documentation to illustrate the different modes you
can start coverage with. Examples are provided to show how to start each
of these modes, along with an explanation of the mode and a description
of the output.
2020-11-20 09:24:46 +09:00
Nobuyoshi Nakada 44ad72fa21
Added assertions 2020-11-19 15:41:53 +09:00
Hiroshi SHIBATA 9c1e2a99fc
Update the default gems section in NEWS.md 2020-11-19 15:36:21 +09:00
Jeremy Evans 4a5c42db88 Make RubyVM::InstructionSequence.compile_file use same encoding as load
This switches the internal function from rb_parser_compile_file_path
to rb_parser_load_file, which is the same internal method that
Kernel#load uses.

Fixes [Bug #17308]
2020-11-19 07:12:50 +09:00
git fee0073726 * 2020-11-19 [ci skip] 2020-11-19 07:11:57 +09:00
Cristian Greco ce3c9a3437 Fix USE_TRANSIENT_HEAP macro usage in hash.c
Additionally fix some typos in transient heap.
2020-11-19 07:11:36 +09:00
Hiroshi SHIBATA dc3a65bd99
[ruby/net-smtp] Bump version to 0.2.1
https://github.com/ruby/net-smtp/commit/6e5c09dcc4
2020-11-18 16:28:46 +09:00
Yusuke Endoh 6e487719b4 Update TypeProf to 0.6.1 2020-11-18 16:27:41 +09:00
Jeremy Evans 1301bd8ca9 Update documentation for Ripper.{lex,tokenize,sexp,sexp_raw} [ci skip] 2020-11-17 21:26:56 -08:00
Jeremy Evans cd0877a93e
Support raise_errors keyword for Ripper.{lex,tokenize,sexp,sexp_raw}
Implements [Feature #17276]
2020-11-17 21:15:50 -08:00
Kazuhiro NISHIYAMA a776032ef1
Move the declaration into the function
instead of 'do not call it directly.' comment.
2020-11-18 10:52:56 +09:00
Sutou Kouhei 519062b350 Add Fiddle 1.0.2 to NEWS 2020-11-18 09:05:13 +09:00
Sutou Kouhei 0915a02068 Update Fiddle's dependencies 2020-11-18 09:05:13 +09:00
Sutou Kouhei fcd680fbf0 [ruby/fiddle] Remove needless return
https://github.com/ruby/fiddle/commit/50e02f9445
2020-11-18 09:05:13 +09:00
Sutou Kouhei aa22b6658a [ruby/fiddle] Bump version
https://github.com/ruby/fiddle/commit/74b65cb858
2020-11-18 09:05:13 +09:00
Sutou Kouhei 5c7ef89db4 [ruby/fiddle] test: suppress shadowing outer local variable warning
https://github.com/ruby/fiddle/commit/cf168680a2
2020-11-18 09:05:13 +09:00
Sutou Kouhei ceccc16589 [ruby/fiddle] Remove needless workaround
It's fixed in upstream.
https://github.com/MSP-Greg/ruby-loco/issues/4

https://github.com/ruby/fiddle/commit/2ae0ff4934
2020-11-18 09:05:13 +09:00
Sutou Kouhei 3b385c33b8 [ruby/fiddle] Add workaround for ruby head for mingw
https://github.com/ruby/fiddle/commit/bb227c206d
2020-11-18 09:05:13 +09:00
Sutou Kouhei 821cfa74cb [ruby/fiddle] Use msys2_mingw_dependencies
https://github.com/ruby/fiddle/commit/fee175a8ff
2020-11-18 09:05:13 +09:00
Sutou Kouhei e27701291a [ruby/fiddle] Use ruby_xcalloc() instead of ruby_xmalloc() and memset()
https://github.com/ruby/fiddle/commit/6d24fb5438
2020-11-18 09:05:13 +09:00
Sutou Kouhei 1867088d90 [ruby/fiddle] Remove needless rescue
GitHub: fix GH-15

Reported by Eneroth3. Thanks!!!

https://github.com/ruby/fiddle/commit/f3d70b81ec
2020-11-18 09:05:13 +09:00
Sutou Kouhei aff5eaced4 [ruby/fiddle] Add workaround for RubyInstaller for Windows
See comment for details.

https://github.com/ruby/fiddle/commit/0c76f03dc4
2020-11-18 09:05:13 +09:00
Aaron Patterson 307388ea19 [ruby/fiddle] Add a "pinning" reference (#44)
* Add a "pinning" reference

A `Fiddle::Pinned` objects will prevent the objects they point to from
moving.  This is useful in the case where you need to pass a reference
to a C extension that keeps the address in a global and needs the
address to be stable.

For example:

```ruby
class Foo
  A = "hi" # this is an embedded string

  some_c_function A # A might move!
end
```

If `A` moves, then the underlying string buffer may also move.
`Fiddle::Pinned` will prevent the object from moving:

```ruby
class Foo
  A = "hi" # this is an embedded string

  A_pinner = Fiddle::Pinned.new(A) # :nodoc:

  some_c_function A # A can't move because of `Fiddle::Pinned`
end
```

This is a similar strategy to what Graal uses:

  https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/PinnedObject.html#getObject--

* rename global to match exception name

* Introduce generic Fiddle::Error and rearrange error classes

Fiddle::Error is the generic exception base class for Fiddle exceptions.
This commit introduces the class and rearranges Fiddle exceptions to
inherit from it.

https://github.com/ruby/fiddle/commit/ac52d00223
2020-11-18 09:05:13 +09:00