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

12637 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 0b8c73aa65
[ripper] Quoted label without expression must be a local variable 2019-11-19 17:18:27 +09:00
Nobuyoshi Nakada 473e314791 Prefer dedecated assertions 2019-11-19 02:38:56 +09:00
Takashi Kokubun 0be0d90ab0
pack is not using invokebuiltin anymore 2019-11-18 09:31:36 -08:00
Yusuke Endoh 0c0278b90a test/-ext-/string/test_fstring.rb: suppress a warning for taint 2019-11-18 09:25:49 -06:00
Koichi Sasada c3693bbaaa catch up last commit.
Array#pack uses `opt_invokebuiltin_delegate_leave` now.
2019-11-18 10:24:38 +09:00
Jeremy Evans ab42e5a486 More fixes for $SAFE/taint post merging 2019-11-18 01:00:25 +02:00
Jeremy Evans ffd0820ab3 Deprecate taint/trust and related methods, and make the methods no-ops
This removes the related tests, and puts the related specs behind
version guards.  This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
2019-11-18 01:00:25 +02:00
Jeremy Evans c5c05460ac Warn on access/modify of $SAFE, and remove effects of modifying $SAFE
This removes the security features added by $SAFE = 1, and warns for access
or modification of $SAFE from Ruby-level, as well as warning when calling
all public C functions related to $SAFE.

This modifies some internal functions that took a safe level argument
to no longer take the argument.

rb_require_safe now warns, rb_require_string has been added as a
version that takes a VALUE and does not warn.

One public C function that still takes a safe level argument and that
this doesn't warn for is rb_eval_cmd.  We may want to consider
adding an alternative method that does not take a safe level argument,
and warn for rb_eval_cmd.
2019-11-18 01:00:25 +02:00
Kazuhiro NISHIYAMA 449b2b9214
Fix typos 2019-11-17 13:11:25 +09:00
aycabta fa7618e4c1 Implement em_set_mark and em_exchange_mark 2019-11-15 16:50:40 +09:00
Nobuyoshi Nakada 4d615a0c8f
`#@1` is no longer an embedded variable 2019-11-14 16:37:25 +09:00
Yusuke Endoh 48edaf8b8a test/ruby/test_proc.rb: suppress "method redefined" warnings 2019-11-14 13:00:25 +09:00
Takashi Kokubun a8f9e25ca8
Suspend many fibers test on JIT for now
https://github.com/ruby/ruby/runs/301411717

