summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-30Support **nil syntax for specifying a method does not accept keyword argumentsJeremy Evans
This syntax means the method should be treated as a method that uses keyword arguments, but no specific keyword arguments are supported, and therefore calling the method with keyword arguments will raise an ArgumentError. It is still allowed to double splat an empty hash when calling the method, as that does not pass any keyword arguments. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Set symbol export for rb_hash_stlike_foreachJeremy Evans
This fixes MJIT after rb_hash_stlike_foreach used vm_args.c. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Restore splitting of hashes into positional and keyword arguments, add warningJeremy Evans
This restores compatibility with Ruby 2.6, splitting the last positional hash into positional and keyword arguments if it contains both symbol and non-symbol keys. However, in this case it will warn, as the behavior in Ruby 3 will be to not split the hash and keep it as a positional argument. This does not affect the handling of mixed symbol and non-symbol keys in bare keywords. Those are still treated as keywords now, as they were before this patch. This results in different behavior than Ruby 2.6, which would split the bare keywords and use the non-Symbol keys as a positional arguments. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Fix test after keyword argument separationJeremy Evans
Now that keyword splats accept non-Symbols, the type of exception changes. Previously, a TypeError (hash key "k1" is not a Symbol) was raised for this test, but now an ArgumentError (unknown keyword: "k1") is raised. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Update tests to fix warning message changesJeremy Evans
Now that keyword splats accept non-Symbols, the inspect value of the keyword is used instead of the string value. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Only promote last hash to keyword if all keys are symbolsJeremy Evans
If all keys are not symbols, then the non-symbol keys would not be treated as keywords in previous versions. It doesn't make sense to treat these hashes as keywords to break compatibility and warn about behavior changes in Ruby 2.7 when the Ruby 3.0 behavior will be the same as the Ruby 2.6 for these hashes. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Fix keyword argument separation warnings in testJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Fix keyword argument separation issues in libJeremy Evans
Mostly requires adding ** in either calls or method definitions. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Fix hash to keyword warning to apply in all casesJeremy Evans
Previously, it only applied if the call had more positional arguments than the method it was calling accepted. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Allow ** syntax to be used for calling methods that do not accept keywordsJeremy Evans
Treat the ** syntax as passing a copy of the hash as the last positional argument. If the hash being double splatted is empty, do not add a positional argument. Remove rb_no_keyword_hash, no longer needed. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Separate keyword arguments from positional argumentsYusuke Endoh
And, allow non-symbol keys as a keyword arugment Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-30Split CC_LINKER_ARGS from CC_DLDFLAGS_ARGSTakashi Kokubun
to drop MJIT_DLDFLAGS from compile_c_to_o for OpenBSD failure https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd65/ruby-master/log/20190830T110008Z.fail.html.gz. 8c7f4e8f8b7f9e74195ea0eb51f39014fec342c0 did not work for i686-linux https://travis-ci.org/ruby/ruby/jobs/578808112.
2019-08-30Try dropping DLDFLAGS from compile_c_to_oTakashi Kokubun
I think this did not work for some environments, but this seems to fix OpenBSD RubyCI failure: https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd65/ruby-master/log/20190830T110008Z.fail.html.gz Let me check RubyCI impact by this.
2019-08-30Make the dot-colon method reference frozenMaciej Mensfeld
[Feature #16103] Close: https://github.com/ruby/ruby/pull/2267
2019-08-30Revert "require 'pp' before use PP"Kazuhiro NISHIYAMA
of lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb. This reverts commit 500149709b92ccb36396589a0c39afb3ff77bfb6 partially.
2019-08-30Removed debug printNobuyoshi Nakada
It seems to be fixed by b870ca58791e576f5dbb263f54ae433a7f6d65ee.
2019-08-30Add guard as same as `==`Kazuhiro NISHIYAMA
Try to fix failure at https://github.com/ruby/ruby/runs/207580232#step:10:382 ``` undefined method `name' for "Gemfile.lock":String /home/runner/work/ruby/ruby/lib/bundler/resolver/spec_group.rb:65:in `eql?' ```
2019-08-30Constified local variable `translator`Nobuyoshi Nakada
2019-08-30Adjust indent [ci skip]Nobuyoshi Nakada
2019-08-30[DOC] Return obj may be different from 1st argument [ci skip]Kazuhiro NISHIYAMA
2019-08-30spec/ruby/core/unboundmethod/bind_call_spec.rb: Add ruby_version_is guardYusuke Endoh
2019-08-30Exclude ripper y.output from packages [ci skip]Nobuyoshi Nakada
2019-08-30Export the last modified revision for tags [ci skip]Nobuyoshi Nakada
2019-08-30Suppress uninitialized instance variable warnings [ci skip]Nobuyoshi Nakada
2019-08-30Support revision in git-svn logNobuyoshi Nakada
2019-08-30Updated comment of VCS#get_revisions [ci skip]Nobuyoshi Nakada
2019-08-30Workaround for https://reviews.llvm.org/D25824卜部昌平
This changeset make it possible to use very old clang.
2019-08-30lib/pp.rb: Use UnboundMethod#bind_call instead of .bind(obj).call(...)Yusuke Endoh
Related to [Feature #15955].
2019-08-30spec/ruby/core/unboundmethod/bind_call_spec.rb: AddedYusuke Endoh
For UnboundMethod#bind_call [Feature #15955] introduced in 002e592e0d67bb0271d16314a32380ad947c9ae9.
2019-08-30proc.c: Add UnboundMethod#bind_callYusuke Endoh
`umethod.bind_call(obj, ...)` is semantically equivalent to `umethod.bind(obj).call(...)`. This idiom is used in some libraries to call a method that is overridden. The added method does the same without allocation of intermediate Method object. [Feature #15955] ``` class Foo def add_1(x) x + 1 end end class Bar < Foo def add_1(x) # override x + 2 end end obj = Bar.new p obj.add_1(1) #=> 3 p Foo.instance_method(:add_1).bind(obj).call(1) #=> 2 p Foo.instance_method(:add_1).bind_call(obj, 1) #=> 2 ```
2019-08-30require 'pp' before use PPKazuhiro NISHIYAMA
`Kernel#pp` has wrapper, but `PP` does not. https://github.com/ruby/ruby/runs/207405029#step:10:141 `NameError: uninitialized constant Bundler::Molinillo::Resolver::Resolution::PP`
2019-08-30Move pread + pwrite tests out of RUBY_ENGINE blockCharles Oliver Nutter
These tests were guarded by a RUBY_ENGINE of "ruby" even though they test an official Ruby feature (pread/pwrite added in Ruby 2.5). This commit moves them to the top level of the test case so they will run on other implementations. Notes: Merged: https://github.com/ruby/ruby/pull/2412
2019-08-29Add some NODE information for lldbAaron Patterson
Just adds a conditional in the lldb scripts so we can more easily debug NODE objects.
2019-08-29Add word "Euler's number" to Math::E docsschneems
When searching for this constant, I landed on the correct page https://ruby-doc.org/core-2.6.4/Math.html however I was using CMD+f to search for "Euler" and did not find it. If we add the full name for this constant then it will be easier to search for and find. Notes: Merged: https://github.com/ruby/ruby/pull/2411
2019-08-307z does not accept gzip's optionsKazuhiro NISHIYAMA
e.g. `GZIP=-9`
2019-08-30* 2019-08-30 [ci skip]git
2019-08-29Disallow use of attrset symbols as Struct membersJeremy Evans
Fixes [Bug #11326]
2019-08-29Refined warnings against literal in flip-flopNobuyoshi Nakada
2019-08-29NEWS: [Feature #16035] [ci skip]Nobuyoshi Nakada
2019-08-29Don't pick up lib/readline.rb from ruby/relineaycabta
2019-08-29Check events that console window size changed on Windowsaycabta
2019-08-29Fix alignment of a SHORT variableaycabta
typedef struct _COORD { SHORT X; SHORT Y; // I wanted to take this... } COORD, *PCOORD; typedef struct _CONSOLE_SCREEN_BUFFER_INFO { COORD dwSize; COORD dwCursorPosition; // ...of this one WORD wAttributes; // But it's combined with first 2bytes of this SMALL_RECT srWindow; COORD dwMaximumWindowSize; } CONSOLE_SCREEN_BUFFER_INFO; If wAttributes has non-zero value, the code breaks.
2019-08-29CONSOLE_SCREEN_BUFFER_INFO is 22bytesaycabta
typedef struct _CONSOLE_SCREEN_BUFFER_INFO { COORD dwSize; // 4(SHORT X, Y) COORD dwCursorPosition; // 4 WORD wAttributes; // 2 SMALL_RECT srWindow; // 8(SHORT Left, Top, Right, Bottom) COORD dwMaximumWindowSize; // 4 } CONSOLE_SCREEN_BUFFER_INFO;
2019-08-29Allow non-finalizable objects in ObjectSpace::WeakMapJean Boussier
[feature #16035] This goes one step farther than what nobu did in [feature #13498] With this patch, special objects such as static symbols, integers, etc can be used as either key or values inside WeakMap. They simply don't have a finalizer defined on them. This is useful if you need to deduplicate value objects Notes: Merged: https://github.com/ruby/ruby/pull/2313
2019-08-29Rule out gcc on Windows卜部昌平
It seems the combination fails at the moment. Don't know exactly why but I suspect there can be issues in resolving weak references. Let's rule them out for now. https://ci.appveyor.com/project/ruby/ruby/builds/27036383/job/x3c5d54839aacoyt
2019-08-29drop-in type check for rb_define_singleton_method卜部昌平
We can check the function pointer passed to rb_define_singleton_method like how we do so in rb_define_method. Doing so revealed many arity mismatches.
2019-08-29drop-in type check for rb_define_private_method卜部昌平
We can check the function pointer passed to rb_define_private_method like how we do so in rb_define_method. Doing so revealed some problematic usages of rb_obj_dummy. They had to be split according to their arity.
2019-08-29drop-in type check for rb_define_protected_method卜部昌平
We can check the function pointer passed to rb_define_protected_method like how we do so in rb_define_method. This changeset revealed no prototypes mismatches.
2019-08-29drop-in type check for rb_define_method_id卜部昌平
We can check the function pointer passed to rb_define_method_id like how we do so in rb_define_method. This method is relatively rarely used so there are less problems found than the other APIs.
2019-08-29move docs around [ci skip]卜部昌平
To properly generate documents.