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

40897 Коммитов

Автор SHA1 Сообщение Дата
nobu 9949407fd9 suppress a warning
* ext/socket/raddrinfo.c (rsock_fd_family): suppress a
  sign-compare warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 16:28:56 +00:00
svn 61d51d9de6 * 2015-10-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 15:55:10 +00:00
kazu dba4adb5c0 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 15:55:01 +00:00
kazu dca182f2c4 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 15:54:50 +00:00
nobu a3ac9d0bb6 file.c: fix typos
* file.c (rb_file_expand_path_internal): fix typos.
  [ruby-core:71111] [Bug #11601]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 12:10:14 +00:00
nobu c92322b537 objspace_dump.c: special const
* ext/objspace/objspace_dump.c: support special constant objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 06:25:01 +00:00
nobu 7594a99322 init.c: glibc bug
* ext/socket/init.c (rsock_raise_socket_error): get rid of a glibc
  bug.  [ruby-core:71100] [Bug #11600]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19 01:33:49 +00:00
svn 3ef4dfdcf6 * 2015-10-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 16:30:03 +00:00
usa a01dfd479f * file.c (rb_file_identical_p): not necessary to compare the paths after
comparing the file indexes on Windows.  designate by kosaki.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 16:29:07 +00:00
usa 0bb6bf24b5 * ruby/test_require.rb (loading_fifo): checking by defined? is meaningless about
notimplemented method.  such methods are defined, but not respond_to?.  this
  fixes test failures introduced at r52172.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 14:59:51 +00:00
akr 89db37cf77 * lib/open-uri.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 12:17:52 +00:00
nobu 4eba615a0b disable warnings unless optimized
* include/ruby/ruby.h (rb_data_object_{wrap,get}): move
  declarations inside ifdef too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 10:21:35 +00:00
nobu 6094ac4ce8 disable warnings unless optimized
* include/ruby/ruby.h (rb_data_object_{wrap,get,make}): warn only
  if optimized, as __builtin_choose_expr() does not work fine
  unless optimized.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:53:26 +00:00
nobu 503752b14c random.c: comment [ci skip]
* random.c (fill_random_bytes_urandom): fix comment typos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:51:44 +00:00
kosaki 0751bc3fad Revert r52180
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:46:21 +00:00
kosaki 6c060b2b58 * random.c (fill_random_bytes_urandom): add a comment why using
O_NONBLOCK and O_NOCTTY.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:43:08 +00:00
kosaki 47f0a8f9d0 * random.c (fill_random_bytes_syscall): don't use GRND_NONBLOCK.
It is meaningless. If SYS_getrandom(GRND_NONBLOCK) return
  EAGAIN, we eventually call fill_random_bytes_urandom() and
  it block such as SYS_getrandom() without GRND_NONBLOCK.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:42:37 +00:00
kosaki a4c6ad1d19 * random.c (fill_random_bytes_syscall): use ATOMIC_SET() for
updating try_syscall.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:42:08 +00:00
kosaki 0bdf13a104 * include/ruby/backward/util.h: Good-by Borland-C.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:41:34 +00:00
kosaki 727ae6f813 * common.mk: add a comment how to use "make test-all"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:40:55 +00:00
kosaki 75356fc879 * common.mk: add comments how to use "make benchmark"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 05:40:25 +00:00
nobu 1d1ee07f3c ruby.c: disable nonblock only if nonblocking mode
* ruby.c (open_load_file): disable O_NONBLOCK only when opened in
  non-blocking mode, to get rid of LoadError on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 04:22:44 +00:00
akr 3d61b259ff * lib/securerandom.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 03:58:34 +00:00
nobu 61685c762e test_require.rb: no guarantees to load FIFO
* test/ruby/test_require.rb (loading_fifo): loading from FIFO is
  not guaranteed, it just should not block the whole process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 03:07:39 +00:00
nobu 7cb20b8fb8 test_require.rb: test conditions
* test/ruby/test_require.rb (loading_fifo): check by if FIFO is
  available or not, instead of platform names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:40:59 +00:00
kosaki 348d7b096d * dln.c: remove defined(__WATCOMC__).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:23:18 +00:00
kosaki 3a49d35352 * lib/mkmf.rb: Good-by Borland-C (cont).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:17:46 +00:00
svn 5b9f32c29a * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:11:23 +00:00
kosaki 3a48e12607 * numeric.c: Good-by Borland-C.
* include/ruby/backward/rubyio.h: ditto.
* include/ruby/backward/st.h: ditto.
* include/ruby/backward/util.h: ditto.
* include/ruby/backward/rubysig.h: ditto.
* include/ruby/backward/classext.h: ditto.
* dln.c: ditto.
* gc.c: ditto.
* win32/resource.rb: ditto.
* win32/dir.h: ditto.
* ext/tk/tcltklib.c: ditto.
* NEWS: announce that Borland-C is no longer supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:10:34 +00:00
kosaki e91baf5634 * dln.c: simplify #ifdef. _WIN32 and __CYGWIN__ are exclusive.
see include/ruby/defines.h
* gc.c: ditto.
* ext/sdbm/_sdbm.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:08:56 +00:00
kosaki a923a6f04c * ruby.c (open_load_file): add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:44:31 +00:00
kosaki 395dd7867e fix compile error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:43:53 +00:00
nobu 3d7a535440 file.c: fix compile error
* file.c (rb_file_s_rename): remove unmatched endif not removed at
  r52161.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:30:47 +00:00
kosaki a857b11ded * file.c (rb_file_identical_p): simplify ifdefs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:19:13 +00:00
svn 64a08a5421 * append newline at EOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:18:55 +00:00
kosaki 4ad2057f27 * ChangeLog: Good-bye OS/2.
* common.mk: ditto.
* configure.in: ditto.
* dln_find.c: ditto.
* ext/Setup.emx: ditto.
* ext/extmk.rb: ditto.
* ext/socket/extconf.rb: ditto.
* ext/zlib/extconf.rb: ditto.
* file.c: ditto.
* include/ruby/defines.h: ditto.
* io.c: ditto.
* lib/mkmf.rb: ditto.
* missing/os2.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* NEWS: announce OS/2 is no longer supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:18:34 +00:00
kosaki 6803c4e2a8 * include/ruby/defines.h (DOSISH): add comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:17:50 +00:00
kosaki a0a77c5b33 re-commit r52152
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 00:40:57 +00:00
kosaki 21704f2269 * file.c (ruby_is_fd_loadable): this should be fail if st_mode is
not regular file nor FIFO.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 00:33:44 +00:00
kosaki 698f6648c5 * ruby.c (open_load_file): use rb_thread_wait_fd() instead of reopen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 00:21:03 +00:00
kosaki ff132bc0f4 Revert r52154
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 00:13:52 +00:00
nobu acc94eb939 ruby.c: unnecessary variable
* ruby.c (open_load_file): remove unnecessary nested local
  variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 23:59:00 +00:00
nobu d6379666ca file.c: set errno
* file.c (ruby_is_fd_loadable): set proper errno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 23:41:14 +00:00
nobu d5cb997f18 ruby.c: suppress warnings
* ruby.c (loadopen_func): suppress a warning, unused function.

* ruby.c (open_load_file): suppress warnings, results of close(2).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 23:38:18 +00:00
kosaki 50024f9da6 * io.c (fptr_finalize): don't release gvl if fptr is not writable.
writable fd may block on close(2) when it's on NFS. But readonly
  fd doesn't. [Bug #11559]
  result: make benchmark OPTS="-p bm_require_t -e ruby-trunk -e ruby-2.2.2"
    build-ruby:             0.171
    ruby 2.3.0dev(r52151):  0.659
    ruby 2.2.0p95 (r50295): 0.834

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 23:31:23 +00:00
kosaki bc8687acd6 * ruby.c (open_load_file): reset O_NONBLOCK after open.
Even if S_ISREG() is true, the file may be file on FUSE filesystem
  or something. We can't assume O_NONBLOCK is safe.
  Moreover, we should wait if the path is point to FIFO. That's
  FIFO semantics. GVL should be transparent from ruby script.
  Thus, just reopen without O_NONBLOCK for filling the requirements.
  [Bug #11060][Bug #11559]
* ruby.c (loadopen_func): new for the above.
* file.c (ruby_is_fd_loadable): new. for checks loadable file type
  of not.
* file.c (rb_file_load_ok): use ruby_is_fd_loadble()
* internal.h: add ruby_is_fd_loadble()
* common.mk: now, ruby.o depend on thread.h.
* test/ruby/test_require.rb
(TestRequire#test_loading_fifo_threading_success): new test.
  This test successful case that loading from FIFO.
* test/ruby/test_require.rb
(TestRequire#test_loading_fifo_threading_raise): rename from
  test_loading_fifo_threading. You souldn't rescue an exception
  if you test raise or not.
  Moreover, this case should be caught IOError because load(FIFO)
  should be blocked until given any input.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 21:09:10 +00:00
svn 9ec8d4ef30 * 2015-10-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 16:40:11 +00:00
nagachika 058ba6cebd * ChangeLog: remove duplicated entry of r52147. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 16:39:52 +00:00
nobu eb4dc17956 test_const.rb: suppress warnings
* test/ruby/test_const.rb (test_redefinition_memory_leak):
  suppress warnings instead of redirecting to null device.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 05:01:41 +00:00
nobu 78baa98e69 string.c: rb_str_cat_conv_enc_opts
* file.c (rb_file_expand_path_internal): concatenate converted
  string to the result instead of making converted string and
  append it.
* string.c (rb_str_cat_conv_enc_opts): from rb_str_conv_enc_opts,
  separate function to concatenate with transcoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-17 04:55:47 +00:00