aboutsummaryrefslogtreecommitdiffstats
path: root/test/-ext-
Commit message (Collapse)AuthorAgeFilesLines
* struct.c: unique membersnobu2016-04-161-0/+22
| | | | | | | * struct.c (struct_make_members_list, rb_struct_s_def): member names should be unique. [ruby-core:74971] [Bug #12291] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: set default internal encodingnobu2016-04-092-15/+9
| | | | | | | | | | * test/lib/test/unit/assertions.rb (assert_raise_with_message): set default internal encoding to the excpected message, which affects String#inspect in messages. * test/lib/test/unit/assertions.rb (assert_warning): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* at_exit listnobu2016-04-041-0/+19
| | | | | | | | | * vm_core.h (rb_vm_struct): make at_exit a single linked list but not RArray, not to mark the registered functions by the write barrier. based on the patches by Evan Phoenix. [ruby-core:73908] [Bug #12095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_to_f): raise NotImplementedError when a receivermrkn2016-03-191-1/+1
| | | | | | | | | class is unknown. * test/-ext-/integer/test_my_integer.rb (test_my_integer_to_f): modify a test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (Bignum#<=>): remove it because they are unified withmrkn2016-03-191-0/+22
| | | | | | | | | | | | | | Integer#<=>. * numeric.c (Integer#<=>, Fixnum#<=>): move <=> method from Fixnum to Integer. * numeric.c (int_cmp): add this method for Integer#<=>. * test/-ext-/integer/test_my_integer.rb (test_my_integer_cmp): add a test to examine Integer#<=> for unknown subclasses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/time/test_new.rb (test_timespec_new): change a gmtoffodaira2016-03-181-3/+5
| | | | | | | test to a better one that does not depend on whether the current time is in summer time or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_to_f, fix_to_f): rename fix_to_f to int_to_f, and addmrkn2016-03-181-0/+26
| | | | | | | | | | | | | | | | | | | treatment for subclasses which don't have definitions of to_f method. * numeric.c (Integer#to_f, Fixnum#to_f): move to_f method from Fixnum to Integer. * ext/-test-/integer/my_integer.rb: define helper class for testing to_f method for a subclass of Integer. * ext/-test-/integer/extconf.rb: ditto. * ext/-test-/integer/init.c: ditto. * test/-ext-/integer/test_my_integer.rb: examine to_f method for a subclass of Integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff valuesodaira2016-03-161-1/+3
| | | | | | | are the same only when both or neither of the Time objects are in summer time (daylight-saving time). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/float/test_nextafter.rb: In AIX,odaira2016-03-041-3/+10
| | | | | | | | nextafter(+0.0,-0.0)=+0.0, and nextafter(-0.0,+0.0)=-0.0, but they should return -0.0 and +0.0, respectively. This is a known bug in nextafter(3) on AIX, so skip related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c: fix error messagenobu2016-02-191-0/+8
| | | | | | | * object.c (rb_mod_const_get): make error message at uninterned string consistent with symbols. [ruby-dev:49498] [Bug #12089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_init): introduce String.new(capacity: size)naruse2016-02-171-3/+16
| | | | | | [Feature #12024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_new_frozen): if the given string is embeddedablenaruse2016-02-031-0/+6
| | | | | | but not embedded, embed a new copied string. [Bug #11946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/string/test_capacity.rb: Added missing library.hsbt2016-01-271-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add tests about String's internal capacitynaruse2016-01-271-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/-test-: reduce feature namesnobu2016-01-1010-10/+10
| | | | | | | * ext/-test-/**/extconf.rb: bring up extension libraries which have same name as the parent directory to reduce feature names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_backtrace.c: ignore ifunc framesnobu2015-12-211-0/+17
| | | | | | | * vm_backtrace.c (rb_profile_frames): ignore ifunc frames as it did before. [ruby-core:72409] [Bug #11851] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-1661-0/+61
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: skip internal namesnobu2015-12-081-0/+19
| | | | | | | * marshal.c (w_objivar): skip internal instance variables in T_OBJECT too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: no frozen error at cstrnobu2015-12-011-0/+18
| | | | | | | * string.c (rb_string_value_cstr): should not raise on frozen string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cstr.c: split bug_str_cstr_untermnobu2015-12-011-0/+6
| | | | | | | * ext/-test-/string/cstr.c (bug_str_cstr_unterm): split unterminating from bug_str_cstr_term. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time/test_new.rb: fix testsnobu2015-11-111-4/+4
| | | | | | | | | | * test/-ext-/time/test_new.rb (test_timespec_new): fix for r52519. swap utc and localtime. * test/-ext-/time/test_new.rb (test_timespec_now): fix method name typo which has overwritten test_timespec_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add tests for rb_time_timespec_newnaruse2015-11-101-0/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* preserve encodings in error messagesnobu2015-09-281-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fill the terminatornobu2015-07-251-0/+8
| | | | | | | * string.c (str_replace_shared_without_enc): fill the terminator of embedded strings in wide char encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: pool only bare strings in fstringnobu2015-07-241-0/+64
| | | | | | | | | * string.c (fstr_update_callback): pool bare strings only. * string.c (rb_fstring): return the original string with sharing a fstring if it has extra attributes, not the fstring itself. [ruby-dev:49188] [Bug #11386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: drop dummy encoding flagnobu2015-07-151-0/+11
| | | | | | | | * encoding.c (enc_autoload): drop dummy encoding flag from the loaded encoding index. this flag is used only in this source. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -test-/string: movenobu2015-07-1510-12/+12
| | | | | | | * ext/-test-/string/extconf.rb: move "-test-/string/string.so" to "-test-/string.so". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c (iseq_data_to_ary): dump kw_arg as symbolnormal2015-07-071-0/+9
| | | | | | | | | | | | | Fix RubyVM::InstructionSequence#to_a after r49517 Keywords were made symbols to fix [Bug #10831] [ruby-core:68031], so we should dump symbols as-is instead of attempting to convert them from IDs * iseq.c (iseq_data_to_ary): dump kw_arg as symbol * test/-ext-/iseq_load/test_iseq_load.rb: test kw_arg roundtrip [ruby-core:69891] [Bug #11338] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_method.rb (TestMethod#test_{instance,define}_method): assumedusa2015-07-071-8/+12
| | | | | | | | | | default external is UTF-8. fixed failures introduced at r51175. * test/-ext-/symbol/test_type.rb (Test_Symbol::TestType#test_check_{id,symbol}_invalid_type): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: skip invalid bytenobu2015-07-071-4/+7
| | | | | | | | * file.c (rb_str_normalize_ospath): skip invalid byte sequence not to loop infinitely. this case usually does not happen as the input name should come from real file systems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: preserve encodingnobu2015-07-071-0/+14
| | | | | | | * symbol.c (rb_check_id, rb_check_symbol): preserve encoding of the given name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: remove rb_iseq_t::klass to reduce dynamic data.ko12015-07-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | * internal.h, iseq.c (rb_iseq_klass): remove it because rb_iseq_t::klass is removed. * vm_insnhelper.c (vm_super_outside): do not see cfp->iseq, but check callable method entry on a frame. This fix simplify the logic to search super class. * test/ruby/test_method.rb: support super() from Proc. Now, [Bug #4881] and [Bug #3136] was solved. * proc.c (rb_mod_define_method): catch up this change. * vm.c (vm_define_method): ditto. * vm_backtrace.c (rb_profile_frames): now, each `frame' objects are rb_callable_method_entry_t data or iseq VALUEs. This fix introduce minor compatibility issue that rb_profile_frame_label() always returns rb_profile_frame_base_label(). * test/-ext-/debug/test_profile_frames.rb: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/popen_deadlock/test_popen_deadlock.rb: test [Bug #11265]ngoto2015-06-251-0/+35
| | | | | | | | | | | | * ext/-test-/popen_deadlock/infinite_loop_dlsym.c: new ext to call dlsym(3) infinitely without GVL, used in the above test. * ext/-test-/popen_deadlock/extconf.rb: extconf.rb for the above ext. Currently, only enabled on Solaris (main target) and Linux (as a reference platform and for debugging the ext). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_last_thread.rb: relaxnobu2015-06-191-1/+1
| | | | | | | * test/-ext-/gvl/test_last_thread.rb (test_last_thread): allow low resolution sleep. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: inadvertent IDnobu2015-06-191-0/+22
| | | | | | | * proc.c (rb_mod_define_method): get rid of inadvertent ID creations at error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (thread_start_func_2): don't interrupt when last thread exitkosaki2015-06-141-0/+22
| | | | | | | | | | | | unless main thread is already exited. Otherwise main thread could be wrongly interrupted when it uses rb_thread_call_without_gvl(). Patch by Takehiro Kubo. [Bug #11237][ruby-dev:49044][GH-898] * test/-ext-/gvl/test_last_thread.rb: new test for the above fix. * ext/-test-/gvl/call_without_gvl/call_without_gvl.c: new ext for the above test. * ext/-test-/gvl/call_without_gvl/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_nofree.rb: fix commit missnobu2015-06-121-3/+4
| | | | | | | * test/-ext-/string/test_nofree.rb (test_no_memory_leak): remove limit and make the interation longer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_nofree.rb: rehearsalnobu2015-06-121-3/+4
| | | | | | | * test/-ext-/string/test_nofree.rb (test_no_memory_leak): add a rehearsal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: rb_f_notimplement for ext on Windowsnobu2015-05-181-0/+4
| | | | | | | | | * include/ruby/intern.h (rb_f_notimplement): should not respond to not-implemented methods. as the address inside a DLL and the imported address are different on Windows, use an exported variable to share the same address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* notimplement: renamenobu2015-05-171-2/+2
| | | | | | | * ext/-test-/notimplement, test/-ext-/test_notimplement.rb: rename from bug-3662. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: clear NOFREE flag at embeddingnobu2015-04-171-0/+10
| | | | | | | | * string.c (STR_SET_EMBED): clear NOFREE flag at embedding as embedded strings no longer refer static strings. [ruby-core:68436] [Bug #10942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: respond_to_missing? at Methodnobu2015-03-201-0/+22
| | | | | | | | | * proc.c (respond_to_missing_p): check if the receiver responds to the given method by respond_to_missing?. * proc.c (mnew_missing): create Method object for method_missing. [ruby-core:68564] [Bug #10985] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_inadvertent_creation.rb: fix messagesnobu2015-03-201-4/+4
| | | | | | | * test/-ext-/symbol/test_inadvertent_creation.rb (TestInadvertent): fix failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_inadvertent_creation.rb: undefined singletonnobu2015-03-201-0/+1
| | | | | | | * test/-ext-/symbol/test_inadvertent_creation.rb (test_undefined_method): test Kernel#singleton_method too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: use assert_in_out_errnobu2015-03-031-3/+1
| | | | | | | | | | * test/ruby/test_rubyoptions.rb (assert_segv): assert_in_out_err with the pattern list instead of invoke_ruby. * test/-ext-/bug_reporter/test_bug_reporter.rb (test_bug_reporter_add): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h: fix symbols leaknobu2015-02-061-0/+21
| | | | | | | | * vm_core.h (rb_call_info_kw_arg_struct): make keywords a symbols list to get rid of inadvertent creation by variable keyword arguments. [ruby-core:68031] [Bug #10831] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_inadvertent_creation.rb: assert method_missingnobu2015-02-051-16/+22
| | | | | | | | * test/-ext-/symbol/test_inadvertent_creation.rb (assert_no_immortal_symbol_in_method_missing): assert method_missing. [Bug #10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* convert method name to a Symbolnobu2015-02-051-8/+8
| | | | | | | | * vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send): convert String method name into a Symbol, as method_missing method expects its first argument to be a Symbol. [Bug #10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: fix missing reasonnobu2015-02-051-2/+2
| | | | | | | | | * vm_insnhelper.c (ci_missing_reason): return the reason of method missing in call info. * vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the proper missing reason. [Bug #10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_inadvertent_creation.rb: move testsnobu2015-02-051-0/+62
| | | | | | | * test/-ext-/symbol/test_inadvertent_creation.rb: move symbol leak tests, for implementation details, from test/ruby/test_symbol.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e