58550 Commits

Author SHA1 Message Date
Aaron Patterson
7733db665a [ruby/fiddle] Fiddle::Function must maintain a reference to the closure
If the first parameter to Fiddle::Function is a closure object (rather
than an interger), `rb_Integer` will cast it to an integer but not
maintain a reference to the closure.  Then if the closure gets GC'd, we
have a segv.  This commit keeps a reference to the original parameter to
initialize so that the object will not be GC'd.

Fixes: https://bugs.ruby-lang.org/issues/13286

https://github.com/ruby/fiddle/commit/0fc697bbc5
2019-10-24 19:34:15 +09:00
Hiroshi SHIBATA
70ca56deda
Temporarily skipped with upstream changes of Date library. 2019-10-24 18:50:57 +09:00
Hiroshi SHIBATA
487d96c6b1
[ruby/date] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/date/commit/13c94362c2
2019-10-24 18:39:04 +09:00
zverok
9d3a4ab05b
[ruby/date] Update docs
https://github.com/ruby/date/commit/8c02586a98
2019-10-24 18:39:04 +09:00
zverok
913807bd6c
[ruby/date] Simplify #inspect
https://github.com/ruby/date/commit/af01edd7d8
2019-10-24 18:39:04 +09:00
Jeremy Evans
2e37c1960a
[ruby/date] Remove taint support
Ruby 2.7 deprecates taint and it no longer has an effect.
The lack of taint support should not cause a problem in
previous versions.

https://github.com/ruby/date/commit/519470dc3b
2019-10-24 18:39:04 +09:00
Jeremy Evans
fc0e8d00bc
[ruby/date] Support -Float::INFINITY...date ranges
Fixes Ruby Bug 12961

https://github.com/ruby/date/commit/7f533c2552
2019-10-24 18:39:04 +09:00
Jeremy Evans
4e40ca301c
[ruby/date] Check for numeric arguments in constructors
Previously, the type of these arguments were not checked, leading to
NoMethodErrors in some cases, and TypeErrors in other cases, but not
showing what field was having the problems.  This change makes it so
the field with the problem is included in the error message.

For the valid_*? methods, this changes them to return false if one
of the arguments that should be numeric is not.

Fixes Ruby Bug 11935
Fixes Ruby Misc 15298

https://github.com/ruby/date/commit/a2f4b665f8
2019-10-24 18:39:04 +09:00
Jeremy Evans
9eb798a3f1
[ruby/date] Make julian dates roundtrip through to_time.to_date
Previously, julian dates would not round trip through to_time.to_date,
because Time is always considered gregorian.  This converts the Date
instance from julian to gregorian before converting to Time, ensuring
that an equal date object will be returned if converting that Time
back to Date.

This does result in julian Date objects showing different day values
if converting to Time.

Fixes Ruby Bug 8428.

https://github.com/ruby/date/commit/d8df64555e
2019-10-24 18:39:04 +09:00
Alan Wu
f1de438380 Use CPDEBUG for debug code 2019-10-24 18:03:42 +09:00
Alan Wu
89e7997622 Combine call info and cache to speed up method invocation
To perform a regular method call, the VM needs two structs,
`rb_call_info` and `rb_call_cache`. At the moment, we allocate these two
structures in separate buffers. In the worst case, the CPU needs to read
4 cache lines to complete a method call. Putting the two structures
together reduces the maximum number of cache line reads to 2.

Combining the structures also saves 8 bytes per call site as the current
layout uses separate two pointers for the call info and the call cache.
This saves about 2 MiB on Discourse.

This change improves the Optcarrot benchmark at least 3%. For more
details, see attached bugs.ruby-lang.org ticket.

Complications:
 - A new instruction attribute `comptime_sp_inc` is introduced to
 calculate SP increase at compile time without using call caches. At
 compile time, a `TS_CALLDATA` operand points to a call info struct, but
 at runtime, the same operand points to a call data struct. Instruction
 that explicitly define `sp_inc` also need to define `comptime_sp_inc`.
 - MJIT code for copying call cache becomes slightly more complicated.
 - This changes the bytecode format, which might break existing tools.

