summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2022-12-05Add shape_id to heap dumpJemma Issroff
Notes: Merged: https://github.com/ruby/ruby/pull/6864
2022-12-05[ruby/bigdecimal] Bump version to 3.1.3Hiroshi SHIBATA
https://github.com/ruby/bigdecimal/commit/25a75c2033
2022-12-05[ruby/zlib] Bump version to 3.0.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/f1ce5e3e8d
2022-12-05[ruby/win32ole] Bump version to 1.8.9Hiroshi SHIBATA
https://github.com/ruby/win32ole/commit/e4a1f3a2bf
2022-12-05[ruby/stringio] Revert "Bump version to 3.0.4"Hiroshi SHIBATA
This reverts commit https://github.com/ruby/stringio/commit/aeb7e1a0bde6. https://github.com/ruby/stringio/commit/003dd0d003
2022-12-05[ruby/stringio] Bump version to 3.0.4Hiroshi SHIBATA
https://github.com/ruby/stringio/commit/aeb7e1a0bd
2022-12-05[ruby/psych] Bump version to 5.0.0Hiroshi SHIBATA
https://github.com/ruby/psych/commit/4fed0941b9
2022-12-05[ruby/pathname] Bump version to 0.2.1Hiroshi SHIBATA
https://github.com/ruby/pathname/commit/7e796cc78e
2022-12-05[ruby/nkf] Bump version to 0.1.2Hiroshi SHIBATA
https://github.com/ruby/nkf/commit/98607bd2be
2022-12-05[ruby/io-nonblock] Bump version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/io-nonblock/commit/46c0ec245e
2022-12-05[ruby/fcntl] Bump version to 1.0.2Hiroshi SHIBATA
https://github.com/ruby/fcntl/commit/20fd776303
2022-12-05[ruby/etc] Bump version to 1.4.1Hiroshi SHIBATA
https://github.com/ruby/etc/commit/b3e9d9ceb0
2022-12-05[ruby/digest] Bump version to 3.1.1Hiroshi SHIBATA
https://github.com/ruby/digest/commit/fad16582ea
2022-12-05[ruby/date] Bump version to 3.3.0Hiroshi SHIBATA
https://github.com/ruby/date/commit/ac1642cf39
2022-12-03[ruby/pathname] [Misc #19155] [DOC] Addion of absolute pathsNobuyoshi Nakada
https://github.com/ruby/pathname/commit/3cb5ed2576
2022-12-02[ruby/io-console] Check rawmode option names strictlyNobuyoshi Nakada
https://github.com/ruby/io-console/commit/aa8fc7e947
2022-12-02Introduce encoding check macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/6700
2022-11-30Removed documentation for incomplete option about [Feature #17134]Hiroshi SHIBATA
2022-11-27[ruby/erb] Skip using the extension for truffleruby as wellTakashi Kokubun
(https://github.com/ruby/erb/pull/39) * Skip using the extension for truffleruby as well * Just skip building the C extension for TruffleRuby * Skip rake compile for truffleruby * Use resolve_feature_path * Revert "Use resolve_feature_path" This reverts commit https://github.com/ruby/erb/commit/acc1e0c0ffaf. * Use resolve_feature_path with LoadError guard https://github.com/ruby/erb/commit/85dcb08439
2022-11-26[ruby/erb] Define ERB::Escape moduleTakashi Kokubun
(https://github.com/ruby/erb/pull/38) Close #32
2022-11-25[ruby/erb] Keep ERB::Util#html_escape privateTakashi Kokubun
ERB::Util.html_escape has been public, but ERB::Util#html_escape had been private. https://github.com/ruby/erb/commit/e62210bf56
2022-11-25Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-24[ruby/erb] Rename erb.so to erb/escape.soTakashi Kokubun
(https://github.com/ruby/erb/pull/35) https://github.com/ruby/erb/commit/1280046952
2022-11-21Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6777
2022-11-20Fix typos (#6775)Yudai Takada
* s/Innteger/Integer/ * s/diretory/directory/ * s/Bufer/Buffer/ * s/defalt/default/ * s/covearge/coverage/ Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2022-11-21Enhance keep_tokens option for RubyVM::AbstractSyntaxTree parsing methodsyui-knk
Implementation for Language Server Protocol (LSP) sometimes needs token information. For example both `m(1)` and `m(1, )` has same AST structure other than node locations then it's impossible to check the existence of `,` from AST. However in later case, it might be better to suggest variables list for the second argument. Token information is important for such case. This commit adds these methods. * Add `keep_tokens` option for `RubyVM::AbstractSyntaxTree.parse`, `.parse_file` and `.of` * Add `RubyVM::AbstractSyntaxTree::Node#tokens` which returns tokens for the node including tokens for descendants nodes. * Add `RubyVM::AbstractSyntaxTree::Node#all_tokens` which returns all tokens for the input script regardless the receiver node. [Feature #19070] Impacts on memory usage and performance are below: Memory usage: ``` $ cat test.rb root = RubyVM::AbstractSyntaxTree.parse_file(File.expand_path('../test/ruby/test_keyword.rb', __FILE__), keep_tokens: true) $ /usr/bin/time -f %Mkb /usr/local/bin/ruby -v ruby 3.2.0dev (2022-11-19T09:41:54Z 19070-keep_tokens d3af1b8057) [x86_64-linux] 11408kb # keep_tokens :false $ /usr/bin/time -f %Mkb /usr/local/bin/ruby test.rb 17508kb # keep_tokens :true $ /usr/bin/time -f %Mkb /usr/local/bin/ruby test.rb 30960kb ``` Performance: ``` $ cat ../ast_keep_tokens.yml prelude: | src = <<~SRC module M class C def m1(a, b) 1 + a + b end end end SRC benchmark: without_keep_tokens: | RubyVM::AbstractSyntaxTree.parse(src, keep_tokens: false) with_keep_tokens: | RubyVM::AbstractSyntaxTree.parse(src, keep_tokens: true) $ make benchmark COMPARE_RUBY="./ruby" ARGS=../ast_keep_tokens.yml /home/kaneko.y/.rbenv/shims/ruby --disable=gems -rrubygems -I../benchmark/lib ../benchmark/benchmark-driver/exe/benchmark-driver \ --executables="compare-ruby::./ruby -I.ext/common --disable-gem" \ --executables="built-ruby::./miniruby -I../lib -I. -I.ext/common ../tool/runruby.rb --extout=.ext -- --disable-gems --disable-gem" \ --output=markdown --output-compare -v ../ast_keep_tokens.yml compare-ruby: ruby 3.2.0dev (2022-11-19T09:41:54Z 19070-keep_tokens d3af1b8057) [x86_64-linux] built-ruby: ruby 3.2.0dev (2022-11-19T09:41:54Z 19070-keep_tokens d3af1b8057) [x86_64-linux] warming up.. | |compare-ruby|built-ruby| |:--------------------|-----------:|---------:| |without_keep_tokens | 21.659k| 21.303k| | | 1.02x| -| |with_keep_tokens | 6.220k| 5.691k| | | 1.09x| -| ``` Notes: Merged: https://github.com/ruby/ruby/pull/6770
2022-11-17Add support for `sockaddr_un` on Windows. (#6513)Samuel Williams
* Windows: Fix warning about undefined if_indextoname() * Windows: Fix UNIXSocket on MINGW and make .pair more reliable * Windows: Use nonblock=true for read tests with scheduler * Windows: Move socket detection from File.socket? to File.stat Add S_IFSOCK to Windows and interpret reparse points accordingly. Enable tests that work now. * Windows: Use wide-char functions to UNIXSocket This fixes behaviour with non-ASCII characters. It also fixes deletion of temporary UNIXSocket.pair files. * Windows: Add UNIXSocket tests for specifics of Windows impl. * Windows: fix VC build due to missing _snwprintf Avoid usage of _snwprintf, since it fails linking ruby.dll like so: linking shared-library x64-vcruntime140-ruby320.dll x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l whereas linking miniruby.exe succeeds. This patch uses snprintf on the UTF-8 string instead. Also remove branch GetWindowsDirectoryW, since it doesn't work. * Windows: Fix dangling symlink test failures Co-authored-by: Lars Kanis <kanis@comcard.de> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-11-16Clean extension build directories and exts.mk fileNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6741
2022-11-16Remove `-j` option from `MFLAGS` for sub-makesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6741
2022-11-15[ruby/bigdecimal] Add fallback definition of MAYBE_UNUSEDKenta Murata
https://github.com/ruby/bigdecimal/commit/b2123faa52
2022-11-15[ruby/bigdecimal] Replace sprintf by snprintfKenta Murata
https://github.com/ruby/bigdecimal/commit/d6f5bb40c7
2022-11-15[ruby/bigdecimal] Mark some functions MAYBE_UNUSEDKenta Murata
https://github.com/ruby/bigdecimal/commit/d70a4d53e5
2022-11-13[ruby/bigdecimal] Add specific value allocatorsKenta Murata
* Add NewZero* and NewOne* function families * Use them instead of VpAlloc for allocating 0 and 1 https://github.com/ruby/bigdecimal/commit/9276a94ac7
2022-11-13[ruby/bigdecimal] Add and use specific value allocatorsKenta Murata
* Add rbd_allocate_struct_zero for making 0.0 * Add rbd_allocate_struct_one for making 1.0 * Use them to replace VpAlloc calls * Renmae VpPt5 to VpConstPt5 https://github.com/ruby/bigdecimal/commit/40c826f5e6
2022-11-13[ruby/bigdecimal] Make VPrint function always availableKenta Murata
https://github.com/ruby/bigdecimal/commit/5391f7e92c
2022-11-13[ruby/bigdecimal] Tweak VpAllocKenta Murata
* Stop reusing mx and mf * Check szVal == NULL first * Treat special values before checking the leading `#` https://github.com/ruby/bigdecimal/commit/14f3d965f8
2022-11-13[ruby/bigdecimal] Rewrite allocation functionsKenta Murata
* Rename them * Make allocation count operations atomic https://github.com/ruby/bigdecimal/commit/a5ab34a115
2022-11-13[ruby/bigdecimal] Twak GetPrecisionInt and rename it to check_int_precisionKenta Murata
https://github.com/ruby/bigdecimal/commit/69d0588a3b
2022-11-13[ruby/bigdecimal] Tweak check_rounding_mode_optionKenta Murata
https://github.com/ruby/bigdecimal/commit/e1c6c9be25
2022-11-13[ruby/bigdecimal] Rewrite check_rounding_mode functionKenta Murata
Use table-lookup algorithm instead of consecutive if-statements. https://github.com/ruby/bigdecimal/commit/23eaff3ae5
2022-11-13[ruby/bigdecimal] [Doc] Fix the document of n_significant_digitsKenta Murata
https://github.com/ruby/bigdecimal/commit/91b72a9341
2022-11-13[ruby/bigdecimal] Make GetVpValue inlineKenta Murata
https://github.com/ruby/bigdecimal/commit/1b642e2e59
2022-11-13[ruby/bigdecimal] Make BigDecimal_double_fig inlineKenta Murata
https://github.com/ruby/bigdecimal/commit/4ecf04da7a
2022-11-10Remove numiv from RObjectJemma Issroff
Since object shapes store the capacity of an object, we no longer need the numiv field on RObjects. This gives us one extra slot which we can use to give embedded objects one more instance variable (for a total of 3 ivs). This commit removes the concept of numiv from RObject. Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Transition shape when object's capacity changesJemma Issroff
This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Fix compiler issues in test on C99Peter Zhu
Fixes the following issue when compiling using C99: ext/-test-/rb_call_super_kw/rb_call_super_kw.c ext/-test-/random/loop.c:16:39: error: extra ';' outside of a function [-Werror,-Wextra-semi] RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop);
2022-11-10[Bug #19100] Add `init_int32` function to `rb_random_interface_t`Nobuyoshi Nakada
Distinguish initialization by single word from initialization by array.
2022-11-10Add version to the interface of Random extensionsNobuyoshi Nakada
2022-11-10Preprocess for older bison is no longer neededNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6701
2022-11-09Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada