aboutsummaryrefslogtreecommitdiffstats
path: root/ext/-test-
Commit message (Collapse)AuthorAgeFilesLines
...
* DEBUG: cxxanyargsNobuyoshi Nakada2019-09-192-1/+2
|
* DEBUGNobuyoshi Nakada2019-09-191-0/+1
|
* Look up the language moduleNobuyoshi Nakada2019-09-191-1/+1
| | | | | | Look up language module with `MakeMakefile.[]`, insted of a accessing constant under that module directly, to get rid of expose the constant to the toplevel inadvertently.
* Removed unused keyword argument [ci skip]Nobuyoshi Nakada2019-09-191-1/+1
|
* [EXPERIMENTAL] MakeMakefile::CXX for C++Nobuyoshi Nakada2019-09-181-20/+5
|
* Pass keyword argument flag when rb_call_super_kw calls method_missingJeremy Evans2019-09-173-0/+29
| | | | | | | | This makes method_missing take a flag for whether keyword arguments were passed. Adds tests both for rb_call_super_kw usage as well as general usage of super calling method_missing in Ruby methods.
* add minimaist C++ check卜部昌平2019-09-091-2/+41
| | | | | | | | | | This is a test extension so we basically want test failures rather than a configure breakage but if there is no C++ compiler, we need no test at all because there will be no chance for the tested header file to be used later. This makes it possible to build the ruby binary without any C++ compiler installed in a build environment.
* static member variables must explictly be initialized卜部昌平2019-09-091-0/+2
| | | | | | These variables then get their room for storage. See also https://github.com/ruby/ruby/runs/214042030
* Revert "save committers' weekend from CI failures"卜部昌平2019-09-093-0/+378
| | | | This reverts commit 53d21087da078cf999cc4757b03b2ff0fab4c2cf.
* save committers' weekend from CI failures卜部昌平2019-09-063-378/+0
| | | | Kill the failing tests.
* avoid name mangling卜部昌平2019-09-061-1/+1
| | | | | Otherwise the dynamic linker cannot find this function. See also https://ci.appveyor.com/project/ruby/ruby/builds/27224231/job/4pg6lxlsnsjotu2l
* nullptr is a C++11ism.卜部昌平2019-09-061-2/+3
| | | | | Should use numeric 0 for maximum portability. See also https://travis-ci.org/ruby/ruby/jobs/581543798
* fix Visual Studio compilation error卜部昌平2019-09-061-1/+1
| | | | See also https://github.com/ruby/ruby/runs/213964487
* add test for cxxanyargs.hpp卜部昌平2019-09-063-0/+377
|
* fix arity of bug_start卜部昌平2019-08-291-1/+1
| | | | | This is just a trivial mistake introduced in 0f36e8fc03a5c6433972d6bb5f177d5f6e106bac.
* st_foreach now free from ANYARGS卜部昌平2019-08-272-3/+2
| | | | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from st_foreach. I strongly believe that this commit should have had come with b0af0592fdd9e9d4e4b863fde006d67ccefeac21, which added extra parameter to st_foreach callbacks.
* rb_ensure now free from ANYARGS卜部昌平2019-08-271-1/+1
| | | | | | After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_ensure, which also revealed many arity / type mismatches.
* Warn instance variable `E`Nobuyoshi Nakada2019-08-101-3/+12
| | | | It is not dumped, as it is a short alias for `:encoding`.
* ext/-test-/bug-14834/bug-14384.c: fallback for MAYBE_UNUSEDYusuke Endoh2019-08-011-0/+4
| | | | | __unused__ is unavailable on Sun C. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190801T112505Z.fail.html.gz
* fix VC 2013 compile error卜部昌平2019-08-011-2/+2
| | | | | It seems the compiler does not support VLAs. See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
* fix tracepoint + backtrace SEGV卜部昌平2019-08-013-0/+51
| | | | | | | | | | | | PC modification in gc_event_hook_body was careless. There are (so to say) abnormal iseqs stored in the cfp. We have to check sanity before we touch the PC. This has not been fixed because there was no way to (ab)use the setup from pure-Ruby. However by using our official C APIs it is possible to touch such frame(s), resulting in SEGV. Fixes [Bug #14834].
* Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada2019-07-1444-0/+88
|
* Added depend filesNobuyoshi Nakada2019-07-1428-0/+452
|
* Fixed inadvertent ID creation in rb_iv_getNobuyoshi Nakada2019-07-011-0/+8
|
* Update dependenciesNobuyoshi Nakada2019-05-131-0/+11
|
* str_duplicate: Don't share with a frozen shared stringAlan Wu2019-05-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a. Before this commit, it was possible to create a shared string which shares with another shared string by passing a frozen shared string to `str_duplicate`. Such string looks like: ``` -------- ----------------- | root | ------ owns -----> | root's buffer | -------- ----------------- ^ ^ ^ ----------- | | | shared1 | ------ references ----- | ----------- | ^ | ----------- | | shared2 | ------ references --------- ----------- ``` This is bad news because `rb_fstring(shared2)` can make `shared1` independent, which severs the reference from `shared1` to `root`: ```c /* from fstr_update_callback() */ str = str_new_frozen(rb_cString, shared2); /* can return shared1 */ if (STR_SHARED_P(str)) { /* shared1 is also a shared string */ str_make_independent(str); /* no frozen check */ } ``` If `shared1` was the only reference to `root`, then `root` can be reclaimed by the GC, leaving `shared2` in a corrupted state: ``` ----------- -------------------- | shared1 | -------- owns --------> | shared1's buffer | ----------- -------------------- ^ | ----------- ------------------------- | shared2 | ------ references ----> | root's buffer (freed) | ----------- ------------------------- ``` Here is a reproduction script for the situation this commit fixes. ```ruby a = ('a' * 24).strip.freeze.strip -a p a 4.times { GC.start } p a ``` - string.c (str_duplicate): always share with the root string when the original is a shared string. - test_rb_str_dup.rb: specifically test `rb_str_dup` to make sure it does not try to share with a shared string. [Bug #15792] Closes: https://github.com/ruby/ruby/pull/2159
* numeric.c: fix infinite loopnobu2019-03-111-0/+7
| | | | | | | | * numeric.c (int_pow): fix infinite loop in the case of y equal 1 and power of x does not overflow. [ruby-core:91734] [Bug #15651] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress a warningnobu2019-02-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check return value of `write` to suppress warning.ko12019-02-131-1/+2
| | | | | | | | | * ext/-test-/gvl/call_without_gvl/call_without_gvl.c (do_loop): `-Wunused-result` compiler option (gcc?) checks checking return value of `write`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use $(hdrdir) for include/ruby.h, as well as r67033nobu2019-02-1110-36/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* introduce rb_nogvl C-API to mark ubf as async-signal-safenormal2019-01-041-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | zlib and bignum both contain unblocking functions which are async-signal-safe and do not require spawning additional threads. We can execute those functions directly in signal handlers without incurring overhead of extra threads, so provide C-API users the ability to deal with that. Other C-API users may have similar need. This flexible API can supercede existing uses of rb_thread_call_without_gvl and rb_thread_call_without_gvl2 by introducing a flags argument to control behavior. Note: this API is NOT finalized. It needs approval from other committers. I prefer shorter name than previous rb_thread_call_without_gvl* functions because my eyes requires big fonts. [Bug #15499] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ../arith_seq/../extract.c: remove unused variablek0kubun2018-12-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test cases of rb_arithmetic_sequence_extractmrkn2018-12-122-0/+29
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add more assertions for NotImplementedError of instance methodkazu2018-08-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix test bugkazu2018-08-131-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* UNREACHABLE_RETURNnobu2018-07-243-4/+4
| | | | | | | * include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end of non-void functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixup r63864kazu2018-07-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Prefixed reset_leap_second_infonobu2018-07-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make a prototypenobu2018-07-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby tool/update-deps --fixnaruse2018-07-051-0/+35
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add missing prototypenaruse2018-07-051-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add missing filenaruse2018-07-051-0/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Define AST module under RubyVM [experimental]yui-knk2018-05-312-498/+0
| | | | | | | | | | | * ext/-test-/ast/ast.c: Rename to ast.c and define AST module under RubyVM. * common.mk: compile ast.c. * ext/-test-/ast/extconf.rb: Don't need this file anymore. * inits.c (rb_call_inits): Call Init_ast to setup AST module. * test/-ext-/ast/test_ast.rb: Follow up the namespace change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ast.c: Do not taint TOPLEVEL_BINDINGyui-knk2018-05-311-10/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -test-/wait_for_single_fd: fix -Wformat-security warningnormal2018-05-151-1/+1
| | | | | | Oops git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_wait_for_single_fd: ensure this works with kqueuenormal2018-05-142-0/+66
| | | | | | | | | | | Regardless of future features, this needs to work with kqueue descriptors across platforms. Today this will be useful for 3rd-party libraries using kqueue. In the future, Ruby may use kqueue natively and we shall ensure we can wait on it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ast.c: use enum in switch for warningsnobu2018-05-011-3/+3
| | | | | | | | | * ext/-test-/ast/ast.c (node_children): use enum instead of int for not-handled enumeration value in switch warnings. * ext/-test-/ast/ast.c (node_children): fix the rb_bug message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.c: predicates for special NODEsnobu2018-03-201-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: relax rb_funcall check on extra args for clangnormal2018-01-301-1/+15
| | | | | | | | | | | | | | | clang 5.+ (tested clang 7.0.0) seems to be attempting division-by-zero and giving a very large number for static args to rb_funcall. * include/ruby/ruby.h (rb_varargs_bad_length): relax check for clang * ext/-test-/funcall/funcall.c: renamed from passing_block.c define extra_args_name function * test/-ext-/funcall/test_funcall.rb: new test [ruby-core:85266] [Bug #14425] From: Eric Wong <e@80x24.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.c: Stop double meaning of NODE_FOR by introducing NODE_FOR_MASGNmame2018-01-161-2/+2
| | | | | | | | | NODE_FOR was used both for "for"-statement itself and for multi-assignment of for-statement (for x, y, in...end). This change separates the two purposes, NODE_FOR for the former, and newly introduced NODE_FOR_MASGN for the latter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e