aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Suppress uninitialized instance variable warnings [ci skip]Nobuyoshi Nakada2019-08-301-4/+2
|
* Support revision in git-svn logNobuyoshi Nakada2019-08-301-6/+29
|
* Updated comment of VCS#get_revisions [ci skip]Nobuyoshi Nakada2019-08-301-2/+5
|
* Workaround for https://reviews.llvm.org/D25824卜部昌平2019-08-302-7/+7
| | | | This changeset make it possible to use very old clang.
* lib/pp.rb: Use UnboundMethod#bind_call instead of .bind(obj).call(...)Yusuke Endoh2019-08-302-6/+6
| | | | Related to [Feature #15955].
* spec/ruby/core/unboundmethod/bind_call_spec.rb: AddedYusuke Endoh2019-08-301-0/+50
| | | | | For UnboundMethod#bind_call [Feature #15955] introduced in 002e592e0d67bb0271d16314a32380ad947c9ae9.
* proc.c: Add UnboundMethod#bind_callYusuke Endoh2019-08-303-31/+109
| | | | | | | | | | | | | | | | | | | | | | | | | `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 ```
* require 'pp' before use PPKazuhiro NISHIYAMA2019-08-302-1/+5
| | | | | | | `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`
* Move pread + pwrite tests out of RUBY_ENGINE blockCharles Oliver Nutter2019-08-301-20/+20
| | | 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.
* Add some NODE information for lldbAaron Patterson2019-08-291-0/+6
| | | | | Just adds a conditional in the lldb scripts so we can more easily debug NODE objects.
* Add word "Euler's number" to Math::E docsschneems2019-08-291-1/+1
| | | | 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.
* 7z does not accept gzip's optionsKazuhiro NISHIYAMA2019-08-301-2/+1
| | | | e.g. `GZIP=-9`
* * 2019-08-30 [ci skip]git2019-08-301-1/+1
|
* Disallow use of attrset symbols as Struct membersJeremy Evans2019-08-292-0/+7
| | | | Fixes [Bug #11326]
* Refined warnings against literal in flip-flopNobuyoshi Nakada2019-08-292-62/+48
|
* NEWS: [Feature #16035] [ci skip]Nobuyoshi Nakada2019-08-291-0/+7
|
* Don't pick up lib/readline.rb from ruby/relineaycabta2019-08-291-2/+1
|
* Check events that console window size changed on Windowsaycabta2019-08-291-0/+17
|
* Fix alignment of a SHORT variableaycabta2019-08-291-1/+1
| | | | | | | | | | | | | | | | | 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.
* CONSOLE_SCREEN_BUFFER_INFO is 22bytesaycabta2019-08-291-2/+2
| | | | | | | | | | 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;
* Allow non-finalizable objects in ObjectSpace::WeakMapJean Boussier2019-08-292-21/+30
| | | | | | | | | | [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
* Rule out gcc on Windows卜部昌平2019-08-292-0/+27
| | | | | | | | 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
* drop-in type check for rb_define_singleton_method卜部昌平2019-08-2916-150/+269
| | | | | | 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.
* drop-in type check for rb_define_private_method卜部昌平2019-08-294-14/+70
| | | | | | | 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.
* drop-in type check for rb_define_protected_method卜部昌平2019-08-292-0/+44
| | | | | | 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.
* drop-in type check for rb_define_method_id卜部昌平2019-08-293-3/+69
| | | | | | 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.
* move docs around [ci skip]卜部昌平2019-08-297-451/+448
| | | | To properly generate documents.
* drop-in type check for rb_define_global_function卜部昌平2019-08-2913-38/+140
| | | | | | We can check the function pointer passed to rb_define_global_function like we do so in rb_define_method. It turns out that almost anybody is misunderstanding the API.
* drop-in type check for rb_define_module_function卜部昌平2019-08-297-28/+94
| | | | | | We can check the function pointer passed to rb_define_module_function like how we do so in rb_define_method. The difference is that this changeset reveales lots of atiry mismatches.
* drop-in type check for rb_define_method卜部昌平2019-08-295-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rb_define_method function takes a pointer to ANYARGS-ed functions, which in fact varies 18 different prototypes. We still need to preserve ANYARGS for storages but why not check the consistencies if possible. Q&As: Q: Where did the magic number "18" came from in the description above? A: Count the case branch of vm_method.c:call_cfunc_invoker_func(). Note also that the 18 branches has lasted for at least 25 years. See also 200e0ee2fd3c1c006c528874a88f684447215524. Q: What is this __weakref__ thing? A: That is a kind of function overloading mechanism that GCC provides. In this case for instance rb_define_method0 is an alias of rb_define_method, with a strong type. Q: What is this __transparent_union__ thing? A: That is another kind of function overloading mechanism that GCC provides. In this case the attributed function pointer is either VALUE(*)(int,VALUE*,VALUE) or VALUE(*)(int,const VALUE*,VALUE). This is better than void* or ANYARGS because we can reject all other possibilities than the two. Q: What does this rb_define_method macro mean? A: It selects appropriate alias of the rb_define_method function, depending on the arity. Q: Why the prototype change of rb_f_notimplement? A: Function pointer to rb_f_notimplement is special cased in vm_method.c:rb_add_method_cfunc(). That should be handled by the __builtin_choose_expr chain inside of rb_define_method macro expansion. In order to do so, comparison like (func == rb_f_notimplement) is inappropriate for __builtin_choose_expr's expression (which must be a compile-time integer constant but the address of rb_f_notimplement is not fixed until the linker). So instead we are using __builtin_types_compatible_p, and in doing so we need to distinguish rb_f_notimplement from others, by type.
* fix arity of bug_start卜部昌平2019-08-291-1/+1
| | | | | This is just a trivial mistake introduced in 0f36e8fc03a5c6433972d6bb5f177d5f6e106bac.
* fix arity of rb_mutex_synchronize_m卜部昌平2019-08-291-1/+1
| | | | | This is just a trivial mistake introduced in 6c56dae4b23c5c50e351758538141ca26b9aba40.
* Freeze method reference operator objectNobuyoshi Nakada2019-08-292-0/+5
| | | | [Feature #16103]
* Revert "Add pipeline operator [Feature #15799]"Nobuyoshi Nakada2019-08-296-64/+2
| | | | | | | | | | | | | This reverts commits: * d365fd5a024254d7c105a62a015a7ea29ccf3e5d * d780c3662484d6072b3a6945b840049de72c2096 * aa7211836b769231a2a8ef6b6ec2fd0ec882ef29 * 043f010c28e82ea38978bf8ed885416f133b5b75 * bb4dd7c6af05c7821d572e2592ea3d0cc748d81f * 043f010c28e82ea38978bf8ed885416f133b5b75 * f169043d81524b5b529f2c1e9c35437ba5bc3a7a http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/94645
* Add stub set_screen_size for other platformsaycabta2019-08-292-0/+6
|
* * 2019-08-29 [ci skip]git2019-08-291-1/+1
|
* Support SIGWINCHaycabta2019-08-292-0/+10
|
* Replace numbered parameters with named parameters [ci skip]Kazuhiro NISHIYAMA2019-08-291-1/+1
|
* Show the previous definition location,Nobuyoshi Nakada2019-08-293-12/+36
| | | | | when reopened class/module redefinition mismatched the previous definition. [Feature #11460]
* Fixed a comment [ci skip]Nobuyoshi Nakada2019-08-291-1/+1
| | | | | | A range literal in conditional expression is turned into a flip-flop, as a Range object is never falsy and does not make a sense.
* Aseert exception at negative step for non-endless range tooNobuyoshi Nakada2019-08-291-0/+1
|
* Revert "Remove warnings of flip-flop deprecation from tests and specs"Nobuyoshi Nakada2019-08-295-30/+12
| | | | | | | | This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3. flip-flop is no longer deprecated. [Feature #5400]
* Document {n}? regexp pattern is optional and not non-greedy [ci skip]Jeremy Evans2019-08-281-2/+5
| | | | | | | While not consistent with {n,}?, {,m}?, and {n,m}?, it is arguably more useful, as otherwise the ? would have no effect. Fixes [Bug #15583]
* Remove jquery.js from file list of rdoc.gemspecaycabta2019-08-281-1/+1
|
* Revert "Treat RUBY_REVISION as an integer on old rubies"Nobuyoshi Nakada2019-08-281-8/+4
| | | | | | | | This reverts commit 6454808c52fff445ff09fefb0fb96988f82aaa3c. It is no longer needed, as `VCS::SVN#get_revisions` now returns `Integer` as revision numbers, and `short_revision` should deal with it.
* Fix warningsNobuyoshi Nakada2019-08-281-1/+1
| | | | `_FILE_OFFSET_BITS` should be defined before system headers.
* Adjusted indents and supplied last commasNobuyoshi Nakada2019-08-281-48/+70
| | | | | Fixed unmatched indent of the closing bracket for `:irb_current_working_workspace`, and adjusted following elements.
* `revision` might be an IntegerNAKAMURA Usaku2019-08-281-2/+2
|
* tool/merger.rb: fix tag existence check with subversion.nagachika2019-08-281-1/+4
|
* Ensure the last and changed revisions as IntegersNobuyoshi Nakada2019-08-281-2/+2
|