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

58137 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 2082a26dc7
[ruby/fileutils] Bump version to 1.3.0.
https://github.com/ruby/fileutils/commit/ba3bd6fdfd
2019-09-27 11:39:02 +09:00
Hiroshi SHIBATA 49b7805e9a
[ruby/fileutils] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/fileutils/commit/17a9de6d9b
2019-09-27 11:39:02 +09:00
Kazuhiro NISHIYAMA d5355123cc
[ruby/fileutils] Reduce global variables
https://github.com/ruby/fileutils/commit/ba81f024cf
2019-09-27 11:39:02 +09:00
Jeremy Evans 06c35cfa65
[ruby/fileutils] Fix cp_r with symlink root on Windows
Previously this would copy the symlink root as a symlink instead
of creating a new root directory.  This modifies the source
to expand it using File.realpath before starting the copy.

Fixes Ruby Bug 12123

https://github.com/ruby/fileutils/commit/7359cef359
2019-09-27 11:39:02 +09:00
Jeremy Evans 9792c9d183
[ruby/fileutils] Fix test_cp_r_dev on Windows or other systems without character/block device in /dev
Previously this would give an error such as:

TestFileUtils#test_cp_r_dev [c:/fileutils/test/fileutils/test_fileutils.rb:455]:
[RuntimeError] exception expected, not.
Class: <TypeError>
Message: <"no implicit conversion of nil into String">

https://github.com/ruby/fileutils/commit/0ce0fefbeb
2019-09-27 11:39:02 +09:00
Jeremy Evans 9494ef8b2d
[ruby/fileutils] Do not break in verbose mode if using FileUtils with a frozen object
If FileUtils is included into another object, and verbose mode is
used, a FrozenError is currently raised unless the object has the
@fileutils_output and @fileutils_label instance variables.

This fixes things so that it does not attempt to set the instance
variables, but it still uses them if they are present.

https://github.com/ruby/fileutils/commit/689cb9c56a
2019-09-27 11:39:02 +09:00
Jeremy Evans 02cd420505
[ruby/fileutils] Skip test_cp_r_socket on JRuby
https://github.com/ruby/fileutils/commit/20bb9ec789
2019-09-27 11:39:02 +09:00
Jeremy Evans 1d99163aa5
[ruby/fileutils] Make copy methods handle FIFOs and UNIX sockets
Previously, this was broken.  Trying to copy a FIFO would raise a
NoMethodError if File.mkfifo was defined.  Trying to copy a UNIX
socket would raise a RuntimeError as File.mknod is not something
Ruby defines.

Handle the FIFO issue using File.mkfifo instead of mkfifo.

Handle the UNIX Socket issue by creating a unix socket.

Continue to not support character or block devices, raising a
RuntimeError for both.

Add tests for FIFO, UNIX Socket, and character/block devices.

https://github.com/ruby/fileutils/commit/123903532d
2019-09-27 11:39:02 +09:00
zverok 366dd9d803
[ruby/fileutils] Update the documentation content and formatting
https://github.com/ruby/fileutils/commit/b701353c53
2019-09-27 11:39:02 +09:00
Jeremy Evans 660c7e050f Fix more keyword separation issues
This fixes instance_exec and similar methods. It also fixes
Enumerator::Yielder#yield, rb_yield_block, and a couple of cases
with Proc#{<<,>>}.

This support requires the addition of rb_yield_values_kw, similar to
rb_yield_values2, for passing the keyword flag.

Unlike earlier attempts at this, this does not modify the rb_block_call_func
type or add a separate function type.  The functions of type
rb_block_call_func are called by Ruby with a separate VM frame, and we can
get the keyword flag information from the VM frame flags, so it doesn't need
to be passed as a function argument.

These changes require the following VM functions accept a keyword flag:

