Граф коммитов

32820 Коммитов

Автор SHA1 Сообщение Дата
akr 8953eee69f * rational.c (f_gcd): Relax the condition to use GMP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08 07:02:42 +00:00
suke 04976ab678 * ext/win32ole/win32ole.c (folevariant_initialize): check type of
element of array.

* test/win32ole/test_win32ole_variant.rb (test_s_new_ary): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08 05:06:20 +00:00
akr f41a2574f0 Updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08 04:39:23 +00:00
nobu c95d5b250d common.mk, win32/Makefile.sub: refix sizez.c for nmake
* common.mk (sizes.c): revert r42854 and r42883.

* win32/Makefile.sub (sizes.c): rule for outplace build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-08 03:54:41 +00:00
nobu 2b44bbf697 common.mk: in-place build
* common.mk (sizes.c): try to fix for in-place build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 22:03:17 +00:00
nobu 2a9cefd52e * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 21:52:21 +00:00
nobu e5d327f444 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 21:48:40 +00:00
nobu 52fe68a7fd * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:08:50 +00:00
nobu 6bca9dc372 thread.c: invert
* ext/thread/thread.c (queue_pop_should_block): the first argument of
  Queue#pop is non_block and inverted for should_block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:39 +00:00
nobu 398c3cab6d thread.c: function cast
* ext/thread/thread.c (queue_sleep): get rid of casting function
  pointer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:37 +00:00
nobu 9b6ee42d86 numeric.c: use positive_int_p
* numeric.c (NUM_STEP_SCAN_ARGS): use positive_int_p() to fix rubyspec
  failures.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:33 +00:00
nobu ba6c734847 numeric.c: no extra checks
* numeric.c (NUM_STEP_SCAN_ARGS): remove extra class checks, which
  cause the incompatibilities.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:28 +00:00
svn 622a2af0ba * 2013-09-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:25 +00:00
nobu e146015272 bignum.c, math.c: RB_BIGNUM_TYPE_P
* bignum.c, math.c (RB_BIGNUM_TYPE_P): predicate macro like
  RB_FLOAT_TYPE_P.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:23 +00:00
nobu c26293dccf bignum.c, math.c: type predicates
* bignum.c, math.c: use type predicate macros instead of TYPE().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:18 +00:00
nobu a77ae1eced bignum.c: split rb_big_fdiv and big_fdiv
* bignum.c (rb_big_fdiv): split with big_fdiv by divider type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 19:04:15 +00:00
akr 0e02d92371 * math.c (math_log): Test the sign for bignums.
(math_log2): Ditto.
  (math_log10): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 12:34:09 +00:00
akr 08e3cb6959 * math.c (math_log): Support bignums bigger than 2**1024.
(math_log2): Ditto.
  (math_log10): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 11:26:52 +00:00
charliesome 66915c5077 * vm_eval.c (vm_call0): fix prototype, the id parameter should be of
type ID, not VALUE

