Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: be55f79df921
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7b90ff454cdd
Choose a head ref
  • 1 commit
  • 239 files changed
  • 1 contributor

Commits on Dec 27, 2014

  1. Copy the full SHA
    7b90ff4 View commit details
Showing with 4,314 additions and 1,506 deletions.
  1. +0 −1 test/mri/-ext-/bug_reporter/test_bug_reporter.rb
  2. +0 −1 test/mri/-ext-/exception/test_data_error.rb
  3. +0 −1 test/mri/-ext-/exception/test_ensured.rb
  4. +95 −0 test/mri/-ext-/iseq_load/test_iseq_load.rb
  5. +0 −1 test/mri/-ext-/marshal/test_usrmarshal.rb
  6. +37 −0 test/mri/-ext-/proc/test_bmethod.rb
  7. +60 −3 test/mri/-ext-/string/test_cstr.rb
  8. +0 −1 test/mri/-ext-/string/test_modify_expand.rb
  9. +0 −1 test/mri/-ext-/struct/test_member.rb
  10. +76 −6 test/mri/-ext-/symbol/test_inadvertent_creation.rb
  11. +0 −1 test/mri/-ext-/test_bug-3571.rb
  12. +0 −4 test/mri/-ext-/test_printf.rb
  13. +0 −1 test/mri/-ext-/test_recursion.rb
  14. +0 −1 test/mri/-ext-/tracepoint/test_tracepoint.rb
  15. +0 −1 test/mri/-ext-/win32/test_dln.rb
  16. +0 −1 test/mri/-ext-/win32/test_fd_setsize.rb
  17. +6 −1 test/mri/bigdecimal/test_bigdecimal.rb
  18. +0 −1 test/mri/bigdecimal/test_bigmath.rb
  19. +0 −1 test/mri/cgi/test_cgi_multipart.rb
  20. +1 −1 test/mri/dbm/test_dbm.rb
  21. +10 −0 test/mri/digest/digest/foo.rb
  22. +61 −2 test/mri/digest/test_digest.rb
  23. +0 −1 test/mri/drb/drbtest.rb
  24. +0 −1 test/mri/dtrace/helper.rb
  25. +19 −0 test/mri/erb/test_erb.rb
  26. +11 −0 test/mri/erb/test_erb_command.rb
  27. +3 −1 test/mri/etc/test_etc.rb
  28. +0 −1 test/mri/fiddle/helper.rb
  29. +0 −1 test/mri/fiddle/test_function.rb
  30. +0 −1 test/mri/fiddle/test_handle.rb
  31. +0 −1 test/mri/fiddle/test_pointer.rb
  32. +6 −5 test/mri/fileutils/test_fileutils.rb
  33. +5 −2 test/mri/gdbm/test_gdbm.rb
  34. +37 −11 test/mri/io/console/test_io_console.rb
  35. +0 −1 test/mri/irb/test_completion.rb
  36. +0 −1 test/mri/irb/test_option.rb
  37. +0 −1 test/mri/irb/test_raise_no_backtrace_exception.rb
  38. +0 −1 test/mri/json/test_json_generate.rb
  39. +604 −0 test/mri/lib/envutil.rb
  40. +21 −0 test/mri/lib/find_executable.rb
  41. +4 −0 test/mri/lib/leakchecker.rb
  42. +111 −0 test/mri/lib/memory_status.rb
  43. +2 −0 test/mri/lib/minitest/unit.rb
  44. +1 −0 test/mri/lib/test/unit.rb
  45. +3 −3 test/mri/lib/test/unit/assertions.rb
  46. +0 −1 test/mri/logger/test_logdevice.rb
  47. +15 −0 test/mri/matrix/test_matrix.rb
  48. +43 −0 test/mri/matrix/test_vector.rb
  49. +0 −1 test/mri/mkmf/test_config.rb
  50. +72 −60 test/mri/monitor/test_monitor.rb
  51. +9 −13 test/mri/net/ftp/test_ftp.rb
  52. +1 −1 test/mri/net/http/test_http.rb
  53. +59 −0 test/mri/net/http/test_httpresponse.rb
  54. +41 −1 test/mri/net/http/test_https.rb
  55. +17 −14 test/mri/net/http/test_https_proxy.rb
  56. +4 −10 test/mri/net/http/utils.rb
  57. +224 −221 test/mri/net/imap/test_imap.rb
  58. +8 −0 test/mri/net/imap/test_imap_response_parser.rb
  59. +16 −12 test/mri/net/pop/test_pop.rb
  60. +2 −2 test/mri/objspace/test_objspace.rb
  61. +112 −35 test/mri/open-uri/test_open-uri.rb
  62. +103 −36 test/mri/open-uri/test_ssl.rb
  63. +3 −8 test/mri/openssl/test_asn1.rb
  64. +1 −1 test/mri/openssl/test_bn.rb
  65. +1 −1 test/mri/openssl/test_buffering.rb
  66. +1 −1 test/mri/openssl/test_cipher.rb
  67. +1 −1 test/mri/openssl/test_config.rb
  68. +1 −1 test/mri/openssl/test_digest.rb
  69. +1 −1 test/mri/openssl/test_engine.rb
  70. +1 −1 test/mri/openssl/test_fips.rb
  71. +1 −1 test/mri/openssl/test_hmac.rb
  72. +1 −1 test/mri/openssl/test_ns_spki.rb
  73. +1 −1 test/mri/openssl/test_ocsp.rb
  74. +1 −1 test/mri/openssl/test_pair.rb
  75. +2 −4 test/mri/openssl/test_partial_record_read.rb
  76. +1 −1 test/mri/openssl/test_pkcs12.rb
  77. +1 −1 test/mri/openssl/test_pkcs5.rb
  78. +1 −1 test/mri/openssl/test_pkcs7.rb
  79. +1 −1 test/mri/openssl/test_pkey_dh.rb
  80. +1 −1 test/mri/openssl/test_pkey_dsa.rb
  81. +1 −1 test/mri/openssl/test_pkey_ec.rb
  82. +1 −1 test/mri/openssl/test_pkey_rsa.rb
  83. +42 −26 test/mri/openssl/test_ssl.rb
  84. +43 −32 test/mri/openssl/test_ssl_session.rb
  85. +1 −1 test/mri/openssl/test_x509cert.rb
  86. +1 −1 test/mri/openssl/test_x509crl.rb
  87. +1 −1 test/mri/openssl/test_x509ext.rb
  88. +1 −1 test/mri/openssl/test_x509name.rb
  89. +1 −1 test/mri/openssl/test_x509req.rb
  90. +1 −2 test/mri/openssl/test_x509store.rb
  91. +60 −65 test/mri/openssl/utils.rb
  92. +0 −1 test/mri/pathname/test_pathname.rb
  93. +1 −1 test/mri/psych/json/test_stream.rb
  94. +1 −1 test/mri/psych/test_json_tree.rb
  95. +54 −0 test/mri/psych/test_marshalable.rb
  96. +2 −3 test/mri/rake/helper.rb
  97. +1 −1 test/mri/rake/support/rakefile_definitions.rb
  98. +2 −2 test/mri/rake/test_rake_application.rb
  99. +2 −2 test/mri/rake/test_rake_application_options.rb
  100. +5 −0 test/mri/rake/test_rake_definitions.rb
  101. +4 −8 test/mri/rake/test_rake_file_task.rb
  102. +18 −0 test/mri/rake/test_rake_late_time.rb
  103. +12 −7 test/mri/rake/test_rake_test_task.rb
  104. +0 −1 test/mri/rake/test_rake_thread_pool.rb
  105. +2 −2 test/mri/rdoc/test_rdoc_generator_darkfish.rb
  106. +56 −0 test/mri/rdoc/test_rdoc_generator_json_index.rb
  107. +1 −1 test/mri/rdoc/test_rdoc_generator_markup.rb
  108. +3 −0 test/mri/rdoc/test_rdoc_markup_attribute_manager.rb
  109. +4 −4 test/mri/rdoc/test_rdoc_markup_heading.rb
  110. +46 −26 test/mri/rdoc/test_rdoc_markup_to_html.rb
  111. +8 −7 test/mri/rdoc/test_rdoc_markup_to_html_snippet.rb
  112. +4 −4 test/mri/rdoc/test_rdoc_markup_to_label.rb
  113. +13 −5 test/mri/rdoc/test_rdoc_single_class.rb
  114. +55 −0 test/mri/rdoc/test_rdoc_stats.rb
  115. +0 −1 test/mri/readline/test_readline.rb
  116. +83 −67 test/mri/resolv/test_dns.rb
  117. +114 −47 test/mri/rexml/test_document.rb
  118. +0 −1 test/mri/rinda/test_rinda.rb
  119. +6 −2 test/mri/ripper/dummyparser.rb
  120. +2 −3 test/mri/ripper/test_files.rb
  121. +8 −1 test/mri/ripper/test_parser_events.rb
  122. +3 −0 test/mri/ripper/test_ripper.rb
  123. +26 −0 test/mri/ripper/test_sexp.rb
  124. +0 −1 test/mri/ruby/test_alias.rb
  125. +0 −1 test/mri/ruby/test_argf.rb
  126. +15 −9 test/mri/ruby/test_array.rb
  127. +3 −4 test/mri/ruby/test_autoload.rb
  128. +0 −1 test/mri/ruby/test_beginendblock.rb
  129. +0 −1 test/mri/ruby/test_case.rb
  130. +0 −1 test/mri/ruby/test_class.rb
  131. +0 −1 test/mri/ruby/test_comparable.rb
  132. +12 −6 test/mri/ruby/test_const.rb
  133. +1 −2 test/mri/ruby/test_continuation.rb
  134. +0 −1 test/mri/ruby/test_defined.rb
  135. +19 −10 test/mri/ruby/test_dir.rb
  136. +0 −1 test/mri/ruby/test_dir_m17n.rb
  137. +0 −1 test/mri/ruby/test_econv.rb
  138. +0 −1 test/mri/ruby/test_encoding.rb
  139. +1 −1 test/mri/ruby/test_enum.rb
  140. +0 −1 test/mri/ruby/test_enumerator.rb
  141. +0 −1 test/mri/ruby/test_env.rb
  142. +9 −1 test/mri/ruby/test_eval.rb
  143. +71 −13 test/mri/ruby/test_exception.rb
  144. +2 −3 test/mri/ruby/test_fiber.rb
  145. +6 −1 test/mri/ruby/test_file.rb
  146. +15 −4 test/mri/ruby/test_file_exhaustive.rb
  147. +0 −1 test/mri/ruby/test_flip.rb
  148. +0 −1 test/mri/ruby/test_float.rb
  149. +0 −1 test/mri/ruby/test_fnmatch.rb
  150. +26 −2 test/mri/ruby/test_gc.rb
  151. +3 −4 test/mri/ruby/test_hash.rb
  152. +88 −75 test/mri/ruby/test_io.rb
  153. +16 −1 test/mri/ruby/test_io_m17n.rb
  154. +17 −7 test/mri/ruby/test_iseq.rb
  155. +13 −3 test/mri/ruby/test_keyword.rb
  156. +26 −0 test/mri/ruby/test_lambda.rb
  157. +0 −1 test/mri/ruby/test_lazy_enumerator.rb
  158. +10 −1 test/mri/ruby/test_literal.rb
  159. +8 −1 test/mri/ruby/test_m17n.rb
  160. +22 −1 test/mri/ruby/test_method.rb
  161. +7 −4 test/mri/ruby/test_module.rb
  162. +0 −1 test/mri/ruby/test_numeric.rb
  163. +19 −5 test/mri/ruby/test_object.rb
  164. +7 −1 test/mri/ruby/test_objectspace.rb
  165. +36 −0 test/mri/ruby/test_optimization.rb
  166. +13 −0 test/mri/ruby/test_pack.rb
  167. +6 −0 test/mri/ruby/test_parse.rb
  168. +7 −1 test/mri/ruby/test_proc.rb
  169. +128 −112 test/mri/ruby/test_process.rb
  170. +0 −1 test/mri/ruby/test_rand.rb
  171. +0 −1 test/mri/ruby/test_range.rb
  172. +2 −2 test/mri/ruby/test_readpartial.rb
  173. +0 −1 test/mri/ruby/test_refinement.rb
  174. +0 −1 test/mri/ruby/test_regexp.rb
  175. +25 −3 test/mri/ruby/test_require.rb
  176. +42 −4 test/mri/ruby/test_rubyoptions.rb
  177. +31 −19 test/mri/ruby/test_settracefunc.rb
  178. +0 −1 test/mri/ruby/test_signal.rb
  179. +3 −2 test/mri/ruby/test_sprintf.rb
  180. +13 −1 test/mri/ruby/test_string.rb
  181. +42 −1 test/mri/ruby/test_struct.rb
  182. +0 −1 test/mri/ruby/test_super.rb
  183. +83 −6 test/mri/ruby/test_syntax.rb
  184. +0 −1 test/mri/ruby/test_system.rb
  185. +0 −2 test/mri/ruby/test_thread.rb
  186. +0 −1 test/mri/ruby/test_threadgroup.rb
  187. +12 −1 test/mri/ruby/test_time.rb
  188. +1 −1 test/mri/ruby/test_transcode.rb
  189. +0 −1 test/mri/ruby/test_unicode_escape.rb
  190. +16 −4 test/mri/ruby/test_variable.rb
  191. +0 −1 test/mri/ruby/test_weakmap.rb
  192. +0 −1 test/mri/ruby/test_whileuntil.rb
  193. +15 −32 test/mri/rubygems/test_gem.rb
  194. +4 −4 test/mri/rubygems/test_gem_commands_contents_command.rb
  195. +92 −0 test/mri/rubygems/test_gem_commands_pristine_command.rb
  196. +10 −6 test/mri/rubygems/test_gem_package_tar_writer.rb
  197. +25 −1 test/mri/rubygems/test_gem_remote_fetcher.rb
  198. +29 −1 test/mri/rubygems/test_gem_request_set_lockfile.rb
  199. +2 −2 test/mri/rubygems/test_gem_resolver_api_specification.rb
  200. +14 −0 test/mri/rubygems/test_gem_resolver_installer_set.rb
  201. +14 −0 test/mri/rubygems/test_gem_source.rb
  202. +50 −1 test/mri/rubygems/test_gem_specification.rb
  203. +9 −1 test/mri/rubygems/test_gem_stub_specification.rb
  204. +16 −0 test/mri/rubygems/test_gem_text.rb
  205. +24 −0 test/mri/rubygems/test_kernel.rb
  206. +0 −1 test/mri/runner.rb
  207. +1 −2 test/mri/sdbm/test_sdbm.rb
  208. +0 −1 test/mri/shell/test_command_processor.rb
  209. +0 −1 test/mri/test_mathn.rb
  210. +7 −1 test/mri/test_open3.rb
  211. +8 −0 test/mri/test_pp.rb
  212. +0 −1 test/mri/test_pstore.rb
  213. +0 −1 test/mri/test_pty.rb
  214. +0 −1 test/mri/test_tempfile.rb
  215. +85 −77 test/mri/test_time.rb
  216. +6 −0 test/mri/test_tmpdir.rb
  217. +0 −1 test/mri/test_tracer.rb
  218. +13 −0 test/mri/test_tsort.rb
  219. +11 −3 test/mri/test_unicode_normalize.rb
  220. +8 −1 test/mri/test_weakref.rb
  221. +0 −1 test/mri/testunit/test_rake_integration.rb
  222. +0 −1 test/mri/thread/test_cv.rb
  223. +0 −1 test/mri/thread/test_queue.rb
  224. +0 −1 test/mri/uri/test_common.rb
  225. +21 −3 test/mri/uri/test_generic.rb
  226. +16 −5 test/mri/webrick/test_cgi.rb
  227. +29 −10 test/mri/webrick/test_filehandler.rb
  228. +32 −3 test/mri/webrick/test_httpauth.rb
  229. +3 −3 test/mri/webrick/test_httpproxy.rb
  230. +6 −0 test/mri/webrick/test_httpresponse.rb
  231. +46 −26 test/mri/webrick/test_httpserver.rb
  232. +60 −21 test/mri/webrick/test_server.rb
  233. +30 −23 test/mri/webrick/utils.rb
  234. +1 −1 test/mri/webrick/webrick.cgi
  235. +1 −1 test/mri/webrick/webrick_long_filename.cgi
  236. +95 −51 test/mri/win32ole/test_win32ole_event.rb
  237. +10 −12 test/mri/xmlrpc/test_cookie.rb
  238. +15 −17 test/mri/xmlrpc/test_webrick_server.rb
  239. +21 −14 test/mri/xmlrpc/webrick_testing.rb
