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

8372 Коммитов

Автор SHA1 Сообщение Дата
nobu d3b3eff1a9 test_win32ole_event.rb: fix typo [ci skip]
* test/win32ole/test_win32ole_event.rb: fix typo.
  swbemsink_avairable? => swbemsink_available?  [Fix GH-1025]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-21 11:53:41 +00:00
akr c748ac9893 * test/lib/envutil.rb: mkfifo command based File.mkfifo method
definition removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-19 17:18:49 +00:00
nobu 9289515562 file.c: File.mkfifo
* file.c (rb_file_s_mkfifo): implement File.mkfifo.
  [Feature #11536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-18 11:11:14 +00:00
kosaki ae05ae33c1 * test/ruby/test_dir.rb (TestDir#test_fileno): s/?x/"x"/. Don't
use tricky code, please.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-17 03:21:15 +00:00
nobu dfa9eb54bd variable.c: fail if frozen
* variable.c (set_const_visibility): fail if the class/module is
  frozen.  [ruby-core:70828] [Bug #11532]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16 11:39:29 +00:00
nobu 965d8241c1 string.c: keep coderange
* string.c (rb_str_setbyte): keep the code range as possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16 05:50:00 +00:00
kosaki bb79c011bf * test/ruby/test_thread.rb (TestThread#test_mutex_synchronize):
insert waste loop for invoking preemptive thread context switch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-15 19:23:43 +00:00
shugo 5425099a9f * lib/net/ftp.rb (parse_mlsx_entry): parse pathnames including
space correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-14 10:27:28 +00:00
shugo 2478c7bc33 * lib/net/ftp.rb (file?, directory?, appendable?, creatable?,
deletable?, enterable?, renamable?, listable?, directory_makable?,
  purgeable?, readable?, writable?): new methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 14:09:45 +00:00
shugo 2ec793ab27 * lib/net/ftp.rb (FACT_PARSERS): support system dependent facts
UNIX.mode, UNIX.owner, UNIX.group, UNIX.ctime, and UNIX.atime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 12:29:32 +00:00
shugo 777c719450 * lib/net/ftp.rb (parse_mlsx_entry, mlst) raise an FTPProtoError
when parsing failed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 09:16:21 +00:00
shugo 8a97ffe094 * lib/net/ftp.rb (mlst, mlsd): support new commands MLST and MLSD
specified in RFC 3659.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 08:57:17 +00:00
nobu f150a381db win32.c: more fcntl
* win32/win32.c (fcntl): implement F_GETFD, F_SETFD, and
  F_DUPFD_CLOEXEC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 05:23:22 +00:00
nobu 78f7e342d1 test_rational.rb: fix default external
* test/ruby/test_rational.rb (test_conv): fix default external
  encoding, which affects inspect results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 04:48:36 +00:00
nobu 7a0981facc test_rational.rb: r51828
* test/ruby/test_rational.rb (test_conv): test for r51828,
  encoding of exception message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 01:29:32 +00:00
shugo 782e2148af * lib/net/ftp.rb (size, mdtm, system): parse responses according to
RFC 959 and 3659, where reply codes must be followed by SP.

* lib/net/ftp.rb (system): remove LF from the return value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-11 02:23:31 +00:00
nobu b4efab9ed9 parse.y: keep literal encoding
* parse.y (literal_concat_gen, evstr2dstr_gen): keep literal
  encoding beginning with an interpolation same as the source file
  encoding.  [ruby-core:70703] [Bug #11519]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-10 13:48:51 +00:00
shugo 5c09cb9c1e * lib/net/ftp.rb (getmultiline): refactor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-10 06:16:37 +00:00
nobu 3d5fd5f30d compile.c: register cdhash
* compile.c (iseq_build_from_ary_body): register cdhash to the
  iseq constant body instead of compile time mark array, not to
  get GCed.  [ruby-core:70708] [Feature #8543]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-10 03:17:30 +00:00
usa dbe4a7f11c * test/ruby/test_process.rb (TestProcess#test_popen_exit): platform specific
option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-09 02:57:58 +00:00
usa 01762af749 * test/ruby/test_process.rb (TestProcess#test_popen_exit): platform specific
option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-09 02:52:27 +00:00
hsbt 2f227df3f9 * test/rubygems/test_config.rb: fix broken tests for Windows platform.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-09 01:05:47 +00:00
hsbt 59991b6ac5 * lib/rubygems: Update to RubyGems HEAD(fe61e4c112).
this version contains new feature that warn invalid SPDX license
  identifiers. https://github.com/rubygems/rubygems/pull/1249
  and #1032, #1023, #1332, #1328, #1306, #1321, #1324
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-08 22:46:43 +00:00
nagachika 37464c5c86 fix a typo of test method name.
* test/ruby/test_file.rb (test_realdirpath_junction): fix a typo of method name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-08 14:25:56 +00:00
nobu f3f10297f0 io.c: no wait when killed
* io.c (rb_io_s_popen): do not wait the child process during being
  killed.  [ruby-core:70671] [Bug #11510]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-08 14:09:30 +00:00
usa 88d96a4fa9 * test/ruby/test_file.rb (TestFile#test_realdirpath_junktion): test for r51790.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-08 13:51:04 +00:00
shugo d5d6b149df * lib/net/ftp.rb (list): fetch all the lines before yielding a block
to allow other commands in the block.  [Feature #11454]
  Patched by Srikanth Shreenivas.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-08 06:08:20 +00:00
nobu cfecd21a89 process.c: open exception message
* process.c (rb_execarg_parent_start1): raise with the target path
  name when open() failed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-07 15:14:46 +00:00
nobu be3de529c2 process.c: chdir exception message
* process.c (rb_exec_fail): raise with the target directory name
  when chdir() failed.  pointed out by sorah.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-07 14:45:31 +00:00
nobu d57e043ab5 test_framework.rb: use Ruby framework
* test/mkmf/test_framework.rb (test_single_framework): use Ruby
  framework, as CoreFoundation framework uses Apple extensions
  unsupported by standard GCC other than Apple-patched clang.

* test/mkmf/test_framework.rb (test_multi_frameworks): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-07 08:51:01 +00:00
nobu 2bfc88a45e test_process.rb: suppress warnings
* test/ruby/test_process.rb (test_exec_close_reserved_fd):
  suppress "cannot close fd before spawn" warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-06 06:00:12 +00:00
nobu 88083fa47e rss.rb: fix usec width
* lib/rss/rss.rb (Time#w3cdtf): fix zero-trimmed width of fraction
  digits.  [ruby-core:70667] [Bug #11509]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05 02:39:55 +00:00
nobu d41838c8d4 common.mk: exclude memory leak tests
* common.mk (TEST_EXCLUDES): exclude tests for memory leak, often
  too expensive and/or false-positive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 05:22:41 +00:00
hsbt 4a14d94418 * ext/psych/*: merge psych master(8737e5b). It contains following fixes.
https://github.com/tenderlove/psych/pull/242
  https://github.com/tenderlove/psych/pull/246 [ruby-list:50219]
* test/psych/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 09:50:00 +00:00
nobu f9ac2106bf file.c: use filesystem encoding
* file.c (rb_realpath_internal): use filesystem encoding if the
  argument is in ASCII encodings.
* win32/file.c (rb_readlink): needs the result encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-02 07:58:24 +00:00
ko1 7ef01f83ac * test/thread/test_queue.rb: catch up last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-01 09:37:33 +00:00
ko1 15e48288fd * class.c (move_refined_method): should insert a write barrier
from an original class to a created (cloned) method entry.
* test/ruby/test_refinement.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-31 08:07:59 +00:00
nobu 822c3999d0 test_win32ole_event.rb: skip message
* test/win32ole/test_win32ole_event.rb (exec_notification_query_async):
  add skip message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-30 07:15:52 +00:00
nobu e7d578bf58 test_win32ole_event.rb: skip 80041008
* test/win32ole/test_win32ole_event.rb (exec_notification_query_async):
  skip error with OLE error code:80041008, which seems to occur when
  logging in as a non admistrator user.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-30 06:46:16 +00:00
tenderlove 801e1fe46d * ext/openssl/ossl_ssl.c (static const struct): Only add SSLv3 support
if the SSL library supports it.  Thanks Kurt Roeckx <kurt@roeckx.be>
  [Bug #11376]

* ext/openssl/extconf.rb: check for SSLv3 support in the SSL
  implementation.

* test/openssl/test_ssl.rb (class OpenSSL): Skip tests that need SSLv3
  if there is no support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-29 17:45:14 +00:00
nobu c5b0dc63de test_pathname.rb: fix exception
* test/pathname/test_pathname.rb (has_symlink): now raises ENOENT
  instead of TypeError when symlink is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-29 05:19:49 +00:00
nobu 8879d73ffd test: try File.symlink with invalid paths
* test (have_symlink?): try File.symlink with invalid paths to
  test the administrator privilege, nil just raises an
  ArgumentError before trying the actual API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-29 01:25:07 +00:00
nobu 5dfc455b72 test: File.symlink needs administrator privilege
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 01:24:36 +00:00
ko1 868c98dccf * vm.c (hook_before_rewind): prevent kicking :return event while
finishing vm_exec func because invoke_block_from_c() kick a :return
  event for bmethods.
  [Bug #11492]
* test/ruby/test_settracefunc.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-28 01:20:32 +00:00
hsbt 2ded8d0698 * lib/webrick/server.rb: use IO::NULL instead of '/dev/null'
* test/ruby/test_string.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 09:05:48 +00:00
ko1 fd7ac9f3c9 * thread_tools.c: add Queue#close(exception=false) and
SizedQueue#close(exception=false).
  [Feature #10600]
  Trying to deq from a closed empty queue return nil
  if exception parameter equals to false (default).
  If exception parameter is truthy, it raises
  ClosedQueueError (< StopIteration).
  ClosedQueueError inherits StopIteration so that you can write:
    loop{ e = q.deq; (using e) }
  Trying to close a closed queue raises ClosedQueueError.
  Blocking threads to wait deq for Queue and SizedQueue will be
  restarted immediately by returning nil (exception=false) or
  raising a ClosedQueueError (exception=true).
  Blocking threads to wait enq for SizedQueue will be
  restarted by raising a ClosedQueueError immediately.
  The above specification is not proposed specification, so that
  we need to continue discussion to conclude specification this
  method.
* test/thread/test_queue.rb: add tests originally written by
  John Anderson and modify detailed behavior.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 22:59:32 +00:00
nobu 499120ad6e test_pathname.rb: skip EACCES
* test/pathname/test_pathname.rb (test_realpath): skip EACCES if
  changing mode of a directory may have no effect.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 14:49:07 +00:00
nobu e0cc69b74e test_fileutils.rb: improve my_rm_rf
* test/fileutils/test_fileutils.rb (my_rm_rf): get rid of special
  chars and remove by rmdir on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 08:11:58 +00:00
nobu 5ce4bfc9d2 re.c: fix wchar match at EOS
* re.c (rb_memsearch_wchar, rb_memsearch_qchar): test matching
  till the end of string.  [ruby-core:70592] [Bug #11488]
* test/ruby/test_m17n.rb (test_include?, tet_index): add tests by
  Tom Stuart.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 01:52:04 +00:00
ko1 7cf523c7db * vm_opts.h, iseq.c, iseq.h: add compile option to force frozen
string literals.
  [Feature #11473]
  This addition is not specification change, but to try frozen
  string literal world discussed on [Feature #11473].
  You can try frozen string literal world using this magical line:
    RubyVM::InstructionSequence.compile_option =
      {frozen_string_literal: true}
  Note that this is a global compilation option, so that you need to
  compile another script like that:
    p 'foo'.frozen? #=> false
    RubyVM::InstructionSequence.compile_option =
      {frozen_string_literal: true}
    p 'foo'.frozen? #=> false, because this line is already compiled.
    p eval("'foo'.frozen?") #=> true
  Details:
    * String literals are deduped by rb_fstring().
    * Dynamic string literals ("...#{xyz}...") is now only frozen,
      not deduped. Maybe you have other ideas.
  Now, please do not use this option on your productions :)
  Of course, current specification can be changed.
* compile.c: ditto.
* test/ruby/test_iseq.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21 20:47:53 +00:00