summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi
AgeCommit message (Collapse)Author
2019-01-27Update to ruby/spec@e57f49ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20Update to ruby/spec@e2fbd4deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20Update to ruby/spec@35a9fbaeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-17call rb_str_modify to make a copy unsharednobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10proc.c: proc without blocknobu
* proc.c (proc_new): promoted lambda/proc/Proc.new with no block in a method called with a block to a warning/error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29Update to ruby/spec@944ea57eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-27Update to ruby/spec@8b743a3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25Update to ruby/spec@241f9e7eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-04Spec updates [Bug #15060] [Fix GH-1495]nobu
From: MSP-Greg <greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@09fa86ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Update to ruby/spec@dd828d6eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15spec/ruby/optional/capi/ext/io_spec.c: guard unreachable codenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15spec/ruby/optional/capi/ext/io_spec.c: guard unreachable codenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-15-Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readablenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-14spec/ruby/optional/capi/io_spec.rb: fix fragile spec from unpredictable errnonormal
rb_io_wait_readable and rb_io_wait_writable depend on the TSD errno value. Due to the recent changes in r64352-r64353 to restructure GVL, errno could be set to EAGAIN from the signal self-pipe and cause the rb_io_wait_readable spec to block unexpectedly. This should fix rubyspec timeouts on Solaris: http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz * spec/ruby/optional/capi/ext/io_spec.c: add errno= setter method * spec/ruby/optional/capi/io_spec.rb: set errno to appropriate values for tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Update to ruby/spec@9be7c7eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon
* Clarify logic and add spec. * Now passes test-all with the JSON fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Revert "encoding.c (rb_enc_get_index): return -1 for non-encoding capable ↵eregon
objects" * This reverts commit fb253d2032e51f333e6577aa4fcf0c03f9c6fc02. * The CI is failing, this seems a bug in the JSON C extension. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon
* Clarify logic and add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (enc_set_index): raise instead of rb_bug() for non-encoding ↵eregon
capable objects * Add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28rb_enc_aliasnobu
`rb_encdb`-prefixed functions are only for internal use. use rb_enc_alias instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Revert "rb_enc_alias"mame
This reverts commit r63779 which made test-spec fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28rb_enc_aliasnobu
`rb_encdb`-prefixed functions are only for internal use. use rb_enc_alias instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28fix feature name and removed a duplicate conditionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28check enc_capable.ko1
* encoding.c (rb_enc_capable): make it extern to check enc_capable. enc_index can be set to limited types such as T_STRING, T_REGEX and so on. This function check an object is this kind of types. * include/ruby/encoding.h: ditto. * encoding.c (enc_set_index): check a given object is enc_capable. * include/ruby/encoding.h (PUREFUNC): * marshal.c (encoding_name): check `rb_enc_capable` first. * marshal.c (r_ivar): ditto. If it is not enc_capable, it should be malformed data. * spec/ruby/optional/capi/encoding_spec.rb: remove tests depending on the wrong feature: all objects can set enc_index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Update to ruby/spec@a454137eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-19NULL class Data_Wrap_Struct is not allowed.ko1
* spec/ruby/optional/capi/typed_data_spec.rb: same as r63692. * spec/ruby/optional/capi/ext/typed_data_spec.c: ditto. * vm_insnhelper.h (PUSH): re-enable assertion to check hidden objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-18Removed unobservable behaviornobu
The klass for Data_Wrap_Struct can be NULL, but it MUST NOT appear in the Ruby level. It is only for the C level implementation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-13Update to ruby/spec@4bb0f25eregon
* Specs added by TruffleRuby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-28Update to ruby/spec@6f38a82eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-04Update to ruby/spec@c1b568beregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/spec@cbe855ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29Update to ruby/spec@83063a3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state. * vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc` objects don't need to keep `$SAFE` at the creation. Also make `is_from_method` and `is_lambda` as 1 bit fields. * cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation. * eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access `vm->safe_level_` directly. * eval_jump.c: End procs `END{}` doesn't keep `$SAFE`. * proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c. * safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes. * safe.c (safe_setter): use `rb_set_safe_level()`. * thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`. It should be obsolete. * transcode.c (load_transcoder_entry): `rb_safe_level()` only returns 0 or 1 so that this check is not needed. * vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc. * vm.c (rb_proc_create): renamed to `proc_create`. * vm.c (rb_proc_dup): moved from proc.c. * vm.c (vm_invoke_proc): do not need to set and restore `$SAFE` for `Proc#call`. * vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer meaning. * lib/drb/drb.rb: restore `$SAFE`. * lib/erb.rb: restore `$SAFE`, too. * test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests. * test/rubygems/test_gem.rb: do not set `$SAFE = 1`. * bootstraptest/test_proc.rb: catch up this change. * spec/ruby/optional/capi/string_spec.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: ditto. * test/fiddle/test_func.rb: ditto. * test/fiddle/test_handle.rb: ditto. * test/net/imap/test_imap_response_parser.rb: ditto. * test/pathname/test_pathname.rb: ditto. * test/readline/test_readline.rb: ditto. * test/ruby/test_file.rb: ditto. * test/ruby/test_optimization.rb: ditto. * test/ruby/test_proc.rb: ditto. * test/ruby/test_require.rb: ditto. * test/ruby/test_thread.rb: ditto. * test/rubygems/test_gem_specification.rb: ditto. * test/test_tempfile.rb: ditto. * test/test_tmpdir.rb: ditto. * test/win32ole/test_win32ole.rb: ditto. * test/win32ole/test_win32ole_event.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/spec@0fe33aceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27spec_helper.rb: libruby.so iff enable-sharednobu
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): search libruby.so only when enable-shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27spec_helper.rb: must find libruby.sonobu
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if libruby.so should have been built but is not found, fail early. get mtime of the library just once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01Update to ruby/spec@bacedc5eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29spec/ruby/optional/capi/constants_spec.rb: Data is deprecated nownobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-28Ignore the libruby check if it cannot be founderegon
* ENV['RUBY_EXE'] can be just 'ruby' and is not an absolute path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-28Make sure to compile each extension only once in ruby/speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-28Use ENV['RUBY_EXE'] as RbConfig.ruby might be incorrecteregon
* On a built-but-not-installed-ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-28Update to ruby/spec@a6b8805eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-16spec/ruby/optional/capi/io_spec.rb: speling ficsnormal
* spec/ruby/optional/capi/io_spec.rb: speling: s/writeable/writable/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28Update to ruby/spec@691755deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-20Move spec/rubyspec to spec/ruby for consistencyeregon
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e