* vm_yield_with_cref
* vm_yield
* vm_yield_with_block
2019-09-26 19:24:58 -07:00
Nobuyoshi Nakada 0c6f36668a
Adjusted spaces [ci skip] 2019-09-27 10:20:56 +09:00
Aaron Patterson 293c6c8cc3
Add compaction support to `rb_ast_t`
This commit adds compaction support to `rb_ast_t`.
2019-09-26 15:41:46 -07:00
Jeremy Evans 37f9213f89 Fix keyword argument separation issues in Enumerator::Generator#each
This requires adding rb_proc_call_kw to pass the keyword flag.
2019-09-26 15:30:51 -07:00
Jeremy Evans dd2068ac8d Add rb_adjust_argv_kw_splat to internal.h
We are calling this in a few other files, it is better to have it
in a header than adding prototypes to the other files.
2019-09-26 15:30:51 -07:00
George Claghorn 31339ef4f2 Honor Syslog::Logger#level overrides 2019-09-26 15:01:44 -07:00
Aaron Patterson f5e8d33761
Fix clang errors when pendantic errors enabled
I've been compiling with:

```
  set -lx cflags '-std=c99 -Werror=pedantic -pedantic-errors'
```

But compilation would fail with the following:

```
cont.c:296:90: error: format specifies type 'void *' but the argument has type 'struct fiber_pool_stack *' [-Werror,-Wformat-pedantic]
    if (DEBUG) fprintf(stderr, "fiber_pool_stack_alloca(%p): %"PRIuSIZE"/%"PRIuSIZE"\n", stack, offset, stack->available);
                                                        ~~                               ^~~~~
cont.c:467:24: error: format specifies type 'void *' but the argument has type 'struct fiber_pool *' [-Werror,-Wformat-pedantic]
                count, fiber_pool, fiber_pool->used, fiber_pool->count, size, fiber_pool->vm_stack_size);
                       ^~~~~~~~~~
cont.c:588:83: error: format specifies type 'void *' but the argument has type 'struct fiber_pool_vacancy *' [-Werror,-Wformat-pedantic]
    if (DEBUG) fprintf(stderr, "fiber_pool_stack_acquire: %p used=%"PRIuSIZE"\n", fiber_pool->vacancies, fiber_pool->used);
                                                          ~~                      ^~~~~~~~~~~~~~~~~~~~~
cont.c:736:76: error: format specifies type 'void *' but the argument has type 'rb_fiber_t *' (aka 'struct rb_fiber_struct *')
      [-Werror,-Wformat-pedantic]
    if (DEBUG) fprintf(stderr, "fiber_stack_release: %p, stack.base=%p\n", fiber, fiber->stack.base);
```

This commit just fixes the pedantic errors
2019-09-26 14:58:11 -07:00
Aaron Patterson 4808afb360
Replace `freeze_string` with `rb_fstring` 2019-09-26 13:56:42 -07:00
Aaron Patterson 0846d48853
Remove `iseq_add_mark_object_compile_time`
This function is just a synonym for RB_OBJ_WRITTEN, so we can just
directly call that.
2019-09-26 13:56:42 -07:00
Aaron Patterson 9b6460cacc
Remove mark array
We don't use this array anymore so we can remove it
2019-09-26 13:56:42 -07:00
Aaron Patterson e197d9ca71
Execute write barrier instead of adding to array
We can mark everything via the instruction objects, so just execute the
write barrier instead of appending to the array
2019-09-26 13:56:41 -07:00
Aaron Patterson 98d7583bfc
Pull `iseq_add_mark_object_compile_time` out of `freeze_string`
`freeze_string` essentially called iseq_add_mark_object_compile_time.  I
need to know where all writes occur on the `rb_iseq_t`, so this commit
separates the function calls so we can add write barriers in the right
place.
2019-09-26 13:56:41 -07:00
Aaron Patterson f639e04699
Pull "mark object" up
Move the "add mark object" function to the location where we should be
calling RB_OBJ_WRITTEN.  I'm going to add verification code next so we
can make sure the objects we're adding to the array are also reachable
from the mark function.
2019-09-26 13:56:41 -07:00
Aaron Patterson 50fadefb7e
Scan the ISEQ arena for markables and mark them
This commit scans the ISEQ arena for objects that can be marked and
marks them.  This should make the mark array unnecessary.
2019-09-26 13:56:41 -07:00
Aaron Patterson a618d64086
Allocate `INSN *` out of a separate arena 2019-09-26 13:56:41 -07:00
Aaron Patterson 3cd8f76f7f
Introduce a secondary arena
We'll scan the secondary arena during GC mark. So, we should only
allocate "markable" instruction linked list nodes out of the secondary
arena.
2019-09-26 13:56:41 -07:00
Aaron Patterson bd017c633d
Extract allocation and free functions
Now we can allocate and free a secondary arena.
2019-09-26 13:56:41 -07:00
Aaron Patterson 451776f13d
Pass in arena to allocator
This is so we can configure a new arena later
2019-09-26 13:56:41 -07:00
Nobuyoshi Nakada dd1e047fcb
NEWS: fixed markups and indent [ci skip]
C API updates:

