AgeCommit message (Collapse)Author
2019-11-29`LoadError` is not a subclass of `StandardError`Nobuyoshi Nakada
2019-11-29Skip useless testNobuyoshi Nakada
`JSONGeneratorTest#test_remove_const_seg` is meaningful only for the extension library version, but nonsense for pure ruby version.
2019-11-29Fixed the position in NEWS [Feature #16348]Nobuyoshi Nakada
[ci skip]
2019-11-29Nmake needs `VPATH`Nobuyoshi Nakada
2019-11-29Add dependency on bundled yaml.h when usingNobuyoshi Nakada
2019-11-29export func for MJITKoichi Sasada
2019-11-29Revert "export for MJIT"Koichi Sasada
This reverts commit 2e6f1cf8b264f4c8499c4e5f18bf662fdade04ff.
2019-11-29Revert "* remove trailing spaces. [ci skip]"Koichi Sasada
This reverts commit 27d0d7c0d39076d4bbacd3c3f3864322699db7b4.
2019-11-29* remove trailing spaces. [ci skip]git
2019-11-29export for MJITKoichi Sasada
2019-11-29* 2019-11-29 [ci skip]git
2019-11-29* remove trailing spaces. [ci skip]git
2019-11-29fastpath for ivar read of FL_EXIVAR objects.Koichi Sasada
vm_getivar() provides fastpath for T_OBJECT by caching an index of ivar. This patch also provides fastpath for FL_EXIVAR objects. FL_EXIVAR objects have an each ivar array and index can be cached as T_OBJECT. To access this ivar array, generic_iv_tbl is exposed by rb_ivar_generic_ivtbl() (declared in variable.h which is newly introduced). Benchmark script: Benchmark.driver(repeat_count: 3){|x| x.executable name: 'clean', command: %w'../clean/miniruby' x.executable name: 'trunk', command: %w'./miniruby' objs = [, 'str', {a: 1, b: 2}, [1, 2]] objs.each.with_index{|obj, i| rep = obj.inspect rep = '' if /\#/ =~ rep x.prelude str = %Q{ v#{i} = #{rep} def v#{i}.foo @iv # ivar access method (attr_reader) end v#{i}.instance_variable_set(:@iv, :iv) } puts str %Q{ v#{i}.foo } } } Result: # T_OBJECT clean: 85387141.8 i/s trunk: 85249373.6 i/s - 1.00x slower # T_STRING trunk: 57894407.5 i/s clean: 39957178.6 i/s - 1.45x slower # T_HASH trunk: 56629413.2 i/s clean: 39227088.9 i/s - 1.44x slower # T_ARRAY trunk: 55797530.2 i/s clean: 38263572.9 i/s - 1.46x slower
2019-11-28Added Symbol#start_with? and Symbol#end_with? method. [Feature #16348]NARUSE, Yui
2019-11-28Use more template feature of w.r-l.oNARUSE, Yui
2019-11-28Get rid of inadvertent label [ci skip]Nobuyoshi Nakada
2019-11-28Merged common statements [Bug #16242]Nobuyoshi Nakada
2019-11-28Removed unused variable [Bug #16242]Nobuyoshi Nakada
2019-11-28Make prepending a refined module after inclusion not break refinementsJeremy Evans
After the previous commit, this was still broken. The reason it was broken is that a refined module that hasn't been prepended to yet keeps the refined methods in the module's method table. When prepending, the module's method table is moved to the origin iclass, and then the refined methods are moved from the method table to a new method table in the module itself. Unfortunately, that means that if a class has included the module, prepending breaks the refinements, because when the methods are moved from the origin iclass method table to the module method table, they are removed from the method table from the iclass created when the module was included earlier. Fix this by always creating an origin class when including a module that has any refinements, even if the refinements are not currently used. I wasn't sure the best way to do that. The approach I choose was to use an object flag. The flag is set on the module when Module#refine is called, and if the flag is present when the module is included in another module or class, an origin iclass is created for the module. Fixes [Bug #13446] Notes: Merged:
2019-11-28Honor refinements for modules that prepend other modulesJeremy Evans
This previously did not work, and the reason it did not work is that: 1) Refining a module or class that prepends other modules places the refinements in the class itself and not the origin iclass. 2) Inclusion of a module that prepends other modules skips the module itself, including only iclasses for the prepended modules and the origin iclass. Those two behaviors combined meant that the method table for the refined methods for the included module never ends up in the method lookup chain for the class including the module. Fix this by not skipping the module itself when the module is included. This requires some code rearranging in rb_include_class_new to make sure the correct method tables and origin settings are used for the created iclass. As origin iclasses shouldn't be exposed to Ruby, this also requires skipping modules that have origin iclasses in Module#ancestors (classes that have origin iclasses were already skipped). Fixes [Bug #16242] Notes: Merged:
2019-11-28Add require "irb" to test/irb/test_completion.rbaycabta
2019-11-28Fix regexp to complete complex literalaycabta
IRB completion logic always needed exponential notation for complex literal such as 3e6i but it's bug. I fixed to support complex literal without exponential notation such as 3i.
2019-11-28Raise `NoMatchingPatternError` when expr `in` pat doesn't matchNobuyoshi Nakada
* `expr in pattern` should raise `NoMatchingError` when unmatched * `expr in pattern` should return `nil`. (this is unspecified, but this feature is experimental, at all) [Feature #16355]
2019-11-27Fix documentation of `MonitorMixin#new_cond` [ci skip] (#2707)y-yagi
Since, `new_cond` uses the Monitor object, not the receiver.
2019-11-28Suppress strict-aliasing warning by x86_64-w64-mingw32-gcc 7.4.0Nobuyoshi Nakada
2019-11-28Delete newline when C-k on emacs mode at EOLaycabta
2019-11-28Remove two removed constantsaycabta
2019-11-28Fix ghost method line noaycabta
2019-11-27Update documentation for ruby2_keywords [ci skip]Jeremy Evans
2019-11-27Drop windows-2016 on GitHub ActionsKazuhiro NISHIYAMA > Note: The Windows Server 2016 virtual environment will be removed on December 3, 2019. Notes: Merged:
2019-11-28* 2019-11-28 [ci skip]git
2019-11-27Don't modify rest array when using ruby2_keywordsJeremy Evans
Previously, the rest array was modified, but it turns out that is not necessary. Not modifying the rest array fixes cases when the rest array is used more than once. Notes: Merged:
2019-11-27prefer class_serial over m_tbl卜部昌平
Decades ago, among all the data that a class has, its method table was no doubt the most frequently accessed data. Previous data structures were based on that assumption. Today that is no longer true. The most frequently accessed field moved to class_serial. That field is not always as wide as VALUE but if it is, let us swap m_tbl and class_serial. Calculating ------------------------------------- ours trunk Optcarrot Lan_Master.nes 47.363 46.630 fps Comparison: Optcarrot Lan_Master.nes ours: 47.4 fps trunk: 46.6 fps - 1.02x slower Notes: Merged:
2019-11-27* 2019-11-27 [ci skip]git
2019-11-27rename __builtin_inline!(code) and introduce others.Koichi Sasada
rename __builtin_inline!(code) to __builtin_cstmt(code). Also this commit introduce the following inlining C code features. * __builtin_cstmt!(STMT) (renamed from __builtin_inline!) Define a function which run STMT implicitly and call this function at evatuation time. Note that you need to return some value in STMT. If there is a local variables (includes method parameters), you can read these values. static VALUE func(ec, self) { VALUE x = ...; STMT } Usage: def double a # a is readable from C code. __builtin_cstmt! 'return INT2FIX(FIX2INT(a) * 2);' end * __builtin_cexpr!(EXPR) Define a function which invoke EXPR implicitly like `__builtin_cstmt!`. Different from cstmt!, which compiled with `return EXPR;`. (`return` and `;` are added implicitly) static VALUE func(ec, self) { VALUE x = ...; return EXPPR; } Usage: def double a __builtin_cexpr! 'INT2FIX(FIX2INT(a) * 2)' end * __builtin_cconst!(EXPR) Define a function which invoke EXPR implicitly like cexpr!. However, the function is called once at compile time, not evaluated time. Any local variables are not accessible (because there is no local variable at compile time). Usage: GCC = __builtin_cconst! '__GNUC__' * __builtin_cinit!(STMT) STMT are writtein in auto-generated code. This code does not return any value. Usage: __builtin_cinit! '#include <zlib.h>' def no_compression? __builtin_cconst! 'Z_NO_COMPRESSION ? Qtrue : Qfalse' end
2019-11-26[ripper] Fixed unique key check in pattern matchingNobuyoshi Nakada
Check keys * by an internal table, instead of unstable dispatched results * and by parsed key values, instead of escaped forms in the source
2019-11-26Hoisted out `push_pvtbl`/`pop_pvtbl`Nobuyoshi Nakada
2019-11-26Wrap `p_kw` in an array at `p_kwarg`Nobuyoshi Nakada
Not in `p_kw` itself, which makes key and variable/expr pair only now.
2019-11-26Allow `$10` and more in the Ripper DSLNobuyoshi Nakada
2019-11-26Write rbinc files to the source directoryNobuyoshi Nakada
Update the target file itself of the dependency on this script. Fall back to the current working directory if unwritable.
2019-11-26Remove an unnecessary variableaycabta
2019-11-26Add sync task for ruby/opensslHiroshi SHIBATA
2019-11-26Slightly fix the warning message [ci skip]Takashi Kokubun
I'm not sure, but maybe it was gramatically incorrect?
2019-11-26Suggest an alternative to suppress the irb warningTakashi Kokubun
2019-11-26Add `--with-openssl-dir` to windows on GitHub ActionsKazuhiro NISHIYAMA ``` *** Following extensions are not compiled: openssl: Could not be configured. It will not be installed. " d:/a/ruby/ruby/src/ext/openssl/extconf.rb:97: OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed." ```
2019-11-26* 2019-11-26 [ci skip]git
2019-11-26Fix `$(RMALL) -r` on WindowsNAKAMURA Usaku
`set recursive=1 &` sets `1 ` to `recursive`, not `1`.
2019-11-25[ripper] Quoted label without expression must be a local variableNobuyoshi Nakada
The difference from 0b8c73aa65add5c57b46b0cfdf4e661508802172 is to add the result of `string_add` event to marking objects. ```C RNODE($1)->nd_rval = add_mark_object(p, $$); ``` improved dump of SymbolNobuyoshi Nakada
[ci skip]
2019-11-25Improve consistency of bool/true/falseKazuhiro NISHIYAMA