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

32681 Коммитов

Автор SHA1 Сообщение Дата
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
akr 8745bc676e * bignum.c (rb_big_divrem_normal): Add GC guards.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 17:21:43 +00:00
charliesome 1abfdb4585 * vm_insnhelper.c (vm_search_method): no need to check klass == ci->klass
in method cache guard - class sequence number has the same uniqueness
  guarantees

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 16:53:20 +00:00
nobu 149fd43e1f * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 16:11:22 +00:00
akr 8f8bf8243d * bignum.c (rb_big_divrem_normal): New function.
* 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-04 16:10:06 +00:00
svn ff5a4c9983 * 2013-09-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 15:10:55 +00:00
akr cf3736a75a * bignum.c (bigdivrem_normal): Removed.
(bary_divmod_normal): New function.
  (bary_divmod): Use bary_divmod_normal.
  (bigdivrem): Use bary_divmod_normal.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 15:10:48 +00:00
nobu 88270e7773 win32.c: suppress warning
* win32/win32.c (do_select): unconstify timeout as select() declares
  it non-const.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 14:41:38 +00:00
akr 102a2c2e80 * bignum.c (bigdivrem): Useless declaration removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 14:03:29 +00:00
nobu 326e38164b numeric.c: split NUM_STEP_GET_INF
* numeric.c (NUM_STEP_GET_INF): split from NUM_STEP_SCAN_ARGS(), since
  inf is not used in num_step_size().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 13:57:02 +00:00
akr dd95c9b1cd * bignum.c (bigdivrem_normal): Add assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 11:23:05 +00:00
nobu 35f11f306d internal.h: LONG_LONG vm_state_version_t
* internal.h (vm_state_version_t): prefer LONG_LONG to uint64_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 10:18:47 +00:00
nobu cb3c8119a7 internal.h: fix vm_state_version_t
* internal.h (vm_state_version_t): use uint64_t when it is larger than
  LONG_LONG, and fallback to unsigned long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 07:28:28 +00:00
nobu eeb39e0152 vm.c: prototype
* vm.c (rb_next_class_sequence): use ANSI style definition and
  prorotype declaration, instead of old-K&R style.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 07:18:24 +00:00
a_matsuda 71f3943558 * NEWS: Note about Module#include and prepend scope change
[Feature #8846]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 06:43:05 +00:00
naruse 0e92ae9636 * enc/trans/utf8_mac-tbl.rb: fix r42789.
Fix conversion table and logic. [ruby-dev:47680]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 06:40:39 +00:00
charliesome 2f522b9cc6 * class.c, compile.c, eval.c, gc.h, insns.def, internal.h, method.h,
variable.c, vm.c, vm_core.c, vm_insnhelper.c, vm_insnhelper.h,
  vm_method.c: Implement class hierarchy method cache invalidation.

  [ruby-core:55053] [Feature #8426] [GH-387]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 05:25:06 +00:00
kazu 4142e8301d fix typos
pointed out by nagachika.
http://d.hatena.ne.jp/nagachika/20130903/ruby_trunk_changes_42782_42812#r42799

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 04:19:28 +00:00
nobu b31965cb43 string.c: fix for \K
* string.c (str_gsub): use BEG(0) for whole matched position not
  return value from rb_reg_search(), for \K matching.
  [ruby-dev:47694] [Bug #8856]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 02:13:42 +00:00
nobu 90cbcbe68b test_rubyoptions.rb: ignore trivial differences
* test/ruby/test_rubyoptions.rb (ExpectedStderr): ignore trivial
  differences, not worth to break the tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 02:12:39 +00:00
svn bd8402156a * 2013-09-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 02:11:43 +00:00
nobu fdf04ce67e configure.in: libruby needs gmp
* configure.in (SOLIBS): LIBRUBY_SO also needs linking with gmp, to
  run worker processes in test-all on non-ELF platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04 02:11:38 +00:00
kou 1d8efe61d8 * test/rexml/parser/test_tree.rb
(TestTreeParser::TestInvalid#test_unmatched_close_tag):
  Compute expected value from test value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 14:02:10 +00:00
kou 73c57761a9 * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Add source information to parse exception on no close tag error.
  [Bug #8844]  [ruby-dev:47672]
  Patch by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 14:01:20 +00:00
kou 4c1fa1a6a4 * test/rexml/parser/test_tree.rb: Fix test name to describe test
content.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:58:24 +00:00
kou a0657cd5d7 * lib/rexml/parsers/treeparser.rb (REXML::Parsers::TreeParser#parse):
Remove needless nested parse exception information.
  [Bug #8844]  [ruby-dev:47672]
  Reported by Ippei Obayashi. Thanks!!!
* test/rexml/parser/test_tree.rb: Add a test for the above case.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:57:18 +00:00
akr 1c6ff586a6 Fix a typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:22:05 +00:00
nobu 5669902126 string.c: rb_enc_str_new_cstr
* string.c (rb_enc_str_new_cstr): new function to create a string from
  the C-string pointer with the specified encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 13:03:54 +00:00
a_matsuda ad6731b0f9 Changelog: Forgot to reference the ticket #
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 12:52:32 +00:00
a_matsuda 26766ee89c * eval.c (Init_eval): Make Module#include and Module#prepend public
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 12:42:01 +00:00
nobu 1908874bf4 thread_pthread.c: fix compile error on HP-UX
* thread_pthread.c (sys/dyntune.h): for gettune().
* thread_pthread.c (hpux_attr_getstackaddr): fix missing *.
  [ruby-core:56983] [Feature #8793]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 12:35:22 +00:00
akr c0e1f9e016 Add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 11:20:17 +00:00
akr 2583689340 * bignum.c (GMP_STR2BIG_DIGITS): New macro.
(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 11:20:02 +00:00
usa 1b126277ed * ext/win32/lib/win32/registry.rb (Win32::Registry#values): added.
[Feature #7763] [ruby-core:51783]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 10:46:58 +00:00
knu afcabde71b Add magic autoload comments to misc/*.el.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 09:29:22 +00:00
naruse 61837409e0 Revert r42800 "* error.c: [DOC] Update bug tracker url by @ScotterC [Fixes GH-390]"
It should be fixed on www.ruby-lang.org side.
* [Bug #8854]
* ruby/www.ruby-lang.org#288 https://github.com/ruby/www.ruby-lang.org/issues/288

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 08:20:48 +00:00
usa 67460ee946 * test/ruby/test_rubyoptions.rb
(TestRubyOptions::SEGVTest::ExpectedStderr): the URL was changed at
  r42800.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 08:07:49 +00:00
zzak 324df61eea * lib/thread.rb: [DOC] CV#wait typo by @avdi [Fixes GH-386]
https://github.com/ruby/ruby/pull/386


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 05:49:45 +00:00
zzak 31bd386452 * error.c: [DOC] Update bug tracker url by @ScotterC [Fixes GH-390]
https://github.com/ruby/ruby/pull/390


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 05:38:48 +00:00
kazu 8297e310df fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03 04:24:00 +00:00