[Misc #16258]
2019-10-24 18:03:42 +09:00
Koichi Sasada
38e931fa2c show "transferred" attribute on Fiber#to_s
If a fiber is invoked with transfer method (such as "f.transfer"),
then the invoked fiber ("f") is labeled as "transferred" and this
fiber can not be invoked with Fiber#resume. This patch adds
transferred attribute for "Fiber#to_s" (and inspect).
2019-10-24 16:46:21 +09:00
Koichi Sasada
4c3e3b8028 Revert "Fix Fiber#transfer"
This reverts commit fa8ac91e957a076f6df1adaecad7896817138009.

Previous behavior is intentional.
2019-10-24 16:46:21 +09:00
Hiroshi SHIBATA
65e8267938
Revert "Fixed the require path for e2mmap version file."
This reverts commit ff953a003e03f5f070112ececefab4c07ff4cb0e.
2019-10-24 16:17:17 +09:00
Hiroshi SHIBATA
ff953a003e
Fixed the require path for e2mmap version file. 2019-10-24 16:12:34 +09:00
Hiroshi SHIBATA
2791989a31
Fixed sync path of e2mmap structure for gemspec. 2019-10-24 16:11:01 +09:00
Yusuke Endoh
281f754126 include/ruby/backward/cxxanyargs.hpp: call va_end before return
Coverity Scan complains it.
2019-10-24 08:30:33 +09:00
Yusuke Endoh
f26f0f4109 hash.c: Do not use Unicode double-quotes
It made rdoc fail.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1804/ruby-master/log/20191023T183005Z.fail.html.gz
```
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

	(ArgumentError) invalid byte sequence in US-ASCII

uh-oh! RDoc had a problem:
invalid byte sequence in US-ASCII
```
2019-10-24 08:04:45 +09:00
BurdetteLamar
df91896f32 More rdoc for ENV#[] and ENV#fetch 2019-10-23 11:12:22 -07:00
aycabta
6df6611ce7 Treat only left alt key as meta-key on Windows
On German keyboard, right alt key acts as like shift key.

Ex. right-alt-8 is just "[". This input doesn't have meta-key statement.
2019-10-24 02:49:14 +09:00
Nobuyoshi Nakada
f1d4216bd9
Added refresh-gems
Refreshes bundled gems to the latest version, and extracts them.
2019-10-24 01:42:48 +09:00
Nobuyoshi Nakada
7391db4ab3
Updated minitest to 5.12.2 2019-10-24 01:18:19 +09:00
aycabta
7bc787fa06 Support forced enter insertion by Ctrl+Enter on Windows 2019-10-24 00:12:58 +09:00
git
659f7c0aeb * 2019-10-24 [ci skip] 2019-10-24 00:00:59 +09:00
aycabta
039faecdb8 Suppress duplicated "require 'reline'" 2019-10-23 23:59:53 +09:00
Nobuyoshi Nakada
1d91feaf13
Limit strict RUBY_METHOD_FUNC in C++
Limit strict function signature check with RUBY_METHOD_FUNC in C++
to bundled libraries only.  [Bug #16271]
2019-10-23 20:18:32 +09:00
aycabta
8bb716ab91 Fix indent... 2019-10-23 19:57:31 +09:00
Nobuyoshi Nakada
67f010af9b
name2ctype.h depends on also Emoji data 2019-10-23 15:11:52 +09:00
Kazuhiro NISHIYAMA
cbec533677
Add gem names [ci skip] 2019-10-23 13:23:43 +09:00
Kazuhiro NISHIYAMA
5d7aef20dd
Trivial fixes [ci skip] 2019-10-23 13:18:48 +09:00
Kazuhiro NISHIYAMA
959ddf44b3
Fix typos [ci skip] 2019-10-23 12:00:44 +09:00
Nobuyoshi Nakada
46f175ed5c
Use cppflags to pass preprocessor options 2019-10-23 02:53:36 +09:00
Nobuyoshi Nakada
d5d5844744
Use dedicated assertion methods for warning and syntax error 2019-10-23 02:30:14 +09:00
Nobuyoshi Nakada
601f1fb456
Catch syntax error even if fatal 2019-10-23 02:05:28 +09:00
Nobuyoshi Nakada
afab8122c3
Fix the exception when CPDEBUG 2019-10-23 02:04:36 +09:00
Nobuyoshi Nakada
801a11d0ab
Relaxed tests for CPDEBUG mode 2019-10-23 01:05:52 +09:00
git
1a80ee4573 * 2019-10-23 [ci skip] 2019-10-23 00:42:44 +09:00
Nobuyoshi Nakada
51bab75f49
Provides ruby2_keywords
So that requiring it succeeds even if that forward compatibility
gem is not installed.
2019-10-23 00:19:25 +09:00
Nobuyoshi Nakada
8390057d1e
Benchmark for [Feature #16155] 2019-10-22 22:49:48 +09:00
NARUSE, Yui
99ca5705a2 tool/release.sh uses ruby-actions' result
https://github.com/ruby/actions
2019-10-22 22:15:52 +09:00
NARUSE, Yui
d736511e42 Move format-release to tool and fix bugs 2019-10-22 21:44:19 +09:00
Nobuyoshi Nakada
04075305d3
Ignore timestamp file for the expected failure [ci skip] 2019-10-22 21:33:24 +09:00
NARUSE, Yui
aec0a293a4 Add a tool to generate a patch for www from log
Receives an output of `tool/make-snapshot` and genarete
* Markdown format for release note
* a patch for branches.yml, downloads.yml, and releases.yml of w.r-l.o
2019-10-22 21:17:29 +09:00
Nobuyoshi Nakada
ed3333f873
make-snapshot: Regexp#match raises on nil now 2019-10-22 21:05:52 +09:00
Yusuke Endoh
501b517dfb NEWS: add a URL about the performance improvement of CGI.escapeHTML 2019-10-22 20:06:07 +09:00
Yusuke Endoh
02aadf1032 NEWS: Fix the example of Lazy#eager v2_7_0_preview2 2019-10-22 19:46:44 +09:00
Yusuke Endoh
fac4339a12 NEWS: add an example for Lazy#eager 2019-10-22 19:39:42 +09:00
Yusuke Endoh
0e735b218f NEWS: Make Net::FTP#features and #option more informative 2019-10-22 19:32:04 +09:00
MSP-Greg
22845176d7
test/ruby/test_exception typo fix 2019-10-22 14:06:45 +09:00
MSP-Greg
5e0d33a856
appveyor.yml - remove timezone & tzinfo gems from MSVC builds
Not compatible with concurrent-ruby dependency
2019-10-22 14:06:39 +09:00