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: 327fe55a430c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 063e4894be4e
Choose a head ref
  • 4 commits
  • 244 files changed
  • 1 contributor

Commits on Oct 29, 2016

  1. Squashed 'spec/mspec/' changes from eeba75b..485f467

    485f467 Merge pull request #20 from ksss/pretty_inspect
    f309a70 Lazy calling for inspect
    f2cd78a Review expectations code
    d1357d2 Use our own mkdir_p so fileutils is not required for mkspec
    a0dfed0 Simplify logic for MockProxy#with
    de5d647 Avoid using regexps when String#include? is enough
    
    git-subtree-dir: spec/mspec
    git-subtree-split: 485f467519dabf653e3643fd0cb3259153f2b2b9
    eregon committed Oct 29, 2016
    Copy the full SHA
    a2824ec View commit details
  2. Copy the full SHA
    0499eaa View commit details
  3. Squashed 'spec/ruby/' changes from ae9cea3..a2e5952

    a2e5952 Specs for Complex explicitly removing positive? and negative?.
    d0c8343 Add spec for backtrace from rescue that only captures $!.
    197292f Specs for conditionally-assigned variables accessed in closure.
    ad581ab Fix Hash#assoc spec to avoid a CRuby >= 2.2 bug
    fe9e1d1 Add spec for Range#include? with Time endpoints.
    a0a7642 add more spec for ||= and &&=
    f06c18d Spec for passing a block to forms of [] method.
    e20cc56 Add spec for EAFNOSUPPORT in udp sockets
    767d983 Add UDPSocket.new specs
    53466eb Add specs for * and ** coercion of BasicObject types.
    f3e2edf Fix typo in socketpair_spec.rb.
    a0780cd Fix Socket#socketpair shared spec
    048320b Add Socket#socketpair response type spec
    5ee05bc This only appears to work on OS X.
    1278eb2 Spec for IO#seek > 2^32.
    e81f3e5 Fix extra space
    a5f6f5e Specs for rb_obj_method_arity.
    e990a71 Fix WIN32OLE_METHOD#offset_vtbl spec for 64-bit Windows
    aa3697e Split platform-dependent parts in Float#round specs
    9d0932f Handle the special case of x64-mingw32 for String#unpack('J') specs
    849e1e2 Handle the special case of x64-mingw32 for Array#pack('J') specs
    9689d97 Try running on 64-bit Ruby 2.3 on Windows
    3a71993 Merge pull request #346 from mjago/fix_encodings
    31c3d16 Fix encoding in core/string/shared/codepoints.rb
    5191351 Fix encoding in core/string/shared/chars.rb
    5213d36 Fix encoding in core/string/scrub_spec.rb
    3f70703 Fix encoding in core/string/new_spec.rb
    ac1e312 Exclude connect_nonblock raises Errno::EINPROGRESS
    25a1538 Merge pull request #344 from mjago/socket_option_on_aix
    ba36b85 Merge pull request #345 from mjago/fix_encoding
    16b6441 Fix encoding in core/string/gsub_spec.rb
    a083778 Fix encoding in core/string/getbyte_spec.rb
    769d842 Fix encoding in core/string/fixtures/iso-8859-9-encoding.rb
    d5141d5 Fix encoding in core/string/encoding_spec.rb
    68d48e7 Fix encoding in core/string/encoding_spec.rb
    608140c Fix encoding in core/string/element_set_spec.rb
    96ebe46 Avoid use of getsockopt for setsockopt specs on aix
    42cfee7 Merge pull request #343 from mjago/fix_encodings
    ef14dee Fix encoding in core/string/delete_spec.rb
    0325dfb Fix encoding in core/string/count_spec.rb
    fc80507 Fix encoding in core/string/comparison_spec.rb
    0f1590f Fix encoding in core/regexp/shared/new_ascii.rb
    e30e3ab Remove extraneous parenthesis
    7ecb1aa Merge pull request #342 from mjago/encoding_fixes
    3e60d4c Add back `larger than UTF-8 max codepoints' spec
    2c1dd28 Really fix encoding in unicode.rb
    b752874 Fix encoding in core/array/pack/shared/unicode.rb
    0317231 Merge pull request #341 from mjago/aix_socket_constants
    17b07cf Fix encoding in core/array/pack/shared/string.rb
    87d371b Fix encoding in core/array/fixtures/encoded_strings.rb
    3702273 Fix whitespace
    7c0d354 Remove IP_MAX_MEMBERSHIPS check on AIX platform
    fa2ec3d Don't check for IPX socket constants on AIX platform
    3ea90df Merge pull request #340 from iliabylich/add-more-specs-for-squiggly-heredoc
    8fbd1ad More specs for "squiggly" heredoc.
    b3b68c7 Merge pull request #339 from mjago/fix_stringscanner_encodings
    b21cea4 Fix encoding in stringscanner/shared/get_byte.rb
    2964778 Fix encoding in stringscanner/getch_spec.rb
    05dbe0e Merge pull request #338 from mjago/fix_unbranch_on_big_endian
    201a176 Fix unpack specs with j option on big-endian systems
    5605faf Merge pull request #337 from mjago/fix_encodings
    c601f85 Fix encodings in core/encoding/replicate_spec.rb
    eb1d56d Fix encoding in encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb
    26ee43a Accept both possible values for Socket::Option#linger
    ff41556 Do not make assumptions on the value of Dir#pos
    b4bfa56 Merge pull request #336 from mjago/fix_j_spec_for_big_endian_platforms
    864e2e1 Fix specs for Array pack with format J and j specs
    151f7c6 Merge pull request #331 from mjago/unpack_option_j_specs
    4c8b9b3 Fix encoding/invalid_byte_sequence_error/incomplete_input_spec.rb
    626fab3 Fix encoding in encoding/invalid_byte_sequence_error/error_bytes_spec.rb
    db30005 Fix encoding in encoding/fixtures/classes.rb
    f4b5e0d Fix encoding in encoding/converter/putback_spec.rb
    7e99711 Add specs for unpack options J and j
    bcb318b Move require to example so unsupported syntax would only fail that example
    57c69fc tests squiggly heredoc * See #175 * See [Feature 9098]
    ce4eb8f Fix encoding in encoding/converter/primitive_errinfo_spec.rb
    ef64e76 Fix encoding in encoding/converter/primitive_convert_spec.rb
    8466a28 Fix encoding in encoding/converter/last_error_spec.rb
    e0d32ca Fix encoding in encoding/converter/convert_spec.rb
    a743e63 Fix encoding in core/string/codepoints_spec.rb
    6353bbe Fix encoding in core/string/byteslice_spec.rb
    5d1f1cb Revert "Travis: allow ruby-head to fail since it's outdated"
    5ec5a10 Array pack with format J and j specs (#320)
    6068505 Merge pull request #321 from mjago/fix_encoding_in_recv_spec
    fb52aef Fix encoding in recv_spec.rb
    96f8e44 Merge pull request #319 from mjago/fix_match_spec_utf8
    012827a Fix utf-8 conflicts in Regexp match specs
    f3c10d3 Fix magic encoding to avoid utf-8 conflicts
    adfb2eb Merge pull request #316 from mjago/avoid_utf8_conflicts_in_io_specs
    c6daa63 Fix alignment
    044b889 Rename data to write
    d259a19 Remove redundant artifact
    3a71973 Avoid utf-8 conflicts in IO specs
    402b2cb Fix expectation in a zlib spec
    bee369d Zlib specs should use binary strings
    c77a0e9 Merge pull request #315 from sgarciac/master
    1334490 Tests Base64#urlsafe_encode64 and Base64#urlsafe_decode64 * See #175 * See [Feature 10740]
    80937d6 Merge pull request #313 from mjago/avoid_utf8_conflicts_with_binary_encoding_in_marshall_specs
    6e2efe7 Merge pull request #314 from mjago/fix_utf8_conflict_in_expand_path_spec
    4df37ac DRY spec
    d96bde0 Fix tests
    6d47911 Fix utf-8 conflict in expand_path_spec.rb
    7d1e89a Avoid utf8 conflicts in Marshall specs
    45f9256 Merge pull request #312 from mjago/avoid_utf8_conflicts_with_binary_encoding_in_digest_specs
    1884a0e Avoid utf-8 conflicts in Digest files
    c4cabcf Add specs for yielding to a lambda with an Array and the wrong number of arguments
    de4fab0 Remove extra encoding comment
    c65e5ca Merge pull request #311 from mjago/avoid_problematic_encodings_in_zlib_specs
    7b91144 Avoid problematic encodings in Zlib specs
    a0a65c7 Fix variable naming style in Thread fixtures
    8669cc2 Merge pull request #304 from ruby/fix_parser_warnings
    71c4024 Fix most parser warnings (of 317)
    bb48acd Fix most parser warnings: the first 200
    ddc9372 Remove bad spec potentially changing the global process group
    a226ed4 Merge pull request #310 from mjago/remove_problematic_utf_8_encoding
    81cbd64 Avoid problematic byte sequence in UTF-8 encoding
    292f31f IO#each_codepoint raises an exception at incomplete character before EOF when conversion takes place
    94cbe8d SIGTERM is not supported on Windows
    2dd2245 Speed up Process.waitpid spec
    67f285b Improve spec description from changelog
    0c2fe01 Move Hash#inspect specs in the Hash specs
    48679fe Fix shared spec name
    9a6c6b1 Merge pull request #307 from sgarciac/master
    aef521e Hash#inspect doesn't raise error even if its content returns a string which is not compatible with Encoding.default_external as inspected result.
    894db53 flatten no longer calls #to_ary method on elements beyond the given level. * See #175 * See [Bug 10748]
    8126e53 Add spec for Net::FTP being passive by default from 2.3+
    6e58b5f Merge pull request #306 from mjago/setsockopt_spec_test_fail_on_osx
    5c232ad getsockopt(2) returns SO_LINGER instead of 1
    264f06c Fix most parser warnings: the first 100
    2d5aece Fix bad spec: Module#prepend does import constants
    309343b Remove usages of eval for common syntax
    fc21517 AppVeyor: run only once per PR from the same repo (#305)
    0d9b6ff Merge pull request #301 from nobu/suppress-warnings
    1c901da Merge pull request #302 from nobu/Enumerable#chunk-without-block
    e00328a Update Enumerable#chunk
    75fef79 Shadowing variables
    c04ce7c Suppress warnings
    6852fd4 Simplify guards in pack/unpack for the special case of mingw32 on Windows 64-bit
    2fd92c4 Merge pull request #300 from bkutil/test-octal-int-opal
    7b19ee9 Spec for Integer("0") parsing as 0
    4e37db8 Remove all not_compliant_on and deviates_on guards
    66f6ccc Use a simpler limits for spec'ing too big array sizes
    5c78608 Remove not_compliant_on :ironruby guards
    9e0f660 Remove impl-specific object_id spec
    664b4c1 Fixed one TODO
    87ae44f Avoid passing RUBY_EXE explicitly
    21024e4 Fix link to AppVeyor
    7f7430f Mention all types of specs
    0099874 Mention being tested in implementation Cis
    8a29c71 Update AppVeyor badge
    cab9b2f Properly convert an st_index_t to a Fixnum
    de08352 Remove trailing spaces
    92a66ec Replace tab by spaces
    2902648 Remove extra spaces after should/should_not
    52e60f4 Merge pull request #299 from backus/conditional-regexp
    76f88c1 Add conditional regular expression tests
    4ae1346 It seems IO#close_on_exec* was implemented on Windows in MRI 2.3
    f5afc1e It seems File::Stat.ino got implemented in MRI 2.3 on Windows
    3de35fe Create an empty directory for #zero? specs
    d3b01ca skip hanging spec on Windows
    9f78b1a Test Ruby 2.3.1 on Windows with AppVeyor
    30b9fab Merge pull request #298 from ksss/interrupt
    8efd3ef Add spec for inheritance of Interrupt
    564a064 Add Interrupt class specs
    5309c48 Merge pull request #297 from ksss/signal_exception
    a79325b Check a signm value if SignalException rescued
    cdd885f Merge pull request #295 from ksss/signame
    d416040 Add Signal.signame specs
    
    git-subtree-dir: spec/ruby
    git-subtree-split: a2e5952554a7632e5debf0306fbae4e2559b2880
    eregon committed Oct 29, 2016
    Copy the full SHA
    53b286b View commit details
  4. Copy the full SHA
    063e489 View commit details
Showing with 2,278 additions and 1,569 deletions.
  1. +3 −1 spec/mspec/lib/mspec.rb
  2. +3 −4 spec/mspec/lib/mspec/commands/mkspec.rb
  3. +8 −4 spec/mspec/lib/mspec/expectations/expectations.rb
  4. +7 −6 spec/mspec/lib/mspec/expectations/should.rb
  5. +4 −4 spec/mspec/lib/mspec/mocks/proxy.rb
  6. +2 −2 spec/mspec/spec/commands/mkspec_spec.rb
  7. +1 −1 spec/mspec/spec/commands/mspec_run_spec.rb
  8. +1 −1 spec/mspec/spec/commands/mspec_tag_spec.rb
  9. +11 −11 spec/mspec/spec/expectations/should_spec.rb
  10. +3 −3 spec/mspec/spec/runner/formatters/html_spec.rb
  11. +11 −11 spec/mspec/spec/runner/formatters/junit_spec.rb
  12. +9 −9 spec/mspec/spec/runner/formatters/yaml_spec.rb
  13. +0 −3 spec/ruby/.travis.yml
  14. +8 −2 spec/ruby/README.md
  15. +0 −3 spec/ruby/TODO
  16. +10 −1 spec/ruby/appveyor.yml
  17. +1 −1 spec/ruby/core/argf/readchar_spec.rb
  18. +1 −1 spec/ruby/core/argf/readline_spec.rb
  19. +9 −9 spec/ruby/core/argf/seek_spec.rb
  20. +2 −4 spec/ruby/core/array/element_reference_spec.rb
  21. +0 −20 spec/ruby/core/array/fixtures/classes.rb
  22. +2 −2 spec/ruby/core/array/fixtures/encoded_strings.rb
  23. +8 −0 spec/ruby/core/array/flatten_spec.rb
  24. +1 −1 spec/ruby/core/array/hash_spec.rb
  25. +2 −12 spec/ruby/core/array/initialize_spec.rb
  26. +1 −1 spec/ruby/core/array/max_spec.rb
  27. +2 −12 spec/ruby/core/array/new_spec.rb
  28. +222 −0 spec/ruby/core/array/pack/j_spec.rb
  29. +64 −152 spec/ruby/core/array/pack/l_spec.rb
  30. +1 −0 spec/ruby/core/array/pack/shared/string.rb
  31. +8 −7 spec/ruby/core/array/pack/shared/unicode.rb
  32. +1 −1 spec/ruby/core/array/shared/collect.rb
  33. +4 −2 spec/ruby/core/array/shared/inspect.rb
  34. +14 −38 spec/ruby/core/array/shared/slice.rb
  35. +1 −1 spec/ruby/core/array/sort_spec.rb
  36. +1 −1 spec/ruby/core/basicobject/instance_eval_spec.rb
  37. +2 −10 spec/ruby/core/bignum/left_shift_spec.rb
  38. +2 −10 spec/ruby/core/bignum/right_shift_spec.rb
  39. +6 −6 spec/ruby/core/class/new_spec.rb
  40. +0 −2 spec/ruby/core/class/to_s_spec.rb
  41. +5 −12 spec/ruby/core/dir/rewind_spec.rb
  42. +3 −3 spec/ruby/core/dir/shared/open.rb
  43. +2 −2 spec/ruby/core/dir/shared/pos.rb
  44. +1 −0 spec/ruby/core/encoding/converter/convert_spec.rb
  45. +1 −0 spec/ruby/core/encoding/converter/last_error_spec.rb
  46. +4 −4 spec/ruby/core/encoding/converter/primitive_convert_spec.rb
  47. +1 −1 spec/ruby/core/encoding/converter/primitive_errinfo_spec.rb
  48. +1 −1 spec/ruby/core/encoding/converter/putback_spec.rb
  49. +1 −0 spec/ruby/core/encoding/fixtures/classes.rb
  50. +1 −1 spec/ruby/core/encoding/invalid_byte_sequence_error/error_bytes_spec.rb
  51. +1 −0 spec/ruby/core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb
  52. +1 −0 spec/ruby/core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb
  53. +1 −0 spec/ruby/core/encoding/replicate_spec.rb
  54. +15 −4 spec/ruby/core/enumerable/chunk_spec.rb
  55. +1 −1 spec/ruby/core/enumerable/chunk_while_spec.rb
  56. +1 −2 spec/ruby/core/enumerable/fixtures/classes.rb
  57. +1 −1 spec/ruby/core/enumerable/group_by_spec.rb
  58. +1 −1 spec/ruby/core/enumerable/slice_when_spec.rb
  59. +41 −0 spec/ruby/core/exception/interrupt_spec.rb
  60. +6 −8 spec/ruby/core/exception/no_method_error_spec.rb
  61. +2 −0 spec/ruby/core/exception/signal_exception_spec.rb
  62. +1 −1 spec/ruby/core/exception/system_call_error_spec.rb
  63. +0 −3 spec/ruby/core/file/basename_spec.rb
  64. +11 −19 spec/ruby/core/file/expand_path_spec.rb
  65. +5 −5 spec/ruby/core/file/lchmod_spec.rb
  66. +3 −15 spec/ruby/core/file/split_spec.rb
  67. +14 −4 spec/ruby/core/file/stat/ino_spec.rb
  68. +8 −8 spec/ruby/core/fixnum/exponent_spec.rb
  69. +2 −10 spec/ruby/core/fixnum/left_shift_spec.rb
  70. +2 −10 spec/ruby/core/fixnum/right_shift_spec.rb
  71. +7 −2 spec/ruby/core/float/round_spec.rb
  72. +10 −18 spec/ruby/core/hash/assoc_spec.rb
  73. +1 −1 spec/ruby/core/hash/initialize_spec.rb
  74. +1 −1 spec/ruby/core/hash/inspect_spec.rb
  75. +21 −1 spec/ruby/core/hash/shared/to_s.rb
  76. +1 −1 spec/ruby/core/hash/to_s_spec.rb
  77. +74 −53 spec/ruby/core/io/close_on_exec_spec.rb
  78. +6 −0 spec/ruby/core/io/each_codepoint_spec.rb
  79. +1 −0 spec/ruby/core/io/fixtures/incomplete.txt
  80. +1 −1 spec/ruby/core/io/foreach_spec.rb
  81. +14 −10 spec/ruby/core/io/gets_spec.rb
  82. +6 −6 spec/ruby/core/io/pipe_spec.rb
  83. +8 −8 spec/ruby/core/io/popen_spec.rb
  84. +25 −20 spec/ruby/core/io/read_spec.rb
  85. +1 −1 spec/ruby/core/io/shared/gets_ascii.rb
  86. +3 −5 spec/ruby/core/io/syswrite_spec.rb
  87. +10 −3 spec/ruby/core/io/write_spec.rb
  88. +4 −0 spec/ruby/core/kernel/Integer_spec.rb
  89. +5 −18 spec/ruby/core/kernel/case_compare_spec.rb
  90. +1 −1 spec/ruby/core/kernel/eval_spec.rb
  91. +9 −8 spec/ruby/core/kernel/gsub_spec.rb
  92. +0 −2 spec/ruby/core/kernel/loop_spec.rb
  93. +1 −3 spec/ruby/core/kernel/shared/require.rb
  94. +5 −5 spec/ruby/core/marshal/dump_spec.rb
  95. +3 −2 spec/ruby/core/marshal/fixtures/marshal_data.rb
  96. +2 −1 spec/ruby/core/marshal/shared/load.rb
  97. +1 −1 spec/ruby/core/math/frexp_spec.rb
  98. +2 −2 spec/ruby/core/math/lgamma_spec.rb
  99. +2 −2 spec/ruby/core/method/fixtures/classes.rb
  100. +2 −2 spec/ruby/core/module/attr_spec.rb
  101. +2 −2 spec/ruby/core/module/define_method_spec.rb
  102. +2 −2 spec/ruby/core/module/included_modules_spec.rb
  103. +6 −6 spec/ruby/core/module/instance_method_spec.rb
  104. +3 −5 spec/ruby/core/module/module_function_spec.rb
  105. +1 −1 spec/ruby/core/module/new_spec.rb
  106. +4 −3 spec/ruby/core/module/prepend_spec.rb
  107. +2 −2 spec/ruby/core/module/private_class_method_spec.rb
  108. +2 −2 spec/ruby/core/module/public_class_method_spec.rb
  109. +4 −4 spec/ruby/core/mutex/sleep_spec.rb
  110. +3 −3 spec/ruby/core/proc/fixtures/source_location.rb
  111. +2 −2 spec/ruby/core/proc/hash_spec.rb
  112. +2 −2 spec/ruby/core/proc/parameters_spec.rb
  113. +1 −2 spec/ruby/core/process/euid_spec.rb
  114. +2 −2 spec/ruby/core/process/fixtures/common.rb
  115. +8 −8 spec/ruby/core/process/fixtures/daemon.rb
  116. +4 −4 spec/ruby/core/process/kill_spec.rb
  117. +0 −9 spec/ruby/core/process/setpgrp_spec.rb
  118. +2 −0 spec/ruby/core/process/uid_spec.rb
  119. +1 −0 spec/ruby/core/process/waitpid_spec.rb
  120. +1 −1 spec/ruby/core/random/bytes_spec.rb
  121. +4 −2 spec/ruby/core/regexp/match_spec.rb
  122. +45 −44 spec/ruby/core/regexp/shared/new_ascii.rb
  123. +43 −43 spec/ruby/core/regexp/shared/new_ascii_8bit.rb
  124. +23 −0 spec/ruby/core/signal/signame_spec.rb
  125. +1 −0 spec/ruby/core/string/byteslice_spec.rb
  126. +4 −4 spec/ruby/core/string/center_spec.rb
  127. +1 −0 spec/ruby/core/string/codepoints_spec.rb
  128. +4 −2 spec/ruby/core/string/comparison_spec.rb
  129. +1 −1 spec/ruby/core/string/count_spec.rb
  130. +5 −3 spec/ruby/core/string/delete_spec.rb
  131. +2 −2 spec/ruby/core/string/downcase_spec.rb
  132. +5 −5 spec/ruby/core/string/element_set_spec.rb
  133. +2 −1 spec/ruby/core/string/encode_spec.rb
  134. +18 −11 spec/ruby/core/string/encoding_spec.rb
  135. +1 −1 spec/ruby/core/string/fixtures/iso-8859-9-encoding.rb
  136. +5 −4 spec/ruby/core/string/getbyte_spec.rb
  137. +4 −2 spec/ruby/core/string/gsub_spec.rb
  138. +8 −10 spec/ruby/core/string/index_spec.rb
  139. +2 −5 spec/ruby/core/string/lstrip_spec.rb
  140. +19 −28 spec/ruby/core/string/modulo_spec.rb
  141. +2 −1 spec/ruby/core/string/new_spec.rb
  142. +2 −2 spec/ruby/core/string/prepend_spec.rb
  143. +16 −20 spec/ruby/core/string/rindex_spec.rb
  144. +22 −11 spec/ruby/core/string/scrub_spec.rb
  145. +12 −12 spec/ruby/core/string/shared/chars.rb
  146. +1 −1 spec/ruby/core/string/shared/codepoints.rb
  147. +6 −8 spec/ruby/core/string/sub_spec.rb
  148. +6 −6 spec/ruby/core/string/unicode_normalize_spec.rb
  149. +277 −0 spec/ruby/core/string/unpack/j_spec.rb
  150. +96 −208 spec/ruby/core/string/unpack/l_spec.rb
  151. +2 −2 spec/ruby/core/string/upcase_spec.rb
  152. +1 −1 spec/ruby/core/struct/new_spec.rb
  153. +1 −1 spec/ruby/core/symbol/capitalize_spec.rb
  154. +1 −1 spec/ruby/core/symbol/inspect_spec.rb
  155. +1 −1 spec/ruby/core/symbol/swapcase_spec.rb
  156. +17 −20 spec/ruby/core/thread/fixtures/classes.rb
  157. +2 −2 spec/ruby/core/thread/shared/exit.rb
  158. +2 −2 spec/ruby/core/time/yday_spec.rb
  159. +0 −8 spec/ruby/core/unboundmethod/bind_spec.rb
  160. +11 −32 spec/ruby/core/unboundmethod/equal_value_spec.rb
  161. +13 −42 spec/ruby/language/break_spec.rb
  162. +2 −4 spec/ruby/language/class_spec.rb
  163. +2 −2 spec/ruby/language/def_spec.rb
  164. +3 −3 spec/ruby/language/fixtures/block.rb
  165. +39 −0 spec/ruby/language/fixtures/squiggly_heredoc.rb
  166. +1 −1 spec/ruby/language/fixtures/super.rb
  167. +2 −2 spec/ruby/language/hash_spec.rb
  168. +83 −0 spec/ruby/language/heredoc_spec.rb
  169. +1 −1 spec/ruby/language/method_spec.rb
  170. +167 −21 spec/ruby/language/optional_assignments_spec.rb
  171. +12 −13 spec/ruby/language/precedence_spec.rb
  172. +2 −2 spec/ruby/language/redo_spec.rb
  173. +2 −4 spec/ruby/language/regexp/back-references_spec.rb
  174. +0 −2 spec/ruby/language/regexp/repetition_spec.rb
  175. +18 −1 spec/ruby/language/regexp_spec.rb
  176. +1 −1 spec/ruby/language/rescue_spec.rb
  177. +0 −45 spec/ruby/language/string_spec.rb
  178. +38 −0 spec/ruby/language/yield_spec.rb
  179. +27 −0 spec/ruby/library/base64/urlsafe_decode64_spec.rb
  180. +22 −0 spec/ruby/library/base64/urlsafe_encode64_spec.rb
  181. +3 −3 spec/ruby/library/bigdecimal/sign_spec.rb
  182. +1 −1 spec/ruby/library/bigdecimal/to_s_spec.rb
  183. +1 −1 spec/ruby/library/cgi/htmlextension/fixtures/common.rb
  184. +3 −6 spec/ruby/library/continuation/kernel/callcc_spec.rb
  185. +8 −8 spec/ruby/library/date/parse_spec.rb
  186. +16 −16 spec/ruby/library/date/shared/civil.rb
  187. +9 −9 spec/ruby/library/date/shared/commercial.rb
  188. +8 −8 spec/ruby/library/date/shared/parse.rb
  189. +10 −10 spec/ruby/library/date/shared/parse_eu.rb
  190. +10 −10 spec/ruby/library/date/shared/parse_us.rb
  191. +7 −7 spec/ruby/library/datetime/new_spec.rb
  192. +8 −8 spec/ruby/library/datetime/parse_spec.rb
  193. +1 −1 spec/ruby/library/digest/md5/shared/constants.rb
  194. +2 −0 spec/ruby/library/digest/md5/shared/sample.rb
  195. +2 −1 spec/ruby/library/digest/sha1/shared/constants.rb
  196. +2 −1 spec/ruby/library/digest/sha256/shared/constants.rb
  197. +2 −1 spec/ruby/library/digest/sha384/shared/constants.rb
  198. +2 −1 spec/ruby/library/digest/sha512/shared/constants.rb
  199. +4 −4 spec/ruby/library/logger/application/new_spec.rb
  200. +2 −2 spec/ruby/library/logger/application/start_spec.rb
  201. +1 −1 spec/ruby/library/matrix/divide_spec.rb
  202. +10 −0 spec/ruby/library/net/ftp/default_passive_spec.rb
  203. +3 −0 spec/ruby/library/net/ftp/fixtures/default_passive.rb
  204. +2 −0 spec/ruby/library/net/ftp/fixtures/passive.rb
  205. +12 −0 spec/ruby/library/net/ftp/passive_spec.rb
  206. +2 −2 spec/ruby/library/scanf/string/shared/block_scanf.rb
  207. +1 −1 spec/ruby/library/socket/basicsocket/recv_spec.rb
  208. +30 −19 spec/ruby/library/socket/basicsocket/setsockopt_spec.rb
  209. +15 −4 spec/ruby/library/socket/constants/constants_spec.rb
  210. +4 −4 spec/ruby/library/socket/option/bool_spec.rb
  211. +1 −1 spec/ruby/library/socket/socket/connect_nonblock_spec.rb
  212. +1 −0 spec/ruby/library/stringscanner/getch_spec.rb
  213. +1 −1 spec/ruby/library/stringscanner/inspect_spec.rb
  214. +1 −0 spec/ruby/library/stringscanner/shared/get_byte.rb
  215. +3 −3 spec/ruby/library/stringscanner/shared/matched_size.rb
  216. +1 −1 spec/ruby/library/stringscanner/shared/pos.rb
  217. +2 −1 spec/ruby/library/win32ole/win32ole_method/offset_vtbl_spec.rb
  218. +11 −6 spec/ruby/library/zlib/deflate/deflate_spec.rb
  219. +3 −3 spec/ruby/library/zlib/deflate/set_dictionary_spec.rb
  220. +2 −3 spec/ruby/library/zlib/gzipfile/close_spec.rb
  221. +3 −1 spec/ruby/library/zlib/gzipreader/each_byte_spec.rb
  222. +2 −1 spec/ruby/library/zlib/gzipreader/eof_spec.rb
  223. +2 −1 spec/ruby/library/zlib/gzipreader/getc_spec.rb
  224. +2 −1 spec/ruby/library/zlib/gzipreader/pos_spec.rb
  225. +2 −1 spec/ruby/library/zlib/gzipreader/read_spec.rb
  226. +2 −1 spec/ruby/library/zlib/gzipreader/rewind_spec.rb
  227. +2 −2 spec/ruby/library/zlib/gzipwriter/mtime_spec.rb
  228. +5 −6 spec/ruby/library/zlib/gzipwriter/write_spec.rb
  229. +1 −2 spec/ruby/library/zlib/inflate/append_spec.rb
  230. +0 −1 spec/ruby/library/zlib/inflate/finish_spec.rb
  231. +19 −20 spec/ruby/library/zlib/inflate/inflate_spec.rb
  232. +2 −2 spec/ruby/library/zlib/zstream/flush_next_out_spec.rb
  233. +1 −2 spec/ruby/optional/capi/class_spec.rb
  234. +10 −0 spec/ruby/optional/capi/ext/object_spec.c
  235. +1 −0 spec/ruby/optional/capi/ext/rubyspec.h
  236. +9 −1 spec/ruby/optional/capi/ext/string_spec.c
  237. +39 −0 spec/ruby/optional/capi/object_spec.rb
  238. +0 −1 spec/ruby/optional/capi/string_spec.rb
  239. +1 −1 spec/ruby/shared/complex/hash.rb
  240. +1 −1 spec/ruby/shared/complex/numerator.rb
  241. +1 −1 spec/ruby/shared/fiber/resume.rb
  242. +3 −2 spec/ruby/shared/file/zero.rb
  243. +0 −8 spec/ruby/shared/kernel/object_id.rb
  244. +1 −1 spec/ruby/shared/process/exit.rb
4 changes: 3 additions & 1 deletion spec/mspec/lib/mspec.rb
Original file line number Diff line number Diff line change
@@ -13,6 +13,8 @@
require 'pp'
rescue LoadError
module Kernel
alias pretty_inspect inspect
def pretty_inspect
inspect
end
end
end
7 changes: 3 additions & 4 deletions spec/mspec/lib/mspec/commands/mkspec.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#! /usr/bin/env ruby
#!/usr/bin/env ruby

require 'fileutils'
require 'rbconfig'
require 'mspec/version'
require 'mspec/utils/options'
require 'mspec/utils/name_map'

require 'mspec/helpers/fs'

class MkSpec
attr_reader :config
@@ -63,7 +62,7 @@ def create_directory(mod)
return nil
end
else
FileUtils.mkdir_p subdir
mkdir_p subdir
end

subdir
12 changes: 8 additions & 4 deletions spec/mspec/lib/mspec/expectations/expectations.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class SpecExpectationNotMetError < StandardError; end
class SpecExpectationNotMetError < StandardError
end

class SpecExpectationNotFoundError < StandardError
def message
"No behavior expectation was found in the example"
@@ -7,10 +9,12 @@ def message

class SpecExpectation
def self.fail_with(expected, actual)
if expected.to_s.size + actual.to_s.size > 80
message = expected.to_s.chomp + "\n" + actual.to_s
expected_to_s = expected.to_s
actual_to_s = actual.to_s
if expected_to_s.size + actual_to_s.size > 80
message = expected_to_s.chomp + "\n" + actual_to_s
else
message = expected.to_s + " " + actual.to_s
message = expected_to_s + " " + actual_to_s
end
Kernel.raise SpecExpectationNotMetError, message
end
13 changes: 7 additions & 6 deletions spec/mspec/lib/mspec/expectations/should.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
class Object
NO_MATCHER_GIVEN = Object.new
def should(matcher=NO_MATCHER_GIVEN)

def should(matcher = NO_MATCHER_GIVEN)
MSpec.expectation
MSpec.actions :expectation, MSpec.current.state
unless matcher.equal?(NO_MATCHER_GIVEN)
unless matcher.matches?(self)
unless matcher.equal? NO_MATCHER_GIVEN
unless matcher.matches? self
expected, actual = matcher.failure_message
SpecExpectation.fail_with(expected, actual)
end
@@ -13,11 +14,11 @@ def should(matcher=NO_MATCHER_GIVEN)
end
end

def should_not(matcher=NO_MATCHER_GIVEN)
def should_not(matcher = NO_MATCHER_GIVEN)
MSpec.expectation
MSpec.actions :expectation, MSpec.current.state
unless matcher.equal?(NO_MATCHER_GIVEN)
if matcher.matches?(self)
unless matcher.equal? NO_MATCHER_GIVEN
if matcher.matches? self
expected, actual = matcher.negative_failure_message
SpecExpectation.fail_with(expected, actual)
end
8 changes: 4 additions & 4 deletions spec/mspec/lib/mspec/mocks/proxy.rb
Original file line number Diff line number Diff line change
@@ -128,10 +128,10 @@ def any_number_of_times

def with(*args)
raise ArgumentError, "you must specify the expected arguments" if args.empty?
@arguments = *args
behaves_like_ruby_1_9 = *[]
if (behaves_like_ruby_1_9)
@arguments = @arguments.first if @arguments.length <= 1
if args.length == 1
@arguments = args.first
else
@arguments = args
end
self
end
4 changes: 2 additions & 2 deletions spec/mspec/spec/commands/mkspec_spec.rb
Original file line number Diff line number Diff line change
@@ -146,13 +146,13 @@

it "creates the directory if it does not exist" do
File.should_receive(:exist?).and_return(false)
FileUtils.should_receive(:mkdir_p).with("spec/class")
@script.should_receive(:mkdir_p).with("spec/class")
@script.create_directory("Class").should == "spec/class"
end

it "creates the directory for a namespaced module if it does not exist" do
File.should_receive(:exist?).and_return(false)
FileUtils.should_receive(:mkdir_p).with("spec/struct/tms")
@script.should_receive(:mkdir_p).with("spec/struct/tms")
@script.create_directory("Struct::Tms").should == "spec/struct/tms"
end
end
2 changes: 1 addition & 1 deletion spec/mspec/spec/commands/mspec_run_spec.rb
Original file line number Diff line number Diff line change
@@ -126,7 +126,7 @@
@options.should_receive(:parse).and_return([])
@script.should_receive(:exit)
@script.options
$stdout.should =~ /No files specified/
$stdout.should include "No files specified"
end

it "process 'spec/' if it is a directory and no files were specified" do
2 changes: 1 addition & 1 deletion spec/mspec/spec/commands/mspec_tag_spec.rb
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@
@options.should_receive(:parse).and_return([])
@script.should_receive(:exit)
@script.options
$stdout.should =~ /No files specified/
$stdout.should include "No files specified"
end
end

22 changes: 11 additions & 11 deletions spec/mspec/spec/expectations/should_spec.rb
Original file line number Diff line number Diff line change
@@ -11,51 +11,51 @@

describe "#should" do
it "records failures" do
@out.should =~ Regexp.new(Regexp.escape(%[
@out.should include <<-EOS
1)
MSpec expectation method #should causes a failue to be recorded FAILED
Expected 1
to equal 2
]))
EOS
end

it "raises exceptions for examples with no expectations" do
@out.should =~ Regexp.new(Regexp.escape(%[
@out.should include <<-EOS
2)
MSpec expectation method #should registers that an expectation has been encountered FAILED
No behavior expectation was found in the example
]))
EOS
end
end

describe "#should_not" do
it "records failures" do
@out.should =~ Regexp.new(Regexp.escape(%[
@out.should include <<-EOS
3)
MSpec expectation method #should_not causes a failure to be recorded FAILED
Expected 1
not to equal 1
]))
EOS
end

it "raises exceptions for examples with no expectations" do
@out.should =~ Regexp.new(Regexp.escape(%[
@out.should include <<-EOS
4)
MSpec expectation method #should_not registers that an expectation has been encountered FAILED
No behavior expectation was found in the example
]))
EOS
end
end

it "prints status information" do
@out.should =~ /\.FF\.\.FF\./
@out.should include ".FF..FF."
end

it "prints out a summary" do
@out.should =~ /0 files, 8 examples, 6 expectations, 4 failures, 0 errors/
@out.should include "0 files, 8 examples, 6 expectations, 4 failures, 0 errors"
end

it "records expectations" do
@out.should =~ /I was called 6 times/
@out.should include "I was called 6 times"
end
end
6 changes: 3 additions & 3 deletions spec/mspec/spec/runner/formatters/html_spec.rb
Original file line number Diff line number Diff line change
@@ -167,7 +167,7 @@
exc = ExceptionState.new @state, nil, @exception
@formatter.exception exc
@formatter.finish
@out.should =~ %r[<p>describe it ERROR</p>]
@out.should include "<p>describe it ERROR</p>"
end

it "prints a backtrace for an exception" do
@@ -181,13 +181,13 @@
it "prints a summary of elapsed time" do
@timer.should_receive(:format).and_return("Finished in 2.0 seconds")
@formatter.finish
@out.should =~ %r[<p>Finished in 2.0 seconds</p>\n]
@out.should include "<p>Finished in 2.0 seconds</p>\n"
end

it "prints a tally of counts" do
@tally.should_receive(:format).and_return("1 example, 0 failures")
@formatter.finish
@out.should =~ %r[<p class="pass">1 example, 0 failures</p>]
@out.should include '<p class="pass">1 example, 0 failures</p>'
end

it "prints errors, backtraces, elapsed time, and tallies" do
22 changes: 11 additions & 11 deletions spec/mspec/spec/runner/formatters/junit_spec.rb
Original file line number Diff line number Diff line change
@@ -83,9 +83,9 @@

it "outputs a failure message and backtrace" do
@formatter.finish
$stdout.should =~ /message="error in describe it" type="error"/
$stdout.should =~ /MSpecExampleError: broken\n/
$stdout.should =~ %r[path/to/some/file.rb:35:in method]
$stdout.should include 'message="error in describe it" type="error"'
$stdout.should include "MSpecExampleError: broken\n"
$stdout.should include "path/to/some/file.rb:35:in method"
end

it "encodes message and backtrace in latin1 for jenkins" do
@@ -100,48 +100,48 @@
it "outputs an elapsed time" do
@timer.should_receive(:elapsed).and_return(4.2)
@formatter.finish
$stdout.should =~ /time="4.2"/
$stdout.should include 'time="4.2"'
end

it "outputs overall elapsed time" do
@timer.should_receive(:elapsed).and_return(4.2)
@formatter.finish
$stdout.should =~ /timeCount="4.2"/
$stdout.should include 'timeCount="4.2"'
end

it "outputs the number of examples as test count" do
@counter.should_receive(:examples).and_return(9)
@formatter.finish
$stdout.should =~ /tests="9"/
$stdout.should include 'tests="9"'
end

it "outputs overall number of examples as test count" do
@counter.should_receive(:examples).and_return(9)
@formatter.finish
$stdout.should =~ /testCount="9"/
$stdout.should include 'testCount="9"'
end

it "outputs a failure count" do
@counter.should_receive(:failures).and_return(2)
@formatter.finish
$stdout.should =~ /failureCount="2"/
$stdout.should include 'failureCount="2"'
end

it "outputs overall failure count" do
@counter.should_receive(:failures).and_return(2)
@formatter.finish
$stdout.should =~ /failures="2"/
$stdout.should include 'failures="2"'
end

it "outputs an error count" do
@counter.should_receive(:errors).and_return(1)
@formatter.finish
$stdout.should =~ /errors="1"/
$stdout.should include 'errors="1"'
end

it "outputs overall error count" do
@counter.should_receive(:errors).and_return(1)
@formatter.finish
$stdout.should =~ /errorCount="1"/
$stdout.should include 'errorCount="1"'
end
end
18 changes: 9 additions & 9 deletions spec/mspec/spec/runner/formatters/yaml_spec.rb
Original file line number Diff line number Diff line change
@@ -82,44 +82,44 @@

it "outputs a failure message and backtrace" do
@formatter.finish
$stdout.should =~ /describe it ERROR/
$stdout.should =~ /MSpecExampleError: broken\\n/
$stdout.should =~ %r[path/to/some/file.rb:35:in method]
$stdout.should include "describe it ERROR"
$stdout.should include "MSpecExampleError: broken\\n"
$stdout.should include "path/to/some/file.rb:35:in method"
end

it "outputs an elapsed time" do
@timer.should_receive(:elapsed).and_return(4.2)
@formatter.finish
$stdout.should =~ /time: 4.2/
$stdout.should include "time: 4.2"
end

it "outputs a file count" do
@counter.should_receive(:files).and_return(3)
@formatter.finish
$stdout.should =~ /files: 3/
$stdout.should include "files: 3"
end

it "outputs an example count" do
@counter.should_receive(:examples).and_return(3)
@formatter.finish
$stdout.should =~ /examples: 3/
$stdout.should include "examples: 3"
end

it "outputs an expectation count" do
@counter.should_receive(:expectations).and_return(9)
@formatter.finish
$stdout.should =~ /expectations: 9/
$stdout.should include "expectations: 9"
end

it "outputs a failure count" do
@counter.should_receive(:failures).and_return(2)
@formatter.finish
$stdout.should =~ /failures: 2/
$stdout.should include "failures: 2"
end

it "outputs an error count" do
@counter.should_receive(:errors).and_return(1)
@formatter.finish
$stdout.should =~ /errors: 1/
$stdout.should include "errors: 1"
end
end
3 changes: 0 additions & 3 deletions spec/ruby/.travis.yml
Original file line number Diff line number Diff line change
@@ -5,9 +5,6 @@ rvm:
- 2.2.4
- 2.3.0
- ruby-head
matrix:
allow_failures:
- rvm: ruby-head
install:
- git clone https://github.com/ruby/mspec.git ../mspec
script:
10 changes: 8 additions & 2 deletions spec/ruby/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The Ruby Spec Suite

[![Build Status](https://travis-ci.org/ruby/spec.svg)](https://travis-ci.org/ruby/spec)
[![Build Status](https://ci.appveyor.com/api/projects/status/4hkpsv1570cb9y3r?svg=true)](https://ci.appveyor.com/project/eregon/spec)
[![Build Status](https://ci.appveyor.com/api/projects/status/1gs6f399320o44b1?svg=true)](https://ci.appveyor.com/project/eregon/spec-x948i)

The Ruby Spec Suite is a test suite for the behavior of the Ruby programming language.

@@ -18,9 +18,15 @@ The specs are written with syntax similar to RSpec 2.
They are run with MSpec, the purpose-built framework for running the Ruby Spec Suite.
For more information, see the [MSpec](http://github.com/ruby/mspec) project.

The specs describe the [language syntax](language/), the [core library](core/) and the [standard library](library/).
The specs describe the [language syntax](language/), the [core library](core/), the [standard library](library/), the [C API for extensions](optional/capi) and the [command line flags](command_line/).
The language specs are grouped by keyword while the core and standard library specs are grouped by class and method.

ruby/spec is known to be tested in these implementations for every commit:
* [MRI](http://rubyci.org/) on 30 platforms and 4 versions
* [JRuby](https://github.com/jruby/jruby/tree/master/spec/ruby) on Travis for both 1.7 and 9.x
* [JRuby+Truffle](https://github.com/jruby/jruby/wiki/Truffle#rubyspec) on Travis
* [Opal](https://github.com/opal/opal/tree/master/spec) on Travis

### Running the specs

First, clone this repository:
3 changes: 0 additions & 3 deletions spec/ruby/TODO
Original file line number Diff line number Diff line change
@@ -3,9 +3,6 @@
* Look at automating discovery of guarded bugs which have been fixed.
* Use mocks for all Math functions that coerce with #to_f; currently a fixture
is used.
* use ruby_exe instead of RUBY_EXE/RUBY_FLAGS.
* investigate slow specs (run with -fp) and make them faster.
* restore some caller specs from 642bf529
* restore refinements specs and update. See 56c5528f and f20a62e8.
* remove not_compliant_on/diverge_on guards, these specs are
implementation-specific and either should be generalized or removed.
Loading