* vm_insnhelper.c (check_match): the rb_funcall family of functions
  does not care about refinements. We need to use
  rb_method_entry_with_refinements instead to call === with
  refinements. Thanks to Jon Conley for reporting this bug.
  [ruby-core:57051] [Bug #8872]

* test/ruby/test_refinement.rb: add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 06:44:31 +00:00
ktsj c65e9bbff9 * doc/security.rdoc: [DOC] fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 04:58:40 +00:00
ktsj 113b1c76fc * variable.c (classname): the name of class that has
non class id should not be nil. This bug was introduced
  in r36577.

* test/thread/test_cv.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 04:58:38 +00:00
ktsj 0a4801e768 * lib/find.rb (Find.find): respect the encodings of arguments.
[ruby-dev:47530] [Feature #8657]

* test/test_find.rb: add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 04:34:27 +00:00
akr dd946739dd * ext/socket/mkconstants.rb (TCP_FASTOPEN): Defined for TCP fast open.
[ruby-core:57048] [Feature #8871] patch by Masaki Matsushita.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-07 01:41:47 +00:00
nobu 503ba49b1a * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 18:08:55 +00:00
svn b3f4c54510 * 2013-09-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 15:15:13 +00:00
glass e334bb2ce5 * common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can't
require extension libraries. The patch is from nobu
  (Nobuyoshi Nakada).

* ext/thread/extconf.rb: for build ext/thread/thread.c.

* include/ruby/intern.h: ditto.

* thread.c: ditto.

* lib/thread.rb: removed and replaced by ext/thread/thread.c.

* ext/thread/thread.c: Queue, SizedQueue and ConditionVariable
  implementations in C. This patch is based on patches from panaggio
  (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and  ko1
  (Koichi Sasada). [ruby-core:31513] [Feature #3620]

* test/thread/test_queue.rb (test_queue_thread_raise): add a test for
  ensuring that killed thread should be removed from waiting threads.
  It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 15:15:07 +00:00
akr f43d9e22f6 * configure.in: Define ac_cv_func_clock_getres to yes for mingw*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 13:49:55 +00:00
akr 4de7dcf8c8 updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 13:05:16 +00:00
akr 5269a3fbd0 Add a property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 12:07:54 +00:00
akr 42a3e0dc55 * rational.c: Include gmp.h if GMP is used.
(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-06 12:07:08 +00:00
kazu 5aadc9d4ba remove unexpected references
Fixes GH-nnn does not reference github.com/tenderlove/psych/issues/nnn
but github.com/ruby/ruby/pull/nnn

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 09:17:27 +00:00
nobu 59baeaf10f win32.c: clock_getres
* win32/win32.c (clock_getres): remove unused variable.
  [ruby-dev:47699] [Bug #8869]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 05:36:23 +00:00
nobu f245f0c664 win32.c: clock_getres
* win32/win32.c (clock_getres): required as well as clock_gettime().
  [ruby-dev:47699] [Bug #8869]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 05:23:28 +00:00
nobu 64455007e6 common.mk: sizes.c for nmake
* common.mk (sizes.c): needs VPATH to outplace build with nmake.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 05:23:25 +00:00
nobu 7ce11f57ed transcode.c: add rb_econv_append
* transcode.c (rb_econv_append): new function to append a string data
  with converting its encoding.  split from rb_econv_substr_append.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 02:45:50 +00:00
nobu a3a7645f19 transcode.c: do while loop
* transcode.c (rb_econv_substr_append): move loop condition after the
  conversion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 02:29:17 +00:00
nobu a4eae61521 transcode.c: GC guard
* transcode.c (rb_econv_substr_append): prevent src from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 01:29:21 +00:00
tenderlove 8579a33966 * ext/psych/lib/psych/visitors/yaml_tree.rb: use double quotes when
strings start with special characters.
  [Fixes GH-157] https://github.com/tenderlove/psych/issues/157

* test/psych/test_string.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 17:39:53 +00:00
svn a9ab13669c * 2013-09-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 15:05:27 +00:00
nobu bbbc8b57eb class.c: remove recursion
* class.c (rewrite_cref_stack): remove recursion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 15:05:20 +00:00
charliesome 7eafeaa313 * string.c (fstring_cmp): take string encoding into account when
comparing fstrings [ruby-core:57037] [Bug #8866]

* test/ruby/test_string.rb: add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 09:07:48 +00:00
nobu dffae9a1f9 string.c: reduce objects in rb_fstring
* string.c (rb_fstring, rb_str_free): use st_data_t instead of VALUE.
* string.c (rb_fstring): get rid of duplicating already frozen object.
* parse.y (str_suffix_gen): freeze in advance to reduce objects.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 08:25:56 +00:00
nobu f0bc5b1c9f * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 05:04:00 +00:00
drbrain ee155140e8 * lib/optparse.rb: The Integer acceptable now allows binary and
hexadecimal numbers per the documentation.  [ruby-trunk - Bug #8865]

  DecimalInteger, OctalInteger, DecimalNumeric now validate their input
  before converting to a number.  [ruby-trunk - Bug #8865]

* test/optparse/test_acceptable.rb:  Tests for the above, tests for all
  numeric acceptables for existing behavior.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 05:02:17 +00:00
charliesome 6fd9000076 * include/ruby/ruby.h: add RSTRING_FSTR flag
* internal.h: add rb_fstring() prototype
* parse.y (str_suffix_gen): deduplicate frozen string literals
* string.c (rb_fstring): deduplicate frozen string literals
* string.c (rb_str_free): delete fstrings from frozen_strings table when
  they are GC'd
* string.c (Init_String): initialize frozen_strings table
* test/ruby/test_string.rb: test frozen strings are deduplicated

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 04:49:16 +00:00
mrkn 301cb9ca99 * configure.in (with_gmp): set with_gmp no if it is empty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 03:50:07 +00:00
charliesome ed0e42c30b * vm_insnhelper.c (vm_getivar): use class sequence to check class
identity, instead of pointer + vm state

* vm_insnhelper.c (vm_setivar): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 01:44:36 +00:00
akr b1b395911c * bignum.c (GMP_DIV_DIGITS): New macro.
(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 23:22:27 +00:00
akr 3b1ab2a6b7 * bignum.c (bary_divmod_normal): Reduce temporary array allocations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 21:23:21 +00:00
naruse 8db313151d wait until the shutdowning message reaches to the server
see #8831

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 18:46:16 +00:00