* adjusted indent.
* marked up ANYARGS as RDoc.
2019-09-27 02:31:39 +09:00
Nobuyoshi Nakada 81191afe8a
Kernel#open may be redefined 2019-09-27 01:13:10 +09:00
Nobuyoshi Nakada 617fa3049a
NEWS: fixed markups and formatting [ci skip]
* got rid of inadvertent label lists.
* marked up resolve_feature_path method names.
* fixed indentation of UnboundMethod#bind_call and marked up as
  RDoc.
2019-09-27 00:48:48 +09:00
Nobuyoshi Nakada 876c5fe1b2
Check the argument size
Ensure that argument array size does not overflow as `int`, before
cast in thread_do_start after new thread created.
2019-09-27 00:38:12 +09:00
git 3b9cdc59ce * 2019-09-27 [ci skip] 2019-09-27 00:02:18 +09:00
Jeremy Evans 9556342838 Fix shorten-64-to-32 compile warnings/errors 2019-09-26 08:01:53 -07:00
Jeremy Evans b193041b99 Fix keyword argument separation issues in Fiber#resume 2019-09-26 08:01:53 -07:00
Jeremy Evans 6b52959ef7 Fix keyword argument separation issues in Thread.new 2019-09-26 08:01:53 -07:00
Jeremy Evans 47d44510a3 Fix more keyword argument separation issues in Pathname 2019-09-26 08:01:53 -07:00
Jeremy Evans 3959469f24 Fix keyword argument separation issues in OpenSSL::SSL::SSLSocket#sys{read,write}_nonblock
It's unlikely anyone would actually hit these.  The methods are
private, you only hit this code path if calling these methods
before performing the SSL connection, and there is already a
verbose warning issued.
2019-09-26 08:01:53 -07:00
Jeremy Evans 760893d2f8 Fix keyword argument separation issues in Proc#{<<,>>}
This requires adding rb_proc_call_with_block_kw.
2019-09-26 08:01:53 -07:00
Jeremy Evans 0aa267f985 Fix keyword argument sepration issues when IO#open calls #to_open 2019-09-26 08:01:53 -07:00
Jean Boussier 5b9d646944 Fix Module#name news and add a test 2019-09-26 23:29:49 +09:00
Nobuyoshi Nakada b29c68e687
Restore ENV, rubygems always sets SOURCE_DATE_EPOCH now 2019-09-26 22:57:25 +09:00
Nobuyoshi Nakada c4ec817a7a
Gem::Specification#to_ruby needs OpenSSL 2019-09-26 22:56:32 +09:00
Takashi Kokubun 41e3c204fd
Reduce ISeq size of mjit_exec benchmark
to avoid unwanted memory pressure
2019-09-26 22:13:31 +09:00
git 1070456bb8 * remove trailing spaces. [ci skip] 2019-09-26 20:25:42 +09:00
Jean Boussier 9d0866c7d7 [EXPERIMENTAL] Make Module#name return a frozen String
* Always the same frozen String for a given Module or Class.
    * Avoids extra allocations whenever calling Module#name.
    * See [Feature #16150]
2019-09-26 13:25:23 +02:00
Hiroshi SHIBATA c8f7168653
Revert the accidentally commits related GitHub Actions 2019-09-26 19:22:30 +09:00
Hiroshi SHIBATA 2a490d5660
Suppress assert_match warnings. 2019-09-26 18:24:20 +09:00
Hiroshi SHIBATA d4a86e407e
Assert warnings message for the last argument is keyword parameter. 2019-09-26 18:07:17 +09:00
David Rodríguez a2af473018
[rubygems/rubygems] Make sure our modifications to kernel.warn work
And test the fix we're adding.

https://github.com/rubygems/rubygems/commit/6f86637b98
2019-09-26 17:48:01 +09:00
David Rodríguez 54839f0173
[rubygems/rubygems] Fix jruby build
https://github.com/rubygems/rubygems/commit/cc255b774a
2019-09-26 17:48:01 +09:00