No C backtrace information and this is hard to fix immediately.
As CI doesn't provide helpful information, this should be debugged
locally or at least have more logs there.
2019-11-13 09:38:22 -08:00
Takashi Kokubun 3324bc9d17
Skip tailcall test for MJIT
failing in https://github.com/ruby/ruby/runs/300579218
2019-11-12 23:10:04 -08:00
Dylan Thacker-Smith ac112f2b5d Avoid top-level search for nested constant reference from nil in defined?
Fixes [Bug #16332]

Constant access was changed to no longer allow top-level constant access
through `nil`, but `defined?` wasn't changed at the same time to stay
consistent.

Use a separate defined type to distinguish between a constant
referenced from the current lexical scope and one referenced from
another namespace.
2019-11-13 15:36:58 +09:00
aycabta a5b6d7bca8 Suppress warnings except for when last evaluation
Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
2019-11-13 15:15:28 +09:00
Takashi Kokubun 331655cbe7
Migrate Wercker MJIT tests to Actions (#2676)
* Migrate Wercker MJIT tests to Actions

* Support pull request for testing

* Capitalize other jobs too

* Make it a command name for consistency [ci skip]

* Remove wercker.yml

* Add --jit-verbose=2 for debugging

* Install MJIT headers

* Separate install for sudo

* Trigger build
2019-11-12 21:48:05 -08:00
Nobuyoshi Nakada bf34ade7ef
Show the name `Kernel#proc` in the warning message 2019-11-12 22:58:09 +09:00
manga_osyo 3816622fbe Fixed `assert_equal` first argument to be expected. 2019-11-12 21:03:22 +09:00
osyo-manga fe45bee093 Reline#readline and Reline#readmultiline to private. 2019-11-12 21:03:22 +09:00
Nobuyoshi Nakada 3bf8ffad71
Added assertions for realpath and realdirpath
It is said that realpath(3) and realdirpath(3) on some platforms
may return a relative path.
2019-11-12 18:04:20 +09:00
Nobuyoshi Nakada fb6a489af2
Revert "Method reference operator"
This reverts commit 67c5747369.
[Feature #16275]
2019-11-12 17:24:48 +09:00
Nobuyoshi Nakada a58b4eee25
Warn on `...` at EOL 2019-11-12 17:14:14 +09:00
Jeremy Evans b38b26c62d
[ruby/bigdecimal] Remove taint checking
This removes the taint checking.  Taint support is deprecated in
Ruby 2.7 and has no effect.  I don't think removing the taint
checks in earlier ruby versions will cause any problems.

https://github.com/ruby/bigdecimal/commit/1918d466f3
2019-11-12 11:16:07 +09:00
Jeremy Evans 30fdee65d9
[ruby/psych] 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 Ruby versions.

I'm not sure if the untaint calls in deduplicate are still needed
after the removal of tainting in the parser.  If they are not
needed, they should be removed.

https://github.com/ruby/psych/commit/73c1a2b4e0
2019-11-12 10:35:47 +09:00
Koichi Sasada fd6445b7e8 Monitor#exit: check monitor ownership.
Monitor#exit should be called by only onwer Thread. However, there
is not check for it.
2019-11-12 10:07:45 +09:00
Nobuyoshi Nakada ed90ec3e0d
Clear current argument name at empty block argument [Bug #16343] 2019-11-12 09:40:18 +09:00
Yusuke Endoh 9594f57f3d test/ruby/test_require.rb: Remove the tests of require with $SAFE
The taint mechanism is decided to be removed at 2.7.  [Feature #16131]
So, this change removes the tests that expects a SecurityError when
requiring a file under $SAFE >= 1.

The reason why they should be removed in advance is because the upstream
of rubygems has already removed a call to "untaint" method, which makes
the tests fail.
2019-11-12 08:31:13 +09:00
Kazuhiro NISHIYAMA 9d3213ac85
Skip test_validate_gemspec unless git installed 2019-11-11 19:03:43 +09:00
NARUSE, Yui fd69f82675 Revert "Warn EOF char in comment"
This reverts commit 69ec3f70fa.
2019-11-11 17:37:21 +09:00
NARUSE, Yui ba5b51ca59 Revert "Elaborated EOF char message a little"
This reverts commit 6eaac7cfac.
2019-11-11 17:37:14 +09:00
Hiroshi SHIBATA 7d463e360b Merge RubyGems 3.1.0.pre3
* Fix gem pristine not accounting for user installed gems. Pull request
    #2914 by Luis Sagastume.
  * Refactor keyword argument test for Ruby 2.7. Pull request #2947 by
    SHIBATA Hiroshi.
  * Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi
    Nakada.
  * Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans.
  * Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez.
  * Clarify symlink conditionals in tests. Pull request #2962 by David
    Rodríguez.
  * Update command line parsing to work under ps. Pull request #2966 by
    David Rodríguez.
  * Properly test `Gem::Specifications.stub_for`. Pull request #2970 by
    David Rodríguez.
  * Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request
    #2985 by MSP-Greg.
2019-11-11 16:59:49 +09:00
Nobuyoshi Nakada 6eaac7cfac
Elaborated EOF char message a little 2019-11-11 12:57:40 +09:00
Nobuyoshi Nakada 390293525a
Remove binary data at installation
And revert "Relaxed warning assertions",
6f9be8505d.
2019-11-11 12:20:03 +09:00
Nobuyoshi Nakada 6f9be8505d
Relaxed warning assertions 2019-11-11 12:09:19 +09:00
Nobuyoshi Nakada 69ec3f70fa
Warn EOF char in comment 2019-11-11 09:59:40 +09:00
Nobuyoshi Nakada ade0388894
Fixed embedded document with EOF char 2019-11-11 09:38:14 +09:00
Nobuyoshi Nakada b5dff926e7
Prefer assert_syntax_error and assert_valid_syntax 2019-11-11 09:16:00 +09:00
Takashi Kokubun a733893939
Fix uplevel of test_jit 2019-11-10 14:12:13 -08:00
Takashi Kokubun fcd9bc28e3
qsymbols and symbols should be colored as Symbol 2019-11-10 13:54:44 -08:00
Takashi Kokubun 25c53a8eec
Colorize on_symbols_beg (%I) 2019-11-10 13:41:41 -08:00
Takashi Kokubun b5996b25ae
Colorize string quotes as bold
like pry
2019-11-10 13:33:23 -08:00
Kazuki Tsujimoto 6e70fa49b1
Disallow omission of parentheses/brackets in single line pattern matching [Feature #16182] 2019-11-10 22:34:49 +09:00
Takashi Kokubun 4570284ce1
Test opt_invokebuiltin_delegate_leave in test_jit 2019-11-09 21:56:38 -08:00
Takashi Kokubun 5c168c7e7f
Support RB_BUILTIN in ISeq#to_a 2019-11-09 21:40:38 -08:00
Takashi Kokubun 0483d01f6b
Test invokebuiltin in test_jit
ISeq#to_a is commented out because it's broken now
2019-11-09 21:16:16 -08:00
Takashi Kokubun e0094df29d
Extend sleep duration for Solaris 2019-11-09 13:22:51 -08:00
David Rodríguez f48655d04d Remove unneeded exec bits from some files
I noticed that some files in rubygems were executable, and I could think
of no reason why they should be.

In general, I think ruby files should never have the executable bit set
unless they include a shebang, so I run the following command over the
whole repo:

```bash
find . -name '*.rb' -type f -executable -exec bash -c 'grep -L "^#!" $1 || chmod -x $1' _ {} \;
```
2019-11-09 21:36:30 +09:00
Kazuki Tsujimoto 79f0e7aafd
Fix typos 2019-11-09 21:12:29 +09:00
John Hawthorn 3b6954f8b9 Fix passing actual object_id to finalizer
Previously we were passing the memory_id. This was broken previously if
compaction was run (which changes the memory_id) and now that object_id
is a monotonically increasing number it was always broken.

This commit fixes this by defering removal from the object_id table
until finalizers have run (for objects with finalizers) and also copying
the SEEN_OBJ_ID flag onto the zombie objects.
2019-11-08 12:41:05 -08:00