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

46269 Коммитов

Автор SHA1 Сообщение Дата
nobu 5710857456 git-refresh: for symlink srcdir
* tool/git-refresh: use `cd -P` for symlink srcdir.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 08:08:04 +00:00
nobu e1557424b3 git-refresh: fix expr
* tool/git-refresh (dir): surround by slashes to extract base
  name.  [ruby-dev:50070] [Bug #13424]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 07:52:05 +00:00
nobu 38174633e2 thread.c: disable VM events when stack overflow
* thread.c (ruby_thread_stack_overflow): disable VM events when
  stack overflow occurred; it causes another stack overflow again
  in making backtrace object, and crashes.
  [ruby-core:80662] [Bug #13425]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 07:38:23 +00:00
mrkn 1b5acc876b array.c: Improve performance of Array#sort with float elements
* array.c (sort_2): improve performance of Array#sort with float elements.

* internal.h (cmp_opt_Float, cmp_opt_data): added for checking whether or not
  Float#<=> can be optimizable.

* numeric.c (rb_float_cmp): added for internal use.

* internal.h (rb_float_cmp): ditto.

[Bug #13340]
[ruby-dev:50023]
[Fix GH-1539]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 07:22:35 +00:00
rhe 4e85feed33 array.c: report correct memsize for shared root arrays
For a shared array root, struct RArray::as.heap.aux.capa stores the
number of Arrays holding reference to that T_ARRAY instead of the actual
heap-allocated capacity. Use ARY_CAPA() macro which handles this
appropriately.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-13 06:43:17 +00:00
stomar 55d0da5105 unicode_normalize.rb: improve docs
* lib/unicode_normalize.rb: [DOC] improve docs for
  String#{unicode_normalize,unicode_normalized?}: rdoc formatting,
  adopt style of other String methods (drop heading and "Examples").

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 19:49:48 +00:00
svn 5a555505d7 * 2017-04-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 18:07:33 +00:00
stomar 0c10564dd9 nodoc UnicodeNormalize module
* lib/unicode_normalize/normalize.rb: [DOC] nodoc the
  internal UnicodeNormalize module.
* lib/unicode_normalize/tables.rb: ditto.
* template/unicode_norm_gen.tmpl: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 18:07:32 +00:00
nobu a1caed95cb thread.c: during GC for thread
* thread.c (ruby_thread_stack_overflow): check if the given thread
  is during GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 14:47:50 +00:00
nobu 796e995007 rbinstall.rb: purge `git ls-files`
* tool/rbinstall.rb (load_gemspec): purge `git ls-files` generated
  by bundle.  it is not available always everywhere everytime.
  [ruby-dev:50068] [Bug #13423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 08:39:19 +00:00
hsbt fa3a612e2e Import latest gemspec from ruby/fileutils.
* Bump version to 0.7.1. Beucause fileutils-0.7 is alread reserverd
    on rubygems.org.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 08:12:53 +00:00
nobu f91985b34d git-refresh: for old sh
* tool/git-refresh: get rid of matching prefix pattern removal for
  old sh.  [ruby-dev:50069] [Bug #13424]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 05:22:36 +00:00
hsbt d9df358ea8 Use `assert_raise` instead of `assert_raises`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 00:21:20 +00:00
hsbt 83735ba29a Merge json-2.0.4.
* https://github.com/flori/json/releases/tag/v2.0.4
  * 09fabeb03e/CHANGES.md (2017-03-23-204)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-12 00:21:18 +00:00
svn 76ab146ca3 * 2017-04-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 22:41:21 +00:00
hsbt ffa55136c4 Merge upstream of ruby/etc.
* Do not use `git ls-files` for file listing.
  * Fix extconf.rb path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 22:41:21 +00:00
normal abc5e8966c Socket.udp_server_sockets: use symbol proc
Symbol proc is shorter human and machine code;
and also avoids needing to name variables.

* ext/socket/lib/socket.rb (Socket.udp_server_sockets): use symbol proc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 14:56:17 +00:00
nobu e042dd0ee1 Parenthesized CHECK_CFP_CONSISTENCY [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 12:28:51 +00:00
nobu 7965327d13 Install only files explicitly referenced by bundled gems.
[Bug #13417]
[Fix GH-1580]
Author:    Vít Ondruch <vondruch@redhat.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 12:20:21 +00:00
nobu 8913e2946e Spec#files are not used anymore.
[Fix GH-1579]
Author:    Vít Ondruch <vondruch@redhat.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 12:20:18 +00:00
hsbt 82993d5c9c Fix a typo.
Patch by @voxik. [fix GH-1581]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 12:19:05 +00:00
hsbt 83dc06601f Import gemspec from ruby/etc.
* Update configuraiton for gem release.
  * Bump version to 0.2.1. Because 0.2.0 is already reserved on rubygems.org

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 09:46:53 +00:00
hsbt adaffdd1cf Import gemspec from ruby/dbm
* Update gemspec version of beta release.
  * Bump version to 0.5.1. Because 0.5 is already reserved another implementation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 08:49:01 +00:00
nobu bb66691e7e vm_insnhelper.c: CHECK_CFP_CONSISTENCY
* vm_insnhelper.c (CHECK_CFP_CONSISTENCY): make [BUG] messages
  consistent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 04:17:45 +00:00
nobu 2cb399af44 time.c: rename div as divv
* time.c (divv): add suffix to get rid of the name in C standard
  library, and others together.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 02:40:14 +00:00
nobu 1c2724ab2e configure.in: need GIT to check if using git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 02:40:13 +00:00
nobu 2d9f80afd4 enc/unicode/data: no files under version control now
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-11 01:24:13 +00:00
normal c68ec6f147 time.c: use predefined IDs
This reduces rb_intern calls during startup and shortens code.

* time.c: include id.h for predefined IDs
  (id_mul, id_eq, id_ne, id_cmp): remove static variables
  (eq): replace id_eq with idEq
  (cmp, wcmp): replace id_cmp with idCmp
  (weq): replace id_eq with idEq
  (time_timespec): replace id_mul with '*'
  (Init_Time): remove rb_intern calls for removed variables
* common.mk (time.$(OBJEXT)): add depend on id.h

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 18:16:58 +00:00
normal 5d3fac0db9 time.c: Improve Time#to_i performance
Time#to_i will be faster around 80% (on 64-bit platforms).

* Before
       user     system      total        real
   2.840000   0.000000   2.840000 (  2.847238)

* After
       user     system      total        real
   1.600000   0.000000   1.600000 (  1.598911)

* Test code
require 'benchmark'

Benchmark.bmbm do |x|
  x.report do
    t = Time.now
    20000000.times do
      t.to_i
    end
  end
end

* time.c (_div): new function avoid rb_funcall
  (div): replace with new _div function
  [ruby-core:80636] [Bug #13418]
  Thanks to Watson <watson1978@gmail.com> for the patch.

From: Watson <watson1978@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 18:08:16 +00:00
stomar 2c6cbcde84 doc/extension.rdoc: rb_str_append grammar fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 17:28:18 +00:00
nobu 9adc876393 extension.rdoc: rb_str_append [ci skip]
* doc/extension.rdoc: add rb_str_append and fix equivalent for
  rb_str_catf and rb_str_vcatf from rb_str_cat2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 15:34:37 +00:00
svn 0e96a0c305 * 2017-04-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 15:26:50 +00:00
nobu 83ea401747 Make .gemspec slimmer.
This is the same code that RubyGems are using:

a1a5ab55cb

[ci skip]
[Fix GH-1578]
Author:    Vít Ondruch <vondruch@redhat.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 15:26:49 +00:00
nobu 85f62055c4 extension.rdoc: fix rb_enc_str_new_literal
* doc/extension.rdoc: Add missing enc arg to rb_enc_str_new_literal.

[ci skip]
[Fix GH-1577]
Author:    Dylan Thacker-Smith <Dylan.Smith@shopify.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 15:26:48 +00:00
nobu acafc5e0c7 svn:ignore: ignore ruby-runner
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 13:35:39 +00:00
usa 9e73a40273 svn:ignore: fix handling exts.mk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 13:30:28 +00:00
usa 3293aae2be svn:ignore
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 13:18:03 +00:00
nobu 0fed8a6323 Makefile.sub: fix HAVE_GIT
* win32/Makefile.sub (HAVE_GIT): fix missing `do`, excape `$`, and
  fix a typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 02:13:52 +00:00
nobu b1ea4dd6a2 configure.in: detect baseruby by default
* configure.in: default HAVE_BASERUBY to yes, for auto detection.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 01:46:24 +00:00
nobu 5e604e6c02 vcs.rb: remove git stuff
* tool/vcs.rb (VCS::GIT#after_export): remove git stuff not to
  distribute.  [ruby-core:80629] [Feature #13415]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 01:22:50 +00:00
nobu b68fb2efce Allow --without-baseruby option
* configure.in, win32/configure.bat: allow --without-baseruby
  option to use already generated files without baseruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 01:22:49 +00:00
nobu 0ab20b48c5 Add --with-git option
* configure.in, win32/configure.bat: add --with-git option to
  tell git command to use, or not to use git.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-10 01:22:48 +00:00
svn 68c9c97f13 * 2017-04-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 16:19:39 +00:00
usa 49e4df4861 Get rid of inifinity retry loop in Socket.udp_server_sockets
* ext/socket/lib/socket.rb (Socket.udp_server_sockets): remove duplicated
  addresses before passing it to ip_sockets_port0 because it causes
  Errno::EADDRINUSE and retry forever.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 16:19:37 +00:00
stomar 9638295527 math.c: improve docs for Math.sqrt
* math.c: [DOC] mention possibly surprising behavior of Math.sqrt
  due to floating point arithmetic; also refer to BigDecimal#sqrt.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 13:30:31 +00:00
stomar 1a0dbb9eaa numeric.c: improve docs for Float
* numeric.c: [DOC] mention possibly surprising behavior of
  Float#{floor,ceil,to_i,truncate} due to floating point arithmetic.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 13:28:11 +00:00
kazu 434c353e71 io.c: ARGF.file returns $stdin instead of STDIN [ci skip]
For example:
`ruby -e '$stdin=open(IO::NULL);p [STDIN,$stdin,ARGF.file]'`
prints `[#<IO:<STDIN>>, #<File:/dev/null>, #<File:/dev/null>]`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 11:53:53 +00:00
nobu 9e4da4486b configure.in: rpath with OPTDIR
* configure.in: add rpath flags which is needed for OPTDIR as well
  as -L options, when it is given.  [ruby-dev:50065] [Bug #13411]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 11:44:01 +00:00
nobu f9ca643683 thread.c: refine stream closed message
* thread.c (Init_Thread): [EXPERIMENTAL] refine the "stream
  closed" special exception message, by explicating that it is
  caused by threading.  [ruby-core:80583] [Bug #13405]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 05:09:44 +00:00
nobu dce00119c6 special exception messages are static
* vm_core.h (rb_vm_register_special_exception): make the contents
  of special exception messages static.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-09 04:01:07 +00:00