1 change: 0 additions & 1 deletion test/mri/-ext-/bug_reporter/test_bug_reporter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'test/unit'
require 'tmpdir'
require_relative "../../ruby/envutil"

class TestBugReporter < Test::Unit::TestCase
def test_bug_reporter_add
1 change: 0 additions & 1 deletion test/mri/-ext-/exception/test_data_error.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'

module Bug
class TestException < Test::Unit::TestCase
1 change: 0 additions & 1 deletion test/mri/-ext-/exception/test_ensured.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'

module Bug
class Bug7802 < RuntimeError
95 changes: 95 additions & 0 deletions test/mri/-ext-/iseq_load/test_iseq_load.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
require 'test/unit'

class TestIseqLoad < Test::Unit::TestCase
require '-test-/iseq_load/iseq_load'
ISeq = RubyVM::InstructionSequence

def test_bug8543
assert_iseq_roundtrip <<-'end;'
puts "tralivali"
def funct(a, b)
a**b
end
3.times { |i| puts "Hello, world#{funct(2,i)}!" }
end;
end

def test_case_when
assert_iseq_roundtrip <<-'end;'
def user_mask(target)
target.each_char.inject(0) do |mask, chr|
case chr
when "u"
mask | 04700
when "g"
mask | 02070
when "o"
mask | 01007
when "a"
mask | 07777
else
raise ArgumentError, "invalid `who' symbol in file mode: #{chr}"
end
end
end
end;
end

