summaryrefslogtreecommitdiff
path: root/test/-ext-
AgeCommit message (Collapse)Author
2013-10-09object.c: avoid inadvertent symbol creationnobu
* object.c (id_for_attr): avoid inadvertent symbol creation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test_inadvertent_creation.rb: fix assertion namenobu
* test/-ext-/symbol/test_inadvertent_creation.rb: fix assertion name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test_inadvertent_creation.rb: use assert_not_interned?nobu
* test/-ext-/symbol/test_inadvertent_creation.rb: use assert_not_interned? instead assert_not_send. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test/unit/assertions.rb: return exceptionnobu
* lib/test/unit/assertions.rb (assert_raise_with_message): return raised exception same as assert_raise. * test/ruby, test/-ext-: use assert_raise_with_message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test: use assert_raisenobu
* test/ruby, test/-ext-: use assert_raise instead of assert_raises. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test_tracepoint.rb: include zombiesnobu
* test/-ext-/tracepoint/test_tracepoint.rb (test_tracks_objspace_count): free count should include zombies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09* include/ruby/debug.h,ko1
vm_backtrace.c (rb_profile_frame_full_label): add new C API rb_profile_frame_full_label() which returns label with qualified method name. Note that in future version of Ruby label() may return same return value of full_label(). * ext/-test-/debug/profile_frames.c, test/-ext-/debug/test_profile_frames.rb: fix a test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-08* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-08* vm_backtrace.c, include/ruby/debug.h: add new APIsko1
* VALUE rb_profile_frame_method_name(VALUE frame) * VALUE rb_profile_frame_qualified_method_name(VALUE frame) * iseq.c (rb_iseq_klass), internal.h: add new internal function rb_iseq_method_name(). * ext/-test-/debug/profile_frames.c (profile_frames), test/-ext-/debug/test_profile_frames.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07* test/-ext-/debug/test_profile_frames.rb: rename class C toko1
something long name because one test depends on absence of class ::C. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07* ext/-test-/debug/profile_frames.c:ko1
test/-ext-/debug/test_profile_frames.rb: add a test for new C-APIs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-06test_old_thread_select.rb: ignore short wait on Windowsnobu
* test/-ext-/old_thread_select/test_old_thread_select.rb (test_old_select_signal_safe): ignore short wait on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-01file.c: export rb_stat_newnobu
* file.c (stat_new_0): constify. * file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-29parse.y: allow junk attrsetnobu
* parse.y (rb_id_attrset, intern_str): allow junk attrset ID for Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-29parse.y: fix inconsistency with literalsnobu
* parse.y (rb_id_attrset): fix inconsistency with literals, allow ID_ATTRSET and return it itself, but ID_JUNK cannot make ID_ATTRSET. and raise a NameError instead of rb_bug() for invalid argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24encdb.c, encoding.c: make BOM-encodings dummynobu
* enc/encdb.c (ENC_DUMMY_UNICODE): make BOM-encodings dummy. * encoding.c (enc_autoload): keep dummy encodings dummy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-24string/test_ellipsize.rb: remove non-sense testsnobu
* test/-ext-/string/test_ellipsize.rb (Test_StringEllipsize#test_nonascii): rb_str_ellipsize() does not support BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20parse.y: junk sigil only namesnobu
* parse.y (intern_str): sigil only names are junk, at least one identifier character is needed. [ruby-dev:47723] [Bug #8928] * parse.y (rb_enc_symname_type): fix out of bound access. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20ext/-test-/symbol: move upwardnobu
* ext/-test-/symbol/extconf.rb: move the extension object file upward. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-19vsnprintf.c: initialize cpnobu
* vsnprintf.c (BSD_vfprintf): initialize cp so that size is 0 in the commented case. fix an accidental bug at r16716. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06* rational.c: Include gmp.h if GMP is used.akr
(GMP_GCD_DIGITS): New macro. (rb_gcd_gmp): New function. (f_gcd_normal): Renamed from f_gcd. (rb_gcd_normal): New function. (f_gcd): Invoke rb_gcd_gmp or f_gcd_normal. * internal.h (rb_gcd_normal): Declared. (rb_gcd_gmp): Ditto. * ext/-test-/rational: New directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04* bignum.c (GMP_DIV_DIGITS): New macro.akr
(bary_divmod_gmp): New function. (rb_big_divrem_gmp): Ditto. (bary_divmod_branch): Ditto. (bary_divmod): Use bary_divmod_branch. (bigdivrem): Ditto. * internal.h (rb_big_divrem_gmp): Declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04* bignum.c (rb_big_divrem_normal): New function.akr
* internal.h (rb_big_divrem_normal): Declared. * ext/-test-/bignum/div.c: New file. * test/-ext-/bignum/test_div.rb: New file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03Add tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03* bignum.c (GMP_STR2BIG_DIGITS): New macro.akr
(str2big_gmp): New function. (rb_cstr_to_inum): Use str2big_gmp for big bignums. (rb_str2big_gmp): New function. * internal.h (rb_str2big_gmp): Declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03* bignum.c (rb_str2big_poweroftwo): New function.akr
(rb_str2big_normal): Ditto. (rb_str2big_karatsuba): Ditto. * internal.h (rb_str2big_poweroftwo): Declared. (rb_str2big_normal): Ditto. (rb_str2big_karatsuba): Ditto. * ext/-test-/bignum/str2big.c: New file. * test/-ext-/bignum/test_str2big.rb: New file. * ext/-test-/bignum/depend: Add the dependency for str2big.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02* enc/trans/utf8_mac-tbl.rb: update conversion table to recent OS X.naruse
Previous table is used on Mac OS X 10.1 or prior. This table is used on 10.2 or later. [ruby-dev:47680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-01* bignum.c (big2str_base_poweroftwo): Renamed fromakr
big2str_base_powerof2. (rb_big2str_poweroftwo): New function for test. (big2str_generic): Extracted from rb_big2str1. (rb_big2str_generic): New function for test. * internal.h (rb_big2str_poweroftwo): Declared. (rb_big2str_generic): Ditto. * ext/-test-/bignum/big2str.c: New file. * test/-ext-/bignum/test_big2str.rb: New file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10* file.c (rb_str_normalize_ospath):naruse
HFS Plus (Mac OS Extended) uses a variant of Normal Form D in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through U+2FAFF are not decomposed (this avoids problems with round trip conversions from old Mac text encodings). http://developer.apple.com/library/mac/qa/qa1173/_index.html Therefore fix r42457 to exclude the range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30sprintf.c: QUOTE flagnobu
* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28* include/ruby/intern.h (rb_absint_size): Declaration moved fromakr
internal.h to calculate required buffer size to pack integers. (rb_absint_numwords): Ditto. (rb_absint_singlebit_p): Ditto. [ruby-core:42813] [Feature #6065] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23* test/-ext-/tracepoint/test_tracepoint.rb: add GC on/off to countko1
GC events strictly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11string.c: multi-byte terminatornobu
* string.c (rb_string_value_cstr): fill minimum length of the encoding as the terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11string.c: check null charnobu
* string.c (rb_string_value_cstr): check null char in char, not in byte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08* bignum.c (rb_big_sq_fast): New function for testing.akr
(rb_big_mul_toom3): Ditto. * internal.h (rb_big_sq_fast): Declared. (rb_big_mul_toom3): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08* bignum.c (bary_mul_balance): Reduce work memory.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-07* bignum.c (bary_mul_karatsuba): Unreachable code removed. Removeakr
several branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-07* internal.h (rb_big_mul_normal): Declared.akr
(rb_big_mul_balance): Ditto. (rb_big_mul_karatsuba): Ditto. * bignum.c (rb_big_mul_normal): New function for tests. (rb_big_mul_balance): Ditto. (rb_big_mul_karatsuba): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* bignum.c (bary_unpack_internal): Specialized unpacker implemented.akr
(bary_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION. (rb_integer_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* bignum.c (bary_pack): Supportakr
INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION flag. Fix byte order and word order handling in code specialized for wordsize % SIZEOF_BDIGITS == 0. * internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* bignum.c (bary_pack): Specialized packers implemented.akr
(HOST_BIGENDIAN_P): New macro. (ALIGNOF): New macro. (CLEAR_LOWBITS): New macro. (FILL_LOWBITS): New macro. (swap_bdigit): New macro. (bary_2comp): Returns an int. * internal.h (swap16): Moved from pack.c (swap32): Ditto. (swap64): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-20* bignum.c (bary_unpack_internal): Return -2 when negative overflow.akr
(bary_unpack): Set the overflowed bit if an extra BDIGIT exists. (rb_integer_unpack): Set the overflowed bit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-16* bignum.c (bary_2comp): Extracted from get2comp.akr
(integer_unpack_num_bdigits): Extracted from rb_integer_unpack_internal. (bary_unpack_internal): Renamed from bary_unpack and support INTEGER_PACK_2COMP. (bary_unpack): New function to validate arguments and invoke bary_unpack_internal. (rb_integer_unpack_internal): Removed. (rb_integer_unpack): Invoke bary_unpack_internal. (rb_integer_unpack_2comp): Removed. * internal.h (rb_integer_unpack_2comp): Removed. * pack.c: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-16* internal.h (INTEGER_PACK_2COMP): Defined.akr
(rb_integer_pack_2comp): Removed. * bignum.c (bary_pack): Support INTEGER_PACK_2COMP. (rb_integer_pack): Invoke bary_pack directly. (rb_integer_pack_2comp): Removed. (rb_integer_pack_internal): Ditto. (absint_numwords_generic): Follow the above change. * pack.c (pack_pack): Ditto. * sprintf.c (rb_str_format): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13* test/-ext-/test_printf.rb, test/rss/test_parser.rb,shugo
test/ruby/test_array.rb, test/ruby/test_hash.rb, test/ruby/test_m17n.rb, test/ruby/test_marshal.rb, test/ruby/test_object.rb, test/ruby/test_string.rb: don't use untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* bignum.c (rb_integer_unpack_2comp): New function.akr
(rb_integer_unpack_internal): Extracted from rb_integer_unpack and nlp_bits_ret argument added. (integer_unpack_num_bdigits_small): nlp_bits_ret argument added to return number of leading padding bits. (integer_unpack_num_bdigits_generic): Ditto. * internal.h (rb_integer_unpack_2comp): Declared. * pack.c (pack_unpack): Use rb_integer_unpack_2comp and rb_integer_unpack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11* internal.h (INTEGER_PACK_NEGATIVE): Defined.akr
(rb_integer_unpack): sign argument removed. * bignum.c (rb_integer_unpack): sign argument removed. Non-negative integers generated by default. INTEGER_PACK_NEGATIVE flag is used to generate non-positive integers. * pack.c (pack_unpack): Follow the above change. * random.c (int_pair_to_real_inclusive): Ditto. (make_seed_value): Ditto. (mt_state): Ditto. (limited_big_rand): Ditto. * marshal.c (r_object0): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11* bignum.c (validate_integer_pack_format): Don't require a word orderakr
flag if numwords is 1 or less. (absint_numwords_generic): Don't specify a word order for rb_integer_pack. * hash.c (rb_hash): Ditto. * time.c (v2w_bignum): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11rb_integer_pack tests refined.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-11* bignum.c (rb_integer_pack_internal): Renamed from rb_integer_packakr
and overflow_2comp argument added. (rb_integer_pack): Just call rb_integer_pack_internal. (rb_integer_pack_2comp): New function. * internal.h (rb_integer_pack_2comp): Declared. * sprintf.c (rb_str_format): Use rb_integer_pack and rb_integer_pack_2comp to format binary/octal/hexadecimal integers. (ruby_digitmap): Declared. (remove_sign_bits): Removed. (BITSPERDIG): Ditto. (EXTENDSIGN): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e