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

8083 Коммитов

Автор SHA1 Сообщение Дата
gogotanaka b5f8aec516 * test/ruby/test_math.rb: add tests for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03 05:59:40 +00:00
nobu 5eea2af481 test_rubyoptions.rb: use assert_segv
* test/ruby/test_rubyoptions.rb (test_segv_loaded_features): use
  assert_segv to simplify.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-03 05:20:22 +00:00
odaira 120518576e * test/ruby/test_symbol.rb: avoid a false positive in AIX
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 22:53:02 +00:00
nobu 89333366a0 envutil.rb: fix typo
* test/lib/envutil.rb (invoke_ruby): fix typo again.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 07:54:30 +00:00
nobu 4a0e9c5cce envutil.rb: fix const name
* test/lib/envutil.rb (invoke_ruby): fix an exception class name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 07:20:13 +00:00
nobu b6cc839db4 test_process.rb: remove intermediate child process
* test/ruby/test_process.rb (test_deadlock_by_signal_at_forking):
  spawn the target process directly with assert_separately and
  remove intermediate child process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 06:50:28 +00:00
nobu 7be21a316f envutil.rb: timeout_error argument to invoke_ruby
* test/lib/envutil.rb (invoke_ruby): add `timeout_error` optional
  keyword argument, the exception class to be raised if the target
  process timed out.  if it is nil, no exception will be raised at
  timeout but the terminated output, error, and status will be
  returned.  defaulted to Timeout::Error.

* test/lib/envutil.rb (assert_separately): check outputs and
  status (including diagnostic reports) of timed-out process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 06:44:34 +00:00
nobu 876d664069 envutil.rb: signal list to invoke_ruby
* test/lib/envutil.rb (invoke_ruby): allow `signal` optional
  keyword argument to be a list of signals to be sent to the
  target process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 06:44:22 +00:00
nobu 76d1d5269f signal.c: nil for invalid signum
* signal.c (sig_signame): return nil if the argument is a valid
  signal number.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 04:04:30 +00:00