def test_splatsplat
assert_iseq_roundtrip('def splatsplat(**); end')
end

def test_hidden
assert_iseq_roundtrip('def x(a, (b, *c), d: false); end')
end

def assert_iseq_roundtrip(src)
a = ISeq.compile(src).to_a
b = ISeq.iseq_load(a).to_a
warn diff(a, b) if a != b
assert_equal a, b
assert_equal a, ISeq.iseq_load(b).to_a
end

def test_next_in_block_in_block
skip "failing due to stack_max mismatch"
assert_iseq_roundtrip <<-'end;'
3.times { 3.times { next } }
end;
end

def test_break_ensure
skip "failing due to exception entry sp mismatch"
assert_iseq_roundtrip <<-'end;'
def m
bad = true
while true
begin
break
ensure
bad = false
end
end
end
end;
end

# FIXME: still failing
def test_require_integration
skip "iseq loader require integration tests still failing"
f = File.expand_path(__FILE__)
# $(top_srcdir)/test/ruby/test_....rb
3.times { f = File.dirname(f) }
Dir[File.join(f, 'ruby', '*.rb')].each do |f|
iseq = ISeq.compile_file(f)
orig = iseq.to_a.freeze

loaded = ISeq.iseq_load(orig).to_a
if loaded != orig
warn f
warn diff(orig, loaded)
end
#assert_equal orig, loaded
end
end
end
1 change: 0 additions & 1 deletion test/mri/-ext-/marshal/test_usrmarshal.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'
require '-test-/marshal/usr'

