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

7918 Коммитов

Автор SHA1 Сообщение Дата
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