ngoto ba536e4154 * test/net/ftp/test_ftp.rb (create_ftp_server): set SO_OOBINLINE
for receiving OOB data which is sended with MSG_OOB flag in
  portable way. [Bug #10915] [ruby-dev:48885]
* test/net/ftp/test_ftp.rb (test_abort, test_status): use gets
  for receiving OOB data in portable way.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 03:07:18 +00:00
normal 26e1ebdc1e io/wait: fix return value for buffered read
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
  Thanks to Yura Sokolov <funny.falcon@gmail.com>
  [ruby-core:68369] [Bug#10923]
* test/io/wait/test_io_wait.rb (test_nread_buffered):
  fix broken test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 21:03:22 +00:00
nobu e961fcd528 envutil.rb: signal argument
* test/lib/envutil.rb (invoke_ruby): add optional keyword argument
  of signal to be sent to hung-up process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 11:21:40 +00:00
akr a12a453152 add tests for strptime("%s.%N").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 00:13:11 +00:00
nobu fe6cf485e6 enum.c: Fixnum only
* enum.c (limit_by_enum_size, enum_size_over_p): check only
  against Fixnum size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-28 09:09:18 +00:00
nobu 98273af3f7 enum.c: limit size
* enum.c (enum_each_slice, enum_each_cons): limit elements size by
  the enumerator size.  suggested by Hans Mackowiak <hanmac AT
  gmx.de> at [ruby-core:68335]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-28 08:18:42 +00:00
nobu 1ef1a0c602 variable.c: preserve name encoding of subclass
* variable.c (rb_tmp_class_path): preserve name encoding of an
  anonymous instance of module/class subclass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-28 06:02:06 +00:00
hsbt d9c32d62a0 * lib/rubygems: Update to RubyGems 2.4.6 and HEAD(800f2e6).
Fixed #1159, #1171, #1173 on rubygems/rubygems
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 13:00:45 +00:00
hsbt b89e894399 * lib/rake: Update to rake (9237e74), typo fix and remove needless
private syntax.
* test/rake: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 11:55:47 +00:00
nobu e1aba5bb2f test_io.rb: separate platform-specific tests
* test/ruby/test_io.rb: separate platform-specific tests at load
  time instead of runtime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-26 14:42:24 +00:00
usa dad59fcd12 * ext/win32/Win32API.rb (initialize): accept both a string and an array
for the arguments of the imported function.
  reported by Aaron Stone [ruby-core:68208] [Bug #10876] [Fixes GH-835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-25 13:08:01 +00:00
nobu f4726dcdaa dir.c: same encoding to the pattern
* dir.c (push_pattern, push_glob): make globbed file names same
  encoding to the given pattern.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-25 06:59:39 +00:00
gogotanaka 0c3a0d6588 * lib/cmath.rb (log): raise ArgumentError when more than 2 arguments
are passed. [ruby-core:66143] [Bug #10487]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 23:53:21 +00:00
gogotanaka 1765438110 * test/ruby/test_math.rb: Use assert_infinity instead of assert_equal(1.0/0, ...).
* test/ruby/test_math.rb: Add tests for overriding Integer#to_f.
  [ruby-core:67919] [Misc #10809]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 17:24:45 +00:00
nobu 3bcb10ad2a complex.c: multiply as rotation
* complex.c (nucomp_mul): calculate as rotation in complex plane
  if matrix calculation resulted in NaN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 13:58:52 +00:00
gogotanaka 87e3aec84d * test/ruby/test_math.rb(test_cbrt): Add an assertion for Math.cbrt(1.0/0)
and move #test_cbrt to more proper place.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 12:57:23 +00:00
nobu 4c0106ead6 string.c: smart chomp
* string.c (chompped_length): enable smart chomp for all non-dummy
  encoding strings, not only default_rs.
  [ruby-core:68258] [Bug #10893]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-24 00:47:12 +00:00
nobu a10fdc9270 string.c: proper exception
* string.c (rb_str_split_m): raise ArgumentError at broken string
  not RegexpError, as Regexp is not involved in.
  [ruby-core:68229] [Bug #10886]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-23 06:26:42 +00:00
eregon 9759173cfc * time.c: zone encoding should be US-ASCII if all 7-bits. Fix r46907.
* test/ruby/test_time.rb, test/ruby/test_time_tz.rb: Update tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-22 22:26:55 +00:00
ktsj e660f776c0 * vm_insnhelper.c (rb_vm_rewrite_cref_stack): copy nd_refinements
of orignal crefs. It fixes segmentation fault when calling
  refined method in duplicate module. [ruby-dev:48878] [Bug #10885]

* vm_core.h, class.c: change accordingly.

* test/ruby/test_refinement.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-22 07:05:14 +00:00
nobu 2d12151a68 re.c: RMatch::regexp can be nil
* re.c (match_aref): RMatch::regexp is Qnil after matching by a
  string since r45451.  [ruby-core:68209] [Bug #10877]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21 10:51:52 +00:00
nobu 471457733e file.c: fix handle leak
* file.c (rb_file_identical_p): fix handle leak, ensure to close
  the handle of the first argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20 08:27:14 +00:00
nobu a520e71c5c test_file_exhaustive.rb: tests for File.identical?
* test/ruby/test_file_exhaustive.rb (test_path_identical_p):
  rename and add other tests for File.identical? method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20 08:20:10 +00:00
nobu 5a76aceff6 test_file_exhaustive.rb: remove useless assignment
* test/ruby/test_file_exhaustive.rb (make_tmp_filename): not
  assign to instance variable, @hardlinkfile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20 08:20:05 +00:00
nobu ebba8297bb test_file.rb: just skip assertion
* test/ruby/test_file.rb (TestFile#test_stat): skip an assertion
  only, not making the entire test skipped

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20 08:19:48 +00:00
nobu eb7ddaa3a4 test_rubyoptions.rb: fix for r46355 and r49638
* test/ruby/test_rubyoptions.rb (test_version, test_verbose):
  extra lines (currently last_commit and malloc_conf) may be shown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-19 01:54:30 +00:00
nobu 0998c2dd06 win32/file.c: fix drive letter
* win32/file.c (rb_file_expand_path_internal): neither the drive
  of base directory nor the current drive are involved in the
  result if different than the drive of path.
  [ruby-core:68130] [Bug #10858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-18 16:58:13 +00:00
tenderlove f595568e47 * ext/psych/lib/psych.rb: bump psych version.
* ext/psych/psych.gemspec: ditto
* ext/psych/yaml/scanner.c: add latest libyaml change.
* test/psych/helper.rb: support newer minitest
* test/psych/test_to_yaml_properties.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 18:17:46 +00:00
nobu 466bd05fda resolv.rb: fix equality
* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
  returned by Kernel#instance_variables are Symbols now.
  [ruby-core:68128] [Bug #10857]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 02:47:19 +00:00
nobu f7a73f3e8b win32/file.c: fix drive letter
* win32/file.c (rb_file_expand_path_internal): do not make invalid
  (or ADS) path if the path has a drive letter, the result also
  should have be under it.  [ruby-core:68130] [Bug #10858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 01:53:32 +00:00
tenderlove a86eacf552 * ext/coverage/coverage.c: Add Coverage.peek_result. Allows you to
capture coverage information without stopping the coverage tool.
  [ruby-core:67940] [Feature #10816]

* test/coverage/test_coverage.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 15:53:47 +00:00
mame 6b6680945e * lib/base64.rb: make urlsafe mode user-friendly.
* lib/base64.rb (Base64.urlsafe_encode64): a new option "padding" to
  suppress the padding character ("=").

* lib/base64.rb (Base64.urlsafe_decode64): now it accepts not only
  correctly-padded input but also unpadded input.
  [Feature #10740][ruby-core:67570]

* test/base64/test_base64.rb: Test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 12:31:30 +00:00
nobu 6fbba1155f test_cipher.rb: ignore wrap mode erros
* test/openssl/test_cipher.rb (test_ciphers): ignore wrap mode
  errors if "wrap" is contained in the name.  seems no explicit
  rules.
  http://rubyci.blob.core.windows.net/fedora21/ruby-trunk/log/20150213T001502Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 02:06:31 +00:00
nobu 643dced67c test_random.rb: add
* test/openssl/test_random.rb (OpenSSL::TestRandom): add minimum
  tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12 09:36:55 +00:00
nobu a6747a0993 test_cipher.rb: show cipher name
* test/openssl/test_cipher.rb (test_ciphers): show wrap mode
  cipher name, which does not end with "wrap".
  http://rubyci.blob.core.windows.net/fedora21/ruby-trunk/log/20150212T061502Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12 08:33:20 +00:00
nobu 2049c58dfd drbtest.rb: refactor
* test/drb/drbtest.rb (test_07_public_private_protected_missing):
  refactor by splitting and using assert_raise.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12 02:47:29 +00:00
eregon a1992e25b9 * compar.c (cmp_equal): no more error hiding for Comparable#==.
It now behaves as other Comparable methods. See #7688.
* test/ruby/test_comparable.rb: update related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 19:33:46 +00:00
nobu e5c516c89a generator.c: fix infinite recursion
* ext/json/generator/generator.c (generate_json): get rid of
  unnecessary recursive calls which can cause infinite recursion.
  T_STRING may not have rb_cString.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:01:36 +00:00
suke 11ac08676d * test/win32ole/test_word.rb: use skip method to skip test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 22:54:39 +00:00
shugo 53053bcac6 * vm_insnhelper.c (vm_call_method): stop method search when a method
is not found in a refinement, to support undef in refinements.
  [ruby-core:66741] [Bug #10578]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 02:40:21 +00:00
shugo cd29e5fcef * lib/net/ftp.rb (chdir, delete, gettextfile, mdtm, mkdir, nlst,
putbinaryfile, puttextfile, rename, rmdir, size): support
  Pathname. Patch by Joe Rafaniello. [fix GH-828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 02:26:06 +00:00
nobu af775f2b2c TestException.rb: exclude stack overflow tests
* test/excludes/TestException.rb: exclude machine stack overflow
  tests by default.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-09 01:28:32 +00:00
nobu bfd1fbf098 test/unit.rb: regexps to exclude
* test/lib/test/unit.rb (ExcludedMethods#exclude_from): allow
  regexps for methods to be excluded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-09 01:28:20 +00:00
hsbt 1a98f56ae1 * lib/net/http/header.rb: pass header names as symbols.
Patch by @DamirSvrtan [fix GH-805]
* test/net/http/test_httpheader.rb: added test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 11:09:44 +00:00
suke d9bc7904fa * test/win32ole/test_win32ole_record.rb: remove test using .NET
Framework 3.5 because it is not included in Windows 8/8.1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-07 13:17:22 +00:00
suke a654ee3128 * test/win32ole/test_win32ole_record.rb
(test_ole_instance_variable_get): correct VT_RECORD type and
  instance variables.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-07 04:37:11 +00:00
nobu 461c38a973 dir.c: fix escaping multibyte char
* dir.c (has_magic): fix escaping multibyte char, with glob
  meta-char in trailing bytes, e.g., Shift-JIS

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-07 00:11:00 +00:00
nobu 6548425ee0 test_dir_m17n.rb: fix tests
* test/ruby/test_dir_m17n.rb (with_enc_path): test with UTF-8
  default external encoding for non-locale environments.

* test/ruby/test_dir_m17n.rb (test_glob_warning_opendir): valid
  only if file permissions work.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 13:24:09 +00:00
tenderlove ecbf835180 * ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes when
dumping objects with custom coders. [ruby-core:66215] [Bug #10496]

* test/psych/test_coder.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:50:00 +00:00
nobu ef5b8fe12f dir.c: preserve encoding
* dir.c (sys_enc_warning_in): preserve encoding of path name in
  warning messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:37:27 +00:00
nobu 9f9034bba1 test_cipher.rb: OpenSSL 1.0.2
* test/openssl/test_cipher.rb (OpenSSL::TestCipher#test_ciphers):
  OpenSSL 1.0.2 does not allow wrap mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:30:55 +00:00
tenderlove 56d4257a67 * ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regular
expressions with newlines. tenderlove/psych#222

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:00:54 +00:00
nobu b4f61ad610 vm_core.h: fix symbols leak
* vm_core.h (rb_call_info_kw_arg_struct): make keywords a symbols
  list to get rid of inadvertent creation by variable keyword
  arguments.  [ruby-core:68031] [Bug #10831]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 01:31:53 +00:00
hsbt c3546c76c8 * lib/rubygems: Update to RubyGems HEAD(5c3b6f3).
Fixed #1156, #1142, #1115, #1142, #1139 on rubygems/rubygems
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 13:42:45 +00:00
nobu 69be362030 test_gc.rb: read binary
* test/ruby/test_gc.rb (test_exception_in_finalizer): read in
  binary encoding to get rid of invalid byte sequence exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 08:19:44 +00:00
nobu bca963220a mkmf/base.rb: fix constant scope
* test/mkmf/base.rb (TestMkmf::Base): fix constant scope for
  r49482.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 04:50:18 +00:00
nobu a932a1b83d test_inadvertent_creation.rb: assert method_missing
* test/-ext-/symbol/test_inadvertent_creation.rb
  (assert_no_immortal_symbol_in_method_missing): assert
  method_missing.  [Bug #10828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 04:49:30 +00:00
nobu 738ce30f99 convert method name to a Symbol
* vm_eval.c (send_internal), vm_insnhelper.c (vm_call_opt_send):
  convert String method name into a Symbol, as method_missing
  method expects its first argument to be a Symbol.  [Bug #10828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 04:41:05 +00:00
nobu 73645c1c51 vm_insnhelper.c: fix missing reason
* vm_insnhelper.c (ci_missing_reason): return the reason of method
  missing in call info.
* vm_insnhelper.c (vm_call_opt_send): re-apply r49500 with the
  proper missing reason.  [Bug #10828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 03:31:07 +00:00
nobu 0e414175fd test_inadvertent_creation.rb: move tests
* test/-ext-/symbol/test_inadvertent_creation.rb: move symbol leak
  tests, for implementation details, from test/ruby/test_symbol.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05 02:10:44 +00:00
marcandre 1fd6ab5bab * vm_insnhelper.c: Revert r49500 (6ae6a8c7bc)
Creates a regression in test_drb. Above my rubyfu. [#10828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 19:45:16 +00:00
marcandre 18eef0b9be * vm_eval.c: Fix symbol leak with non optimized +send+ and method_missing [#10828]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 19:10:03 +00:00
marcandre 6ae6a8c7bc * vm_insnhelper.c: Fix symbol leak with +send+ and method_missing [#10828]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 19:03:20 +00:00
marcandre 454f89e2ea * vm_insnhelper.c: Fix one type of symbol leak with +send+
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 19:03:04 +00:00
shugo dc3ea52e1c * class.c (method_entry_i, class_instance_method_list,
rb_obj_singleton_methods): should not include methods of
  superclasses if recur is false. [ruby-dev:48854] [Bug #10826]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 07:45:29 +00:00
nobu a91de8317c mkmf.rb: err by non existent file
* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): err by non
  existent source file.  [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 01:36:54 +00:00
nobu af5b7053f1 mkmf.rb: avoid interference
* lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): get rid of
  interference by modifying global variables in have_devel? method.
  [ruby-core:67962] [Bug #10821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03 08:15:47 +00:00
shugo 525f515f9a * vm_method.c (remove_method): When remove refined
method, raise a NameError if the method is not
  defined in refined class.

  But if the method is defined in refined class,
  it should keep refined method and remove original
  method.

  Patch by Seiei Higa. [ruby-core:67722] [Bug #10765]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03 06:26:48 +00:00
nobu 45df1c24d2 dir.c: glob legacy short name
* dir.c (glob_helper): obtain real name with FindFirstFile API
  instead of matchin all entries, on Windows.
  [ruby-core:67954] [Bug #10819]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-03 05:04:49 +00:00
nobu 5146f5abe9 test_backtrace.rb: add tests
* test/ruby/test_backtrace.rb (test_caller_locations_base_label):
  test for Thread::Backtrace::Location#base_label.

* test/ruby/test_backtrace.rb (test_caller_locations_label): test
  for Thread::Backtrace::Location#label.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-01 09:40:09 +00:00
nobu 8f02de2050 test_backtrace.rb: add test
* test/ruby/test_backtrace.rb (test_caller_locations_lineno): test
  for Thread::Backtrace::Location#lineno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-31 13:57:46 +00:00
nobu 4c1afa78aa test_backtrace.rb: split test
* test/ruby/test_backtrace.rb (test_caller_locations_absolute_path):
  split from test_caller_locations_path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-31 13:57:34 +00:00
nobu dc0991c8d8 test_backtrace.rb: add test
* test/ruby/test_backtrace.rb (test_caller_locations_path): test
  for Thread::Backtrace::Location#path and #absolute_path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-31 13:10:05 +00:00
tenderlove 6ce27adabe * ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes with
instance variables when it is referenced multiple times.
* ext/psych/lib/psych.rb: bump version
* ext/psych/psych.gemspec: bump version
* test/psych/test_hash.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-28 17:37:09 +00:00
nobu 34d4105556 string.c: consider widechar
* string.c (str_make_independent_expand): consider wide char
  encoding.  [Fix GH-821]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 02:39:00 +00:00
nobu 622f3f14b6 string.c: terminate when embedded
* string.c (str_make_independent_expand): terminate String when
  moved from heap to embedded.  [Fix GH-821].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 02:37:51 +00:00
nobu aa436bdca6 array.c: reduce to_ary call
* array.c (flatten): no need to call to_ary method on elements
  beyond the given level.  [ruby-core:67637] [Bug #10748]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-25 03:04:10 +00:00
nobu 7d87d0c466 test_array.rb split flatten tests
* test/ruby/test_array.rb (test_flatten, test_flatten!): split.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-25 03:02:39 +00:00
nobu 62ef383523 test_module.rb: more tests
* test/ruby/test_module.rb: more tests for multiple prepend.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-20 01:58:52 +00:00
nobu 59270c607b class.c: prepend for each classes
* class.c (include_modules_at): allow prepend each modules upto
  once for each classes.  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-19 13:08:28 +00:00
nobu dd1baaabcd vm_method.c: method defined should not use refinements.
* vm_method.c (check_definition): Module#public_method_defined?,
  Module#private_method_defined?, Module#protected_method_defined?
  should not use refinements. [ruby-core:67656] [Bug #10753]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-18 06:57:34 +00:00
nobu f59ce53f26 yaml_tree.rb: fix anchor
* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
  anchors like `\Z` are not valid inside character class.  use
  negative-lookahead instead.
  Fixes: https://github.com/tenderlove/psych/issues/221

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 14:59:18 +00:00
tenderlove fe0414b547 * ext/psych/lib/psych/visitors/yaml_tree.rb: only dump hash
subclasses. Thanks Joe Eli McIlvain <joe.eli.mac@gmail.com>

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:39:13 +00:00
tenderlove a5c577757e * ext/psych/lib/psych.rb: bump version
* ext/psych/lib/psych/visitors/yaml_tree.rb: fix line width wrapping
  for long strings.  Thanks Jakub Jirutka <jakub@jirutka.cz>

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:37:22 +00:00
ktsj e62a99b924 * eval_intern.h, vm.c, vm_eval.c, vm_insnhelper.c:
change throw mechanism (not save target ep, but save target cfp).
  It fixes `unexpected break' bug that occurs when
  TracePoint#binding is called.
  [ruby-dev:48797] [Bug #10689]

* test/ruby/test_settracefunc.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 02:54:22 +00:00
svn 0b66e2a5e2 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-15 15:26:24 +00:00
akr 255955585c * io.c (rb_io_close_m): Don't raise when the IO object is closed.
[ruby-core:67444] [Feature #10718]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-15 15:26:03 +00:00
nobu 0fce0b7ba1 proc.c: singleton_method should not use refinements
* proc.c (rb_obj_singleton_method): Kernel#singleton_method should
  not use refinements, as well as Kernel#method.
  [ruby-core:67603] [Bug #10744]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-15 12:35:00 +00:00
nobu 5ec029d1ea array.c: linear performance
* array.c (rb_ary_select_bang, ary_reject_bang): linear
  performance.  [ruby-core:67418] [Feature #10714]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-15 01:44:57 +00:00
duerst e3c4c7e13b * lib/uri/mailto.rb: raising URI::InvalidComponentError instead
of failing with undefined method `split' for nil:NilClass for
  mailto: URIs without opaque part. [Bug #10738]
* test/uri/testuri.rb: Test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14 09:06:13 +00:00
nobu 095886b572 readline.c: initialize before rl_refresh_line
* ext/readline/readline.c (readline_s_refresh_line): initialize
  before rl_refresh_line(), as some function make the internal
  state non-clean but rl_refresh_line() does not re-initialize it.
  [ruby-core:43957] [Bug #6232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14 06:43:50 +00:00
nobu 4d426fc2e0 test_basicsocket.rb: do not hardcode port number
* test/socket/test_basicsocket.rb (socks): use dynamically chosen
  port number, and remove never used argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:37:05 +00:00
headius d739458b71 * test/socket/test_basicsocket.rb: Remove unused constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:35:23 +00:00
svn 2705eeea16 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:22:31 +00:00
headius 4eacd5debc * test/socket/test_basicsocket.rb: Add basic tests for close_read
and close_write using TCPServer/Socket as a target.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 23:22:17 +00:00
hsbt 8f37674ffd * ext/json, test/json: merge JSON HEAD(259dee6)
separate imprementation of Typed_Data macro.
  https://github.com/flori/json/compare/v1.8.1...v1.8.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 12:08:28 +00:00
nobu b4089826fb test_http.rb: test without DNS access
* test/net/http/test_http.rb: get rid of accessing DNS actually
  for some servers returning wrong results.
  [ruby-core:67454] [Bug #10721]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 05:16:37 +00:00
nobu 6b8b66b401 range.c: class name encoding
* range.c (range_bsearch): preserve encoding of class name in an
  exception message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 03:47:55 +00:00
usa 14804d6b09 * test/ruby/test_numeric.rb (TestNumeric#test_coerce): fixed wrong message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 14:09:13 +00:00
normal 34289fff0f numeric.c: correct error message when coerce fails
* numeric.c (bit_coerce): use original value for error message
  [ruby-core:67405] [Bug #10711]
* test/ruby/test_numeric.rb (test_coerce): check error message

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 09:56:14 +00:00
nobu 77f3125567 rdoc/text.rb: fix infinite loop
* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
  CR.  should check if substitution occurred too.
  [ruby-dev:48813] [Bug #10732]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 09:01:28 +00:00
nobu 1abd51ad91 vm_method.c: NameError at refined method alias
* vm_method.c (rb_alias): raise a NameError when creating alias to
  a refined method if the original method of the refined method is
  not defined.  [ruby-core:67523] [Bug #10731]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 07:45:49 +00:00
nobu 4d69e03b66 array.c: class name encoding
* array.c (rb_ary_bsearch): preserve encoding of class name in an
  exception message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 23:48:10 +00:00
akr 57b87a00f8 [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 15:58:40 +00:00
nobu 7c4d749d18 test_utils.rb: dynamically chosen port number
* test/webrick/test_utils.rb (test_create_listeners): use
  dynamically chosen port number, not hardcoded port number.
  [ruby-core:67508]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 06:11:40 +00:00
nobu 7dddd592d1 test/unit.rb: --excludes-dir list
* test/lib/test/unit.rb (ExcludesOption): allow directory list by
  PATH_SEPARATOR to --excludes-dir option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 12:24:19 +00:00
akr 04196d1f8c Use bit_length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 11:40:20 +00:00
nobu 8ed8e0ba41 test_etc.rb: relax comparisons
* test/etc/test_etc.rb (test_getgrgid, test_getgrnam): relax
  comparisons.  getgrent() does not return mem properly in some
  circumstances (possibly, involved in Open Directory on OSX).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 07:15:12 +00:00
nobu 54f1d71ab2 test for [ruby-core:67473] [Bug #10727]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 04:02:08 +00:00
nobu d2da3d04e6 array.c: keep consistency
* array.c (rb_ary_select_bang): keep the array consistent by
  removing unselected values soon.  [ruby-dev:48805] [Bug #10722]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10 01:12:17 +00:00
hsbt 07b87cd239 * lib/rubygems: Update to RubyGems HEAD(e53c54a).
* test/rubygems:  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-09 14:20:10 +00:00
nobu 17a65c320d parse.y: eliminate empty hashes
* parse.y (assocs, assoc): eliminate splatting empty literal
  hashes.  [ruby-core:67446] [Bug #10719]
* compile.c (compile_array_): supprt splatted hash in hash type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-09 02:13:03 +00:00
tenderlove 344b8bbd69 * ext/psych/lib/psych/visitors/yaml_tree.rb: correctly quote non-ascii
letters. Thanks @jirutka for the patch.

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:25:31 +00:00
tenderlove 5dabead187 * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash
subclasses.  Fixes github.com/tenderlove/psych/issues/196

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:15:20 +00:00
tenderlove 8c08c8298a * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
* ext/psych/lib/psych/visitors/yaml_tree.rb: dump hashes with ivars.
  Fixes github.com/psych/issues/43

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 22:00:54 +00:00
akr 45913acc68 Add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 15:38:13 +00:00
nobu 3f8ceab90e vm_method.c: no super klass, no original method entry
* vm_method.c (rb_method_entry): if no super class, no original
  method entry.  [ruby-core:67389] [Bug #10707]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 08:05:03 +00:00
nobu 459894160e vm_method.c: fix change refined new method visibility
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 07:31:45 +00:00
nobu 759a31b4a3 Revert GH-808
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 07:07:59 +00:00
usa a8565ad220 * test/ruby/test_symbol.rb (TestSymbol#test_symbol_fstr_leak): get rid of a
false positive on mswin CI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 06:31:30 +00:00
usa 934253416e * test/test_open3.rb (TestOpen3#test_numeric_file_descriptors): passing FDs
bigger than 2 is not supported on Windows.
  fixed test failure introcuded at r49173.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-08 06:26:11 +00:00
akr 1ade9cad02 * lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
Fixed by Josh Cheek.  [Fix GH-808]
  Related to [ruby-core:67347] [Bug #10699]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-07 15:29:28 +00:00
headius cd3bf49898 * test/ruby/test_method.rb: Add test for &-coersion of an
UnboundMethod.
* test/ruby/test_module.rb: Add test for define_method given an
  UnboundMethod.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06 20:56:49 +00:00
akr d50a8dd0bd Refine an assertion message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06 12:42:41 +00:00
akr 9bbe6b9d0c * time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is
VTM_ISDST_INITVAL.  This bug is introduced at packing struct
  vtm (r45155).
  [ruby-core:67345] [Bug #10698] Reported by Boris Ruf.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-06 12:41:20 +00:00
ko1 37360f82aa * test/fiddle/test_handle.rb: fix syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 18:11:32 +00:00
nobu 64e2406427 test_handle.rb: use -test-/dln/empty
* test/fiddle/test_handle.rb (test_NEXT): use -test-/dln/empty
  which is always a shared object and is not used by others.
  [ruby-dev:48629] [Bug #10384]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:16:13 +00:00
nobu fb79364092 test_handle.rb: separate blocks
* test/fiddle/test_handle.rb (test_static_sym, test_NEXT):
  separate each rescue blocks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:15:48 +00:00
nobu 3e8687a2ad test_handle.rb: remove skips
* test/fiddle/test_handle.rb (test_static_sym, test_DEFAULT):
  remove useless skips.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:15:41 +00:00
nobu c9b3950d30 ext/-test-/dln/empty: move from ext/-test-/win32/dln
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:14:54 +00:00
hsbt 471f5a7af0 * test/ruby/test_io.rb: added timeout for AIX environment.
[ruby-core:62983][Bug #9917]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 05:58:03 +00:00
nobu 10ce99866f ostruct.rb: append suffixes to protected methods
* lib/ostruct.rb (modifiable?, new_ostruct_member!, table!):
  append suffixes to protected methods so that they will not clash
  with assigned members.  [Fix GH-806]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 01:57:26 +00:00
nobu 1b7efc132a test/unit.rb: ExcludesOption
* test/lib/test/unit.rb (ExcludesOption): add "excludes" support
  to test suite, for alternative implementations and platforms.
  [Feature #10682]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 13:33:35 +00:00
nobu 54bfb33366 test/unit.rb: reorder Test::Unit
* test/lib/test/unit.rb (Test::Unit): reorder modules and merge
  each modules.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 13:32:44 +00:00
nobu 42bb2c712e test/unit.rb: split Test::Unit
* test/lib/test/unit.rb (Test::Unit): split the large class into
  each modules.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 13:32:11 +00:00
nobu 3977fd332f parse.y: fix f_label result
* parse.y (f_label): return tLABEL value as it is.
  [ruby-core:67315] [Bug #10693]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 12:32:54 +00:00
nobu b9c630f999 parallel.rb: expand path
* test/lib/test/unit/parallel.rb (run): expand the file name to be
  loaded, so that relative paths work in parallel mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 05:02:40 +00:00
ayumin dd2d43d9bd * test/test_tempfile.rb: use assert_file for more descriptive message.
following r49131.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 04:41:04 +00:00
nobu cf0006ea2b testcase.rb: call super
* test/lib/test/unit/testcase.rb (method_added): hook methods
  should call super.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 02:15:03 +00:00
nobu 49243b9944 unit.rb: no insult method
* test/lib/minitest/unit.rb (i_suck_and_my_tests_are_order_dependent!):
  remove.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 02:04:31 +00:00
nobu 8a57298c09 unit.rb: no UNDEFINED
* test/lib/minitest/unit.rb (UNDEFINED): remove.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 02:04:26 +00:00
nobu 8d7f655261 test_tempfile.rb: assert_file
* test/test_tempfile.rb (test_default_basename): use assert_file
  for more descriptive message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 01:58:49 +00:00
hsbt 05c108cdba * lib/tempfile.rb: provide default basename parameter.
[fix GH-523] Patch by @dissolved
* test/test_tempfile.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-04 00:18:38 +00:00
hsbt 1ba6e8868c * ext/fiddle/lib/fiddle/cparser.rb: r49110 brake Fiddle::Import with
type_alias
* test/fiddle/test_cparser.rb: added type_alias test for parse_ctype
  and parse_struct_signature.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 09:23:43 +00:00
akr ce80a49f38 Refine help message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 02:52:01 +00:00
hsbt 574422733d * array.c: Improve performance of Array#shift. use shared instead of
MEMMOVE if with arguments. Patch by @ksss [fix GH-537]
* test/ruby/test_array.rb: ditto.
* benchmark/bm_array_shift.rb: Added benchmark of GH-537 issue.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 02:27:50 +00:00
hsbt a84bfcbf00 * lib/net/http.rb: More descriptive error message when net/http fails
to connect to a server. Patch by @xaviershay [fix GH-700]
* test/net/http/test_http.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 01:38:59 +00:00
hsbt 3afd0f9a91 * ext/fiddle/lib/fiddle/cparser.rb: Support for Fiddle::CParser
to handle rich signatures including parameter names and function
  pointer types. Patch by @theryan [fix GH-590]
* test/fiddle/test_cparser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-03 00:54:37 +00:00
nobu 8d0d7da44e tracepointchecker.rb: for older TracePoint
* test/lib/tracepointchecker.rb (TracePointChecker): needs recent
  version of TracePoint, so that older versions can run to compare
  the resuls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 19:03:23 +00:00
nobu 4ef6097f9a leakchecker.rb: for older IO.console
* test/lib/leakchecker.rb (check_fd_leak): do not call older
  version IO.console to get rid of ArgumentError, so that older
  versions can run to compare the resuls.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 19:03:17 +00:00
hsbt 57ee6eae5a * test/net/http/test_http.rb (_test_send_request__HEAD): Added
failing test for send_request with HEAD method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 12:04:53 +00:00
hsbt c7d6c0d084 * test/ruby/test_module.rb: Refactor invalid testcase.
[fix GH-472][ruby-core:59035][Bug #9240]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 07:21:36 +00:00
hsbt 73fc0cc572 * lib/webrick/utils.rb: removed unused argument variable.
[fix GH-356] Patch by @vipulnsward
* lib/webrick/server.rb: ditto.
* lib/webrick/ssl.rb: ditto.
* test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:53:12 +00:00
hsbt dc599c2cb8 * test/openssl/test_ssl_session.rb (OpenSSL#test_ctx_client_session_cb):
fix test failure with OpenSSL disabled SSLv3 protocol.
  [ruby-core:63772] [Bug #10046]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:10:07 +00:00
nobu f5da412c9e test_yield.rb: assert_all_sentences
* test/ruby/test_yield.rb (assert_all_sentences): test all
  sentences and report all results at the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 03:40:10 +00:00
nobu 6d65806f8b tracepointchecker.rb: needs TracePoint
* test/lib/tracepointchecker.rb: available only if TracePoint is
  available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 02:37:47 +00:00
nobu 163ecb32e9 test_m17n.rb: split test_scrub
* test/ruby/test_m17n.rb (TestM17N#test_scrub): split into some
  tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 00:41:54 +00:00
akr ec7f1f5dc2 * lib/resolv.rb (Resolv::DNS::Label::Str#==): Check class equality.
(Resolv::DNS::Name#initialize): Normalize labels as
  Resolv::DNS::Label::Str objects.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 00:10:04 +00:00
nobu 418c1375fb test_rubyoptions.rb: locale name
* test/ruby/test_rubyoptions.rb: try locale encoding name.
  [ruby-core:67109] [Bug #10643]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 08:50:55 +00:00
normal 8717a9ec86 symbol.c: fix memory leak from global fstr hash
* symbol.c (rb_gc_free_dsymbol): delete from global fstr hash
* test/ruby/test_symbol.rb (test_symbol_fstr_leak): test for bug
  [ruby-core:67268] [Bug #10686]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 02:18:40 +00:00
nobu 6a37b8cde3 vm_args.c: fix non-symbol keys hash
* vm_args.c (keyword_hash_p): fix non-symbol keys hash.
  rb_extract_keywords() returns 0 not Qnil when no symbol keys is
  included.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-01 00:14:23 +00:00
nobu ac47d6a8cf parse.y: disable past scope warnings
* parse.y (gettable_gen): disable warnings of possible reference
  to a local variable defined in a past scope.
  [ruby-core:67162] [Bug #10661]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31 07:48:47 +00:00
nobu 69a7bb31f9 resolv.rb: case-insensitive comparison
* lib/resolv.rb (Resolv::DNS::Name#==): DNS is case-insensitive, so the
  comparison should be case-insensitive as well.
  [ruby-core:66498] [Bug #10550]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:16:14 +00:00
nobu 1441d9da99 test_dns.rb: test name
* test/resolv/test_dns.rb (TestResolvDNS#test_dots_diffences): fix
  test name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:05:32 +00:00
nobu a0325ea704 resolv.rb: dots differences
* lib/resolv.rb (Resolv::DNS::Name): names with different dots
  should be different.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 07:03:47 +00:00
nobu 205cf0140d test_time.rb: fix method to test
* test/test_time.rb (subtest_xmlschema_alias): test the specified
  method, not fixed name iso8601.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30 01:38:41 +00:00
nobu 316210b80b re.c: append excape sequence as-is
* re.c (unescape_nonascii): append excape sequence as-is not
  unescaped character, to get rid of unexpected meta-character.
  [ruby-core:67193] [Bug #10670]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29 09:58:48 +00:00
nobu 401c8bb00b thread.c: fix dynamic symbol keys
* thread.c (rb_thread_variable_get): fix dynamic symbol keys.
  rb_check_id() returns non-zero only for static symbols, whereas
  thread local variable keys can be dynamic symbols.
  [ruby-core:67185] [Bug #10667]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-29 02:18:20 +00:00
hsbt 4a481ad400 * ext/json, test/json: merge JSON HEAD(17fe8e7)
https://github.com/flori/json/compare/v1.8.1...17fe8e7

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 22:29:11 +00:00
nobu 8b5c69fa97 test_extlibs.rb: show mkmf.log
* test/ruby/test_extlibs.rb (check_existence): show mkmf.log of
  failed extension libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 14:04:26 +00:00
normal 64241b0921 test_iseq_load: expand tests with stack mismatches
We can ensure the loader works for these cases even if the
reoptimized bytecode is not a match for the original.

* test/-ext-/iseq_load/test_iseq_load.rb
  (test_next_in_block_in_block): test using ISeq#eval
  (test_break_ensure): ditto
  [ruby-core:66988]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 09:20:21 +00:00
nobu 952ed33b13 parse.y: fix internal IDs conflict
* parse.y (f_kwrest, new_args_tail_gen): unnamed rest keyword and
  keywords bits arguments should be unique.  since internal IDs
  depend on the local variable index in the current scope, new ID
  should be made before popping those vtables.
  [ruby-core:67157] [Bug #10659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 04:54:28 +00:00
nobu 903046aa48 test_io_console.rb: different names
* test/io/console/test_io_console.rb (test_noctty): use different
  names for each tempfiles.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-28 00:24:47 +00:00
usa 3d2b7c0797 * test/ruby/test_extlibs.rb: test in separated process for mathn/*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26 01:57:32 +00:00
zzak 7fa0c70ef7 s/existance/existence
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 23:20:52 +00:00
naruse 9099a55ad6 don't require mathn, it breaks the world
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 21:36:18 +00:00
usa f0f4d12faf remove old empty directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 15:37:03 +00:00
usa 6535bd5d31 * test/ruby/test_extlibs.rb: check existance of extension libraries
which not depend on outer libraries. (experimental)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 15:15:18 +00:00
nobu 945e4692ca console.c: IO.console arguments passing
* ext/io/console/console.c (console_dev): send the given arguments
  to the opened console.  as a special case, do nothing if :close
  is given.
* test/lib/leakchecker.rb (LeakChecker#check_fd_leak): close if
  console.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 07:14:12 +00:00
nobu f0806c4863 file.c: drop ignored chars
* file.c (rb_file_expand_path_internal): drop characters ignored
  by filesystem on Mac OS X.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 07:01:22 +00:00
nobu 0ebfc6f216 dir.c: replace_real_basename
* dir.c (replace_real_basename): get the real name and replace the
  base name with it by getattrlist(2) if available.
  suggested by Matthew Draper at [ruby-core:67116].  [Bug #10015]
* dir.c (glob_helper): get the real name of the whole path, not
  only the last name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 06:36:18 +00:00
nobu 913943270d test_io_console.rb: use gets
* test/io/console/test_io_console.rb (run_pty): pty cannot read
  all, should use gets only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 06:17:49 +00:00
nobu d33a3837cb test_io_console.rb: chomp results
* test/io/console/test_io_console.rb (run_pty): IO#readlines
  ignores the given block.  need map to chomp the results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 03:51:27 +00:00
nobu f5f6218a23 parse.y: warn past scope variable
* parse.y (gettable_gen): warn possible reference to a local
  variable defined in a past scope.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 03:47:46 +00:00
usa c10d7640b2 * test/io/console/test_io_console.rb (TestIO_Console#run_pty): no block given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 02:37:17 +00:00
nobu fb933bf70b test_dns.rb: fix scope
* test/resolv/test_dns.rb (test_query_ipv4_address): fix local
  variables scope.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 01:23:57 +00:00
nobu d8d326c97a console.c: get rid of NameError
* ext/io/console/console.c (console_dev): id_console is not a
  constant name, use rb_const_remove() to get rid of NameError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 01:09:17 +00:00
usa 86693b30c5 * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address):
set timeout for recvfrom because if client thread is crashed, it
  waits infinity.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 00:21:00 +00:00
nobu 007c4dbe84 test_rdoc_generator_json_index.rb: leaked fd
* test/rdoc/test_rdoc_generator_json_index.rb (test_generate_gzipped):
  fix leaked file descriptor.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 23:11:44 +00:00
naruse 32f124e68a use timeout lib
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 18:59:45 +00:00
nobu e000d687b3 test_gc.rb: termsig
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): also check
  termsig to ensure killed by SIGINT.  and try SIGSEGV to dump
  something.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 13:25:28 +00:00