module Bug end
37 changes: 37 additions & 0 deletions test/mri/-ext-/proc/test_bmethod.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
require 'test/unit'
require '-test-/proc'

class TestProc < Test::Unit::TestCase
class TestBMethod < Test::Unit::TestCase
end
end

class TestProc::TestBMethod
class Base
def foo(*a)
a
end
end

class Bound < Base
define_method(:foo, Bug::Proc.make_call_super(42))
define_method(:receiver, Bug::Proc.make_call_receiver(nil))
end

def test_super_in_bmethod
obj = Bound.new
assert_equal([1, 42], obj.foo(1))
end

def test_block_super
obj = Bound.new
result = nil
obj.foo(2) {|*a| result = a}
assert_equal([2, 42], result)
end

def test_receiver_in_bmethod
obj = Bound.new
assert_same(obj, obj.receiver)
end
end
63 changes: 60 additions & 3 deletions test/mri/-ext-/string/test_cstr.rb
Original file line number Diff line number Diff line change
@@ -33,10 +33,67 @@ def test_wchar_long
len = str.size * n
WCHARS.each do |enc|
s = Bug::String.new(str.encode(enc))*n
assert_nothing_raised(ArgumentError) {s.cstr_term}
assert_nothing_raised(ArgumentError, enc.name) {s.cstr_term}
s.set_len(s.bytesize / 2)
assert_equal(len / 2, s.size)
assert_equal(0, s.cstr_term)
assert_equal(len / 2, s.size, enc.name)
assert_equal(0, s.cstr_term, enc.name)
end
end

def test_wchar_lstrip!
assert_wchars_term_char(" a") {|s| s.lstrip!}
end

def test_wchar_rstrip!
assert_wchars_term_char("a ") {|s| s.rstrip!}
end

def test_wchar_chop!
assert_wchars_term_char("a\n") {|s| s.chop!}
end

def test_wchar_chomp!
assert_wchars_term_char("a\n") {|s| s.chomp!}
end

def test_wchar_aset
assert_wchars_term_char("a"*30) {|s| s[29,1] = ""}
end

def test_wchar_sub!
assert_wchars_term_char("foobar") {|s| s.sub!(/#{"foo".encode(s.encoding)}/, "")}
end

def test_wchar_delete!
assert_wchars_term_char("foobar") {|s| s.delete!("ao".encode(s.encoding))}
end

def test_wchar_squeeze!
assert_wchars_term_char("foo!") {|s| s.squeeze!}
end

def test_wchar_tr!
assert_wchars_term_char("\u{3042}foobar") {|s|
enc = s.encoding
s.tr!("\u{3042}".encode(enc), "c".encode(enc))
}
end

def test_wchar_tr_s!
assert_wchars_term_char("\u{3042}foobar") {|s|
enc = s.encoding
s.tr_s!("\u{3042}".encode(enc), "c".encode(enc))
}
end

def assert_wchars_term_char(str)
result = {}
WCHARS.map do |enc|
s = Bug::String.new(str.encode(enc))
yield s
c = s.cstr_term_char
result[enc] = c if c
end
assert_empty(result)
end
end
1 change: 0 additions & 1 deletion test/mri/-ext-/string/test_modify_expand.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'test/unit'
require "-test-/string/string"
require_relative '../../ruby/envutil'

class Test_StringModifyExpand < Test::Unit::TestCase
def test_modify_expand_memory_leak
1 change: 0 additions & 1 deletion test/mri/-ext-/struct/test_member.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'test/unit'
require "-test-/struct"
require_relative '../../ruby/envutil'

class Bug::Struct::Test_Member < Test::Unit::TestCase
S = Bug::Struct.new(:a)
Loading