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: eeb9299282b1
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: daf94b93906c
Choose a head ref

Commits on Jun 14, 2015

  1. For those few methods which are not implements the argument descripto…

    …r interfaces we will
    
    give it a nameless rest and have it work instead of exploding.
    enebo committed Jun 14, 2015
    Copy the full SHA
    2330898 View commit details
  2. Fix #3042: For loops don't get their own static scope

    * So, ignore for-loop scopes while calculating scope depth for
      scope-module lookup.
    * Added a regression spec (that failed without the fix).
    subbuss committed Jun 14, 2015
    Copy the full SHA
    d2979e3 View commit details

Commits on Jun 15, 2015

  1. Squashed 'spec/mspec/' changes from 33cc542..237524a

    237524a Fix fd leak in output_to_fd helper.
    4221459 Drop 1.8 support for mspec
    6dff61b Never close STDIN with the argf helper.
    14bbf5a Add a argf helper for ARGF specs.
    07eddcd Update Gemfile.lock.
    c557ae4 Actually save the value of ARGV by duping the array
    
    git-subtree-dir: spec/mspec
    git-subtree-split: 237524a4c829df8e9ed5b432ed31aefc30370318
    eregon committed Jun 15, 2015
    Copy the full SHA
    b8a7a40 View commit details
  2. Copy the full SHA
    de1a5cc View commit details
  3. Copy the full SHA
    53c1ece View commit details
  4. Squashed 'spec/ruby/' changes from ee9abb8..1ac2212

    1ac2212 Loosen the specs for Symbol#all_symbols increasing in size.
    086a2b1 Fix bad Fixnum#- expectation.
    636fc34 Merge pull request #77 from ruby/not-supported-on-opal
    cdcb11a Fix order in SpecTCPServer#shutdown
    89a5e8c Temporary fix for webrick < 2.2 which may not terminate the call to select
    38692c5 Flags `x`, `n`, and `s` cannot be used in JavaScript regular expressions Regular expressions such as /(?ix:foo)/ are invalid in JavaScript
    36ae046 Fix leaks and order dependent C-API specs
    e9dc107 Fix Tempfile specs leaks
    ffd01ce Fix socket and file leaks in Socket specs
    1ae2b2d Fix leak in the Open3.popen3 spec and add an example
    586f4db Start and stop the WEBrick server for each net/http spec
    c5ae4d3 Make sure to close the socket after the FTP request
    a7e875e Guard against IO.binread fd leak for older versions.
    006fe2e Fix leaked threads in Thread specs
    1f92316 Make the GC specs independent of whether the GC is enabled at entry.
    9ad4483 Fix leaks in Kernel specs.
    5822199 Do close @io to not leak the fd in IO#reopen.
    3edfbae Fix a few fd leaks in IO specs.
    8295a10 Fix many leaks, thanks to the new leak checker in MSpec.
    4d96ab8 Create the CGI instance in the with the appropriate ENV variable
    5857add Rewrite ARGF specs to not alter global state.
    5034b02 Fix class variable spec to not be order-dependent
    d17c24d Make sure to reset default_internal encoding in Dir.entries specs.
    60225098 No need for after in ARGF.set_encoding since it shells out
    b3e182e Fix various order-dependent specs.
    60df767 Fix GC::Profiler.{enable,disable} specs.
    b570eb3 Do not clear $LOADED_FEATURES and $LOAD_PATH
    3486ace Fix Math.gamma test to depend only on local state.
    c0bcb22 Fix flaky Module specs.
    4a32dfa Make Dir spec not depend on the execution order.
    d8e3429 Fix Kernel#{public_send,send} to not be order-dependent.
    21c6ae1 Fix Module.constants spec leaking a constant.
    ba05088 Fix remaining ARGF flaky tests by isolating ARGF.set_encoding.
    54b3344 Fix flaky ARGF.lineno test.
    78e9c7d Fix Thread#[]= leaking a thread-local on the main thread
    f492595 Do not use global state with @method_args but just pass it along the method name.
    2f3701a Add a comment to clarify the version guard.
    c6cf315 [Truffle] Fix the guard for some keyword argument spec.
    49576b4 Switch from using 'logname' to using 'id -un'.
    bd3309d Merge pull request #75 from kachick/hash-fetch_values
    66e5c08 Write Hash#fetch_values specs
    e0cc72c Merge pull request #73 from ruby/fix-description
    c8fc6d1 Fix description typo
    4d0d42a Tempfile.new can take an encoding hash in 1.9.
    ed001ec Move the unicode constant to another file
    94dce9f Use the default arguments for mspec on Travis
    a7b4d17 Allow 2.0.0 to fail until #72 is resolved.
    253b92d Use MSpec without Bundler on travis
    261855a Put a couple spec in quarantine a they conflict with bundler exec.
    e5d0bd0 Run all specs by default
    2a4ab31 Remove trailing spaces
    e94542f Split the example in Integer#even? to remove guards.
    be75461 Allow failures on OS X 2.0.0 until #72 is resolved.
    109e4e8 Add notes about guards and style for contributing
    8430044 Remove not_compliant_on :opal.
    388a4ad Just ensure BasicObject can responds to #hash
    4b2a19d Opal cannot support 'u', 'e', 's', and 'n' regexp flags
    574d538 Add Array#bsearch examples using break in block
    b93096a Construct Regexps with the constructor so that Opal can parse them.
    e2ddc0c Opal cannot detect invalid UTF-8 byte sequences
    fae5eb3 "cruel world".scan(:symbol) should not raise an error in Opal
    6748b52 Opal cannot support regexps containing \A, \Z, and \z
    0677951 Opal cannot support bignum
    51b6594 Opal cannot parse the backslash line continuation
    7050806 'hello'.match(:symbol) should not raise an error on Opal
    2b66384 Specs that use numbers too large for JavaScript cannot be supported on Opal
    f87cf7a Mark some unparsable by JS regexps as not_supported_on on Opal
    124136f Regexp \A, \Z, \z, and \G cannot be supported on Opal
    321d82a Guard invalid regexp flags for Opal
    7e709a9 "'hello'.should_not eql(:hello)" cannot be supported on Opal
    be16be6 "('stuff'.equal? 'stuff').should == false" cannot be supported on Opal
    501e0b4 Missing case: "/[]9999".succ should be "/[]10000"
    80ffe5d Avoid relying the type returned by #hash
    6d31f3c Remove the last versioned file.
    9aa3e41 Remove the Europe/Lisbon time zone change spec.
    
    git-subtree-dir: spec/ruby
    git-subtree-split: 1ac2212c39b665812fd2f4966fb5a68e019d51fe
    eregon committed Jun 15, 2015
    Copy the full SHA
    0751583 View commit details
  5. [Truffle] Exclude ARGF specs as the Rubinius implementation is not co…

    …mpliant with them for now
    eregon committed Jun 15, 2015
    Copy the full SHA
    6d0b3a7 View commit details
  6. Squashed 'spec/ruby/' changes from 1ac2212..d128ccf

    d128ccf Fix leak and error in File.open(fd) spec
    
    git-subtree-dir: spec/ruby
    git-subtree-split: d128ccf4fb146322d2fe0e457894d314bc1621ad
    eregon committed Jun 15, 2015
    Copy the full SHA
    744cbf6 View commit details
  7. Copy the full SHA
    f53372e View commit details
  8. Copy the full SHA
    9f0085a View commit details
  9. Copy the full SHA
    7eb5d7f View commit details
  10. [Truffle] Re-enable ARGF specs by providing a more flexible implement…

    …ation
    
    * Take an arbitrary array of strings as input.
    * ARGV is treated specially to make sure it is passed by reference
      (since calling with * and receiving with * might create a copy).
    eregon committed Jun 15, 2015
    Copy the full SHA
    f51b89f View commit details
  11. Tag failing require specs.

    eregon committed Jun 15, 2015
    Copy the full SHA
    9da2c2c View commit details
  12. [Truffle] Tag failing spec.

    eregon committed Jun 15, 2015
    Copy the full SHA
    d8b2c80 View commit details
  13. Add GzipReader#readbyte. Fixes #3041

    Conflicts:
    	core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipReader.java
    headius committed Jun 15, 2015
    2
    Copy the full SHA
    158902f View commit details
  14. Copy the full SHA
    234c22b View commit details
  15. Copy the full SHA
    a3b5cdd View commit details
  16. Copy the full SHA
    bdc1226 View commit details
  17. Copy the full SHA
    2f324a7 View commit details
  18. Copy the full SHA
    8243763 View commit details
  19. Also tag this spawn spec.

    headius committed Jun 15, 2015
    Copy the full SHA
    44cbb9d View commit details
  20. Copy the full SHA
    0af53f6 View commit details
  21. Copy the full SHA
    5ed43e4 View commit details

Commits on Jun 16, 2015

  1. Copy the full SHA
    32941af View commit details
  2. [Truffle] Remove extraneous catch(NextException | RedoException).

    * They are already caught at the right place upper in the chain.
    eregon committed Jun 16, 2015
    Copy the full SHA
    e3012aa View commit details
  3. Add spec for next in a method

    eregon committed Jun 16, 2015
    Copy the full SHA
    d446d83 View commit details
  4. Add spec for redo in a method

    eregon committed Jun 16, 2015
    Copy the full SHA
    5f0f809 View commit details
  5. Add tags for failing specs

    eregon committed Jun 16, 2015
    Copy the full SHA
    dcb41d0 View commit details
  6. Copy the full SHA
    8136d9c View commit details
  7. Copy the full SHA
    b5a3e8b View commit details
  8. Copy the full SHA
    2c4bff3 View commit details
  9. Copy the full SHA
    b80c27a View commit details
  10. Copy the full SHA
    0796d49 View commit details
  11. Copy the full SHA
    91bf8af View commit details
  12. Copy the full SHA
    04db9d8 View commit details

Commits on Jun 17, 2015

  1. [Truffle] Preserve LexicalScope accross eval.

    * Fixes #3052.
    eregon committed Jun 17, 2015
    Copy the full SHA
    1386a17 View commit details
  2. Fix assertion in Module#module_eval.

    * The constant should be defined in ModuleSpecs not upper.
    eregon committed Jun 17, 2015
    Copy the full SHA
    ea05fb4 View commit details
  3. Copy the full SHA
    34eeb2d View commit details
  4. 2
    Copy the full SHA
    bee9663 View commit details
  5. Copy the full SHA
    13cf737 View commit details
  6. Copy the full SHA
    1e4f7f1 View commit details
  7. [Truffle] Replace most uses of TruffleRuntime.getCallerFrame() by the…

    … RubyCallStack version.
    
    * Ignores #send as it should for these cases.
    * See #3013.
    eregon committed Jun 17, 2015
    Copy the full SHA
    2b2d2a1 View commit details
  8. [Truffle] Introduce BooleanCastWithDefaultNode which cast and allow a…

    … default for NotProvided.
    
    * Reduce the number of specializations from 3 to 1.
    eregon committed Jun 17, 2015
    1
    Copy the full SHA
    1e55229 View commit details
  9. ListNode is backed by primitive array + size field vs ArrayList.

    New companion method children().
    
    This is primarily to save memory (rails server on empty app with --dev uses ~1MB less memory).
    It was hoped this may warmup faster but it seems about the same (or a tiny tiny bit faster).  The
    difference is easily written off as noise.
    enebo committed Jun 17, 2015
    Copy the full SHA
    40d257c View commit details
  10. Copy the full SHA
    9651a3a View commit details
  11. Whoops. Poor translation when converting to primitive array. I misund…

    …erstood what index was for.
    enebo committed Jun 17, 2015
    Copy the full SHA
    ee9cc93 View commit details
  12. Copy the full SHA
    7d4c012 View commit details
  13. Copy the full SHA
    f156e5f View commit details
  14. Copy the full SHA
    daf94b9 View commit details
Showing with 2,285 additions and 2,239 deletions.
  1. +2 −3 bin/jruby.bash
  2. +2 −3 bin/jruby.sh
  3. +11 −12 core/src/main/java/org/jruby/Ruby.java
  4. +3 −7 core/src/main/java/org/jruby/ast/ArgsNode.java
  5. +48 −25 core/src/main/java/org/jruby/ast/ListNode.java
  6. +3 −6 core/src/main/java/org/jruby/ast/ZArrayNode.java
  7. +9 −0 core/src/main/java/org/jruby/ext/zlib/JZlibRubyGzipReader.java
  8. +37 −32 core/src/main/java/org/jruby/ir/IRBuilder.java
  9. +1 −1 core/src/main/java/org/jruby/ir/instructions/Instr.java
  10. +0 −4 core/src/main/java/org/jruby/ir/operands/Array.java
  11. +1 −1 core/src/main/java/org/jruby/ir/operands/ScopeModule.java
  12. +8 −5 core/src/main/java/org/jruby/parser/ParserSupport.java
  13. +6 −6 core/src/main/java/org/jruby/runtime/Helpers.java
  14. +1 −1 core/src/main/java/org/jruby/util/io/PopenExecutor.java
  15. +1 −1 spec/jruby.2.2.mspec
  16. +0 −1 spec/mspec/.travis.yml
  17. +3 −0 spec/mspec/Gemfile.lock
  18. +1 −0 spec/mspec/lib/mspec/helpers.rb
  19. +37 −0 spec/mspec/lib/mspec/helpers/argf.rb
  20. +1 −1 spec/mspec/lib/mspec/helpers/argv.rb
  21. +3 −0 spec/mspec/lib/mspec/matchers/output_to_fd.rb
  22. +37 −0 spec/mspec/spec/helpers/argf_spec.rb
  23. +2 −2 spec/mspec/spec/helpers/argv_spec.rb
  24. +23 −0 spec/regression/GH-3042_cvar_access_in_for_loop.rb
  25. +7 −0 spec/regression/GH-3060_spec.rb
  26. +4 −1 spec/ruby/.travis.yml
  27. +15 −0 spec/ruby/CONTRIBUTING.md
  28. +2 −0 spec/ruby/command_line/dash_e_spec.rb
  29. +5 −0 spec/ruby/core/argf/argf_spec.rb
  30. +10 −15 spec/ruby/core/argf/binmode_spec.rb
  31. +13 −15 spec/ruby/core/argf/close_spec.rb
  32. +4 −8 spec/ruby/core/argf/closed_spec.rb
  33. +4 −8 spec/ruby/core/argf/file_spec.rb
  34. +3 −0 spec/ruby/core/argf/fixtures/filename.rb
  35. +5 −0 spec/ruby/core/argf/fixtures/lineno.rb
  36. +5 −0 spec/ruby/core/argf/fixtures/rewind.rb
  37. +3 −7 spec/ruby/core/argf/getc_spec.rb
  38. +5 −10 spec/ruby/core/argf/gets_spec.rb
  39. +13 −34 spec/ruby/core/argf/lineno_spec.rb
  40. +13 −17 spec/ruby/core/argf/pos_spec.rb
  41. +27 −31 spec/ruby/core/argf/read_spec.rb
  42. +2 −6 spec/ruby/core/argf/readchar_spec.rb
  43. +2 −6 spec/ruby/core/argf/readline_spec.rb
  44. +14 −22 spec/ruby/core/argf/rewind_spec.rb
  45. +33 −33 spec/ruby/core/argf/seek_spec.rb
  46. +9 −20 spec/ruby/core/argf/set_encoding_spec.rb
  47. +10 −14 spec/ruby/core/argf/shared/each_byte.rb
  48. +10 −14 spec/ruby/core/argf/shared/each_char.rb
  49. +14 −18 spec/ruby/core/argf/shared/each_codepoint.rb
  50. +14 −18 spec/ruby/core/argf/shared/each_line.rb
  51. +7 −11 spec/ruby/core/argf/shared/eof.rb
  52. +7 −16 spec/ruby/core/argf/shared/filename.rb
  53. +5 −9 spec/ruby/core/argf/shared/fileno.rb
  54. +2 −6 spec/ruby/core/argf/shared/getc.rb
  55. +8 −12 spec/ruby/core/argf/shared/gets.rb
  56. +14 −18 spec/ruby/core/argf/shared/pos.rb
  57. +5 −9 spec/ruby/core/argf/shared/readlines.rb
  58. +15 −19 spec/ruby/core/argf/skip_spec.rb
  59. +5 −9 spec/ruby/core/argf/to_io_spec.rb
  60. +2 −6 spec/ruby/core/argf/to_s_spec.rb
  61. +16 −0 spec/ruby/core/array/bsearch_spec.rb
  62. +3 −3 spec/ruby/core/array/hash_spec.rb
  63. +1 −1 spec/ruby/core/basicobject/basicobject_spec.rb
  64. +7 −1 spec/ruby/core/dir/entries_spec.rb
  65. +15 −17 spec/ruby/core/dir/fileno_spec.rb
  66. +2 −2 spec/ruby/core/dir/glob_spec.rb
  67. +6 −1 spec/ruby/core/dir/initialize_spec.rb
  68. +7 −7 spec/ruby/core/dir/inspect_spec.rb
  69. +3 −4 spec/ruby/core/dir/shared/delete.rb
  70. +10 −3 spec/ruby/core/dir/shared/path.rb
  71. +4 −4 spec/ruby/core/encoding/default_external_spec.rb
  72. +2 −2 spec/ruby/core/encoding/default_internal_spec.rb
  73. +1 −2 spec/ruby/core/enumerable/each_cons_spec.rb
  74. +1 −2 spec/ruby/core/enumerable/each_slice_spec.rb
  75. +1 −4 spec/ruby/core/enumerable/each_with_object_spec.rb
  76. +2 −2 spec/ruby/core/enumerable/shared/enumeratorized.rb
  77. +1 −4 spec/ruby/core/enumerable/slice_before_spec.rb
  78. +1 −0 spec/ruby/core/env/delete_spec.rb
  79. +7 −3 spec/ruby/core/env/invert_spec.rb
  80. +8 −2 spec/ruby/core/env/keep_if_spec.rb
  81. +10 −6 spec/ruby/core/file/initialize_spec.rb
  82. +20 −11 spec/ruby/core/file/open_spec.rb
  83. +6 −1 spec/ruby/core/file/shared/open.rb
  84. +6 −4 spec/ruby/core/file/socket_spec.rb
  85. +1 −0 spec/ruby/core/gc/disable_spec.rb
  86. +1 −0 spec/ruby/core/gc/enable_spec.rb
  87. +3 −8 spec/ruby/core/gc/profiler/disable_spec.rb
  88. +3 −8 spec/ruby/core/gc/profiler/enable_spec.rb
  89. +35 −0 spec/ruby/core/hash/fetch_values_spec.rb
  90. +1 −1 spec/ruby/core/hash/shared/key.rb
  91. +3 −1 spec/ruby/core/integer/even_spec.rb
  92. +4 −2 spec/ruby/core/io/binread_spec.rb
  93. +1 −1 spec/ruby/core/io/output_spec.rb
  94. +14 −6 spec/ruby/core/io/pipe_spec.rb
  95. +6 −6 spec/ruby/core/io/popen_spec.rb
  96. +2 −1 spec/ruby/core/io/read_spec.rb
  97. +1 −2 spec/ruby/core/io/reopen_spec.rb
  98. +1 −1 spec/ruby/core/io/shared/tty.rb
  99. +2 −8 spec/ruby/core/io/sysopen_spec.rb
  100. +6 −3 spec/ruby/core/io/write_spec.rb
  101. +3 −1 spec/ruby/core/kernel/equal_spec.rb
  102. +2 −2 spec/ruby/core/kernel/eval_spec.rb
  103. +5 −1 spec/ruby/core/kernel/open_spec.rb
  104. +3 −3 spec/ruby/core/kernel/public_send_spec.rb
  105. +9 −6 spec/ruby/core/kernel/require_relative_spec.rb
  106. +3 −3 spec/ruby/core/kernel/send_spec.rb
  107. +4 −3 spec/ruby/core/kernel/shared/load.rb
  108. +15 −13 spec/ruby/core/kernel/shared/require.rb
  109. +4 −7 spec/ruby/core/kernel/shared/send.rb
  110. +4 −0 spec/ruby/core/kernel/system_spec.rb
  111. +3 −2 spec/ruby/core/kernel/test_spec.rb
  112. +6 −4 spec/ruby/core/matchdata/begin_spec.rb
  113. +6 −4 spec/ruby/core/matchdata/end_spec.rb
  114. +6 −4 spec/ruby/core/matchdata/offset_spec.rb
  115. +10 −13 spec/ruby/core/math/gamma_spec.rb
  116. +3 −2 spec/ruby/core/module/const_defined_spec.rb
  117. +15 −7 spec/ruby/core/module/constants_spec.rb
  118. +10 −0 spec/ruby/core/module/fixtures/classes.rb
  119. +5 −0 spec/ruby/core/module/fixtures/constant_unicode.rb
  120. +10 −4 spec/ruby/core/module/private_class_method_spec.rb
  121. +9 −4 spec/ruby/core/module/public_class_method_spec.rb
  122. +10 −6 spec/ruby/core/module/remove_const_spec.rb
  123. +14 −1 spec/ruby/core/module/shared/class_eval.rb
  124. +6 −1 spec/ruby/core/mutex/owned_spec.rb
  125. +5 −3 spec/ruby/core/regexp/hash_spec.rb
  126. +4 −2 spec/ruby/core/regexp/inspect_spec.rb
  127. +11 −7 spec/ruby/core/regexp/options_spec.rb
  128. +15 −11 spec/ruby/core/regexp/shared/equal_value.rb
  129. +52 −30 spec/ruby/core/regexp/shared/new_ascii.rb
  130. +52 −30 spec/ruby/core/regexp/shared/new_ascii_8bit.rb
  131. +13 −7 spec/ruby/core/regexp/source_spec.rb
  132. +38 −26 spec/ruby/core/regexp/to_s_spec.rb
  133. +4 −2 spec/ruby/core/regexp/try_convert_spec.rb
  134. +6 −2 spec/ruby/core/regexp/union_spec.rb
  135. +3 −1 spec/ruby/core/string/delete_spec.rb
  136. +1 −1 spec/ruby/core/string/element_reference_spec.rb
  137. +3 −1 spec/ruby/core/string/eql_spec.rb
  138. +1 −2 spec/ruby/core/string/getbyte_spec.rb
  139. +8 −4 spec/ruby/core/string/gsub_spec.rb
  140. +10 −6 spec/ruby/core/string/index_spec.rb
  141. +7 −3 spec/ruby/core/string/match_spec.rb
  142. +16 −6 spec/ruby/core/string/modulo_spec.rb
  143. +37 −27 spec/ruby/core/string/rindex_spec.rb
  144. +3 −1 spec/ruby/core/string/scan_spec.rb
  145. +3 −1 spec/ruby/core/string/shared/equal_value.rb
  146. +1 −0 spec/ruby/core/string/shared/succ.rb
  147. +12 −0 spec/ruby/core/symbol/encoding_spec.rb
  148. +0 −11 spec/ruby/core/symbol/versions/encoding_1.9_spec.rb
  149. +1 −0 spec/ruby/core/thread/abort_on_exception_spec.rb
  150. +3 −0 spec/ruby/core/thread/element_set_spec.rb
  151. +1 −0 spec/ruby/core/thread/initialize_spec.rb
  152. +7 −3 spec/ruby/core/thread/list_spec.rb
  153. +2 −0 spec/ruby/core/thread/raise_spec.rb
  154. +0 −9 spec/ruby/core/time/shared/local.rb
  155. +10 −7 spec/ruby/default.mspec
  156. +0 −4 spec/ruby/fixtures/code_loading.rb
  157. +0 −4 spec/ruby/fixtures/constants.rb
  158. +1 −1 spec/ruby/language/block_spec.rb
  159. +10 −2 spec/ruby/language/class_variable_spec.rb
  160. +11 −1 spec/ruby/language/next_spec.rb
  161. +1 −0 spec/ruby/language/predefined/data_spec.rb
  162. +8 −0 spec/ruby/language/redo_spec.rb
  163. +5 −3 spec/ruby/language/regexp/character_classes_spec.rb
  164. +2 −2 spec/ruby/language/send_spec.rb
  165. +7 −1 spec/ruby/library/cgi/htmlextension/fixtures/common.rb
  166. +5 −2 spec/ruby/library/net/ftp/fixtures/server.rb
  167. +2 −8 spec/ruby/library/net/http/http/copy_spec.rb
  168. +2 −8 spec/ruby/library/net/http/http/delete_spec.rb
  169. +4 −6 spec/ruby/library/net/http/http/finish_spec.rb
  170. +40 −57 spec/ruby/library/net/http/http/fixtures/http_server.rb
  171. +2 −2 spec/ruby/library/net/http/http/get_print_spec.rb
  172. +2 −2 spec/ruby/library/net/http/http/get_response_spec.rb
  173. +2 −2 spec/ruby/library/net/http/http/get_spec.rb
  174. +2 −8 spec/ruby/library/net/http/http/head_spec.rb
  175. +8 −11 spec/ruby/library/net/http/http/inspect_spec.rb
  176. +2 −8 spec/ruby/library/net/http/http/lock_spec.rb
  177. +2 −8 spec/ruby/library/net/http/http/mkcol_spec.rb
  178. +2 −8 spec/ruby/library/net/http/http/move_spec.rb
  179. +2 −8 spec/ruby/library/net/http/http/options_spec.rb
  180. +2 −2 spec/ruby/library/net/http/http/post_form_spec.rb
  181. +2 −8 spec/ruby/library/net/http/http/post_spec.rb
  182. +2 −8 spec/ruby/library/net/http/http/propfind_spec.rb
  183. +2 −8 spec/ruby/library/net/http/http/proppatch_spec.rb
  184. +2 −8 spec/ruby/library/net/http/http/put_spec.rb
  185. +2 −8 spec/ruby/library/net/http/http/request_spec.rb
  186. +2 −8 spec/ruby/library/net/http/http/send_request_spec.rb
  187. +4 −6 spec/ruby/library/net/http/http/set_debug_output_spec.rb
  188. +2 −8 spec/ruby/library/net/http/http/shared/request_get.rb
  189. +2 −8 spec/ruby/library/net/http/http/shared/request_head.rb
  190. +2 −8 spec/ruby/library/net/http/http/shared/request_post.rb
  191. +2 −8 spec/ruby/library/net/http/http/shared/request_put.rb
  192. +10 −12 spec/ruby/library/net/http/http/shared/started.rb
  193. +4 −10 spec/ruby/library/net/http/http/start_spec.rb
  194. +2 −8 spec/ruby/library/net/http/http/trace_spec.rb
  195. +2 −8 spec/ruby/library/net/http/http/unlock_spec.rb
  196. +25 −11 spec/ruby/library/open3/popen3_spec.rb
  197. +2 −0 spec/ruby/library/socket/basicsocket/do_not_reverse_lookup_spec.rb
  198. +21 −69 spec/ruby/library/socket/fixtures/classes.rb
  199. +1 −9 spec/ruby/library/socket/ipsocket/addr_spec.rb
  200. +1 −8 spec/ruby/library/socket/ipsocket/peeraddr_spec.rb
  201. +3 −4 spec/ruby/library/socket/socket/for_fd_spec.rb
  202. +1 −8 spec/ruby/library/socket/socket/getaddrinfo_spec.rb
  203. +2 −2 spec/ruby/library/socket/socket/getnameinfo_spec.rb
  204. +3 −6 spec/ruby/library/socket/tcpsocket/recv_nonblock_spec.rb
  205. +4 −12 spec/ruby/library/socket/tcpsocket/shared/new.rb
  206. +2 −2 spec/ruby/library/socket/unixsocket/open_spec.rb
  207. +15 −12 spec/ruby/library/socket/unixsocket/recv_io_spec.rb
  208. +11 −7 spec/ruby/library/socket/unixsocket/send_io_spec.rb
  209. +5 −7 spec/ruby/library/socket/unixsocket/shared/new.rb
  210. +1 −2 spec/ruby/library/tempfile/_close_spec.rb
  211. +0 −1 spec/ruby/library/tempfile/callback_spec.rb
  212. +7 −10 spec/ruby/library/tempfile/close_spec.rb
  213. +0 −1 spec/ruby/library/tempfile/delete_spec.rb
  214. +0 −6 spec/ruby/library/tempfile/fixtures/common.rb
  215. +6 −2 spec/ruby/library/tempfile/initialize_spec.rb
  216. +0 −1 spec/ruby/library/tempfile/length_spec.rb
  217. +5 −4 spec/ruby/library/tempfile/open_spec.rb
  218. +1 −2 spec/ruby/library/tempfile/path_spec.rb
  219. +1 −1 spec/ruby/library/tempfile/shared/length.rb
  220. +0 −4 spec/ruby/library/tempfile/shared/unlink.rb
  221. +0 −1 spec/ruby/library/tempfile/size_spec.rb
  222. +0 −1 spec/ruby/library/tempfile/unlink_spec.rb
  223. +1 −1 spec/ruby/optional/capi/ext/mutex_spec.c
  224. +2 −3 spec/ruby/optional/capi/file_spec.rb
  225. +5 −1 spec/ruby/optional/capi/globals_spec.rb
  226. +15 −4 spec/ruby/optional/capi/kernel_spec.rb
  227. +5 −0 spec/ruby/shared/process/spawn.rb
  228. +1 −0 spec/tags/ruby/core/io/write_tags.txt
  229. +4 −0 spec/tags/ruby/core/kernel/require_tags.txt
  230. +1 −0 spec/tags/ruby/core/kernel/spawn_tags.txt
  231. +1 −0 spec/tags/ruby/language/next_tags.txt
  232. +1 −0 spec/tags/ruby/language/redo_tags.txt
  233. +2 −0 spec/truffle/tags/core/argf/binmode_tags.txt
  234. +2 −0 spec/truffle/tags/core/argf/lineno_tags.txt
  235. +1 −0 spec/truffle/tags/core/argf/rewind_tags.txt
  236. +4 −0 spec/truffle/tags/core/argf/set_encoding_tags.txt
  237. +2 −0 spec/truffle/tags/core/kernel/spawn_tags.txt
  238. +1 −0 spec/truffle/tags/core/process/spawn_tags.txt
  239. +1 −0 spec/truffle/tags/core/regexp/compile_tags.txt
  240. +1 −0 spec/truffle/tags/core/regexp/new_tags.txt
  241. +1 −0 spec/truffle/tags/library/open3/popen3_tags.txt
  242. +1 −0 spec/truffle/tags/library/tempfile/close_tags.txt
  243. +1 −0 spec/truffle/tags/library/tempfile/initialize_tags.txt
  244. +11 −0 test/mri/excludes_truffle/REXMLTests/AttributesTester.rb
  245. +1 −0 test/mri/excludes_truffle/REXMLTests/BaseTester.rb
  246. +7 −0 test/mri/excludes_truffle/REXMLTests/ContribTester.rb
  247. +1 −0 test/mri/excludes_truffle/REXMLTests/ElementsTester.rb
  248. +3 −0 test/mri/excludes_truffle/REXMLTests/EncodingTester.rb
  249. +7 −0 test/mri/excludes_truffle/REXMLTests/FunctionsTester.rb
  250. +1 −0 test/mri/excludes_truffle/REXMLTests/REXMLTester.rb
  251. +2 −0 test/mri/excludes_truffle/REXMLTests/SAX2Tester.rb
  252. +1 −0 test/mri/excludes_truffle/REXMLTests/TestAttributes.rb
  253. +1 −0 test/mri/excludes_truffle/REXMLTests/TestDocument.rb
  254. +4 −0 test/mri/excludes_truffle/REXMLTests/TestDocument/BomTest.rb
  255. +2 −0 test/mri/excludes_truffle/REXMLTests/TestXPathAttribute.rb
  256. +1 −0 test/mri/excludes_truffle/REXMLTests/TestXPathAxisPredcedingSibling.rb
  257. +25 −0 test/mri/excludes_truffle/REXMLTests/TestXPathBase.rb
  258. +4 −0 test/mri/excludes_truffle/REXMLTests/TestXPathPredicate.rb
  259. +22 −0 test/mri/excludes_truffle/REXMLTests/Tester.rb
  260. +2 −0 test/mri/excludes_truffle/REXMLTests/Ticket80.rb
  261. +2 −0 test/mri/excludes_truffle/REXMLTests/XPathTesterDd.rb
  262. +15 −0 test/mri/excludes_truffle/TestCSV/DataConverters.rb
  263. +14 −0 test/mri/excludes_truffle/TestCSV/Headers.rb
  264. +7 −0 test/mri/excludes_truffle/TestCSV/Parsing.rb
  265. +1 −0 test/mri/excludes_truffle/TestCSV/Table.rb
  266. +1 −0 test/mri/excludes_truffle/TestJSONGenericObject.rb
  267. +0 −5 test/mri/excludes_truffle/TestRegexp.rb
  268. +3 −0 test/mri/excludes_truffle/TestRexmlXpathAttributeQuery.rb
  269. +2 −0 test/mri/excludes_truffle/URI/TestCommon.rb
  270. +2 −0 test/mri/excludes_truffle/URI/TestGeneric.rb
  271. +1 −0 test/mri/excludes_truffle/XPathAxesTester.rb
  272. +4 −0 test/mri/excludes_truffle/XPathPredicateTester.rb
  273. +25 −0 test/mri/excludes_truffle/XPathTester.rb
  274. +53 −53 test/mri_truffle.index
  275. +2 −2 truffle/README.md
  276. +6 −2 truffle/pom.rb
  277. +8 −2 truffle/pom.xml
  278. +75 −0 truffle/src/main/java/org/jruby/truffle/nodes/cast/BooleanCastWithDefaultNode.java
  279. +4 −0 truffle/src/main/java/org/jruby/truffle/nodes/core/FixnumOrBignumNode.java
  280. +33 −131 truffle/src/main/java/org/jruby/truffle/nodes/core/IntegerNodes.java
  281. +83 −128 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  282. +56 −69 truffle/src/main/java/org/jruby/truffle/nodes/core/ModuleNodes.java
  283. +16 −69 truffle/src/main/java/org/jruby/truffle/nodes/core/RangeNodes.java
  284. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
  285. +3 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/SymbolNodes.java
  286. +2 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/TrufflePrimitiveNodes.java
  287. +58 −226 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayNodes.java
  288. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/methods/RedoableNode.java
  289. +3 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/RubiniusLastStringReadNode.java
  290. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/StringPrimitiveNodes.java
  291. +11 −58 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/VMPrimitiveNodes.java
  292. +3 −1 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyRegexp.java
  293. +1 −1 truffle/src/main/java/org/jruby/truffle/runtime/methods/Arity.java
  294. +29 −19 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
  295. +15 −16 truffle/src/main/java/org/jruby/truffle/translator/LoadArgumentsTranslator.java
  296. +1 −1 truffle/src/main/java/org/jruby/truffle/translator/MethodTranslator.java
  297. +6 −4 truffle/src/main/java/org/jruby/truffle/translator/ParseEnvironment.java
  298. +2 −2 truffle/src/main/java/org/jruby/truffle/translator/ReloadArgumentsTranslator.java
  299. +20 −2 truffle/src/main/java/org/jruby/truffle/translator/TranslatorDriver.java
  300. +9 −5 truffle/src/main/ruby/core/rubinius/common/argf.rb
5 changes: 2 additions & 3 deletions bin/jruby.bash
Original file line number Diff line number Diff line change
@@ -146,9 +146,8 @@ for j in "$JRUBY_HOME"/lib/jruby.jar "$JRUBY_HOME"/lib/jruby-complete.jar; do
JRUBY_ALREADY_ADDED=true
done

# The Truffle jar always needs to be on the boot classpath so that the VM can
# substitute classes. We add it even if the jar isn't necessarily available,
# but this doesn't cause any problems.
# The Truffle jar always needs to be on the boot classpath, if it exists, so
# that the VM can substitute classes.
if [ -e "$JRUBY_HOME/lib/jruby-truffle.jar" ]; then
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
fi
5 changes: 2 additions & 3 deletions bin/jruby.sh
Original file line number Diff line number Diff line change
@@ -107,9 +107,8 @@ for j in "$JRUBY_HOME"/lib/jruby.jar "$JRUBY_HOME"/lib/jruby-complete.jar; do
JRUBY_ALREADY_ADDED=true
done

# The Truffle jar always needs to be on the boot classpath so that the VM can
# substitute classes. We add it even if the jar isn't necessarily available,
# but this doesn't cause any problems.
# The Truffle jar always needs to be on the boot classpath, if it exists, so
# that the VM can substitute classes.
if [ -e "$JRUBY_HOME/lib/jruby-truffle.jar" ]; then
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
fi
23 changes: 11 additions & 12 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -692,25 +692,24 @@ public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean pr
private RootNode addGetsLoop(RootNode oldRoot, boolean printing, boolean processLineEndings, boolean split) {
ISourcePosition pos = oldRoot.getPosition();
BlockNode newBody = new BlockNode(pos);
newBody.add(new GlobalAsgnNode(pos, "$/", new StrNode(pos, new ByteList(getInstanceConfig().getRecordSeparator().getBytes()))));

if (processLineEndings) newBody.add(new GlobalAsgnNode(pos, "$\\", new GlobalVarNode(pos, "$/")));

BlockNode whileBody;
if (oldRoot.getBodyNode() instanceof BlockNode) { // common case n stmts
whileBody = (BlockNode) oldRoot.getBodyNode();
} else { // single expr script
whileBody = new BlockNode(pos);
whileBody.add(oldRoot.getBodyNode());
}

newBody.prepend(new GlobalAsgnNode(pos, "$/", new StrNode(pos, new ByteList(getInstanceConfig().getRecordSeparator().getBytes()))));
GlobalVarNode dollarUnderscore = new GlobalVarNode(pos, "$_");

BlockNode whileBody = new BlockNode(pos);
newBody.add(new WhileNode(pos, new VCallNode(pos, "gets"), whileBody));

if (printing) whileBody.prepend(new FCallNode(pos, "puts", new ArrayNode(pos, dollarUnderscore), null));
if (split) whileBody.prepend(new GlobalAsgnNode(pos, "$F", new CallNode(pos, dollarUnderscore, "split", null, null)));
if (processLineEndings) whileBody.prepend(new CallNode(pos, dollarUnderscore, "chop!", null, null));
if (processLineEndings) whileBody.add(new CallNode(pos, dollarUnderscore, "chop!", null, null));
if (split) whileBody.add(new GlobalAsgnNode(pos, "$F", new CallNode(pos, dollarUnderscore, "split", null, null)));
if (printing) whileBody.add(new FCallNode(pos, "puts", new ArrayNode(pos, dollarUnderscore), null));

if (oldRoot.getBodyNode() instanceof BlockNode) { // common case n stmts
whileBody.addAll(oldRoot.getBodyNode());
} else { // single expr script
whileBody.add(oldRoot.getBodyNode());
}

return new RootNode(pos, oldRoot.getScope(), newBody);
}
10 changes: 3 additions & 7 deletions core/src/main/java/org/jruby/ast/ArgsNode.java
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@

import org.jruby.ast.visitor.NodeVisitor;
import org.jruby.lexer.yacc.ISourcePosition;
import org.jruby.runtime.Helpers;

/**
* Represents the argument declarations of a method. The fields:
@@ -225,16 +226,11 @@ public int getRequiredKeywordCount() {
if (keywords == null) return 0;

int count = 0;
for (Node keyWordNode :getKeywords().childNodes()) {
for (Node keyWordNode : getKeywords().children()) {
for (Node asgnNode : keyWordNode.childNodes()) {
if (isRequiredKeywordArgumentValueNode(asgnNode)) count++;
if (Helpers.isRequiredKeywordArgumentValueNode(asgnNode)) count++;
}
}
return count;
}

private boolean isRequiredKeywordArgumentValueNode(Node asgnNode) {
return asgnNode.childNodes().get(0) instanceof RequiredKeywordArgumentValueNode;
}

}
73 changes: 48 additions & 25 deletions core/src/main/java/org/jruby/ast/ListNode.java
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
***** END LICENSE BLOCK *****/
package org.jruby.ast;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.jruby.ast.visitor.NodeVisitor;
import org.jruby.lexer.yacc.ISourcePosition;
@@ -41,7 +41,10 @@
* the editor projects who want position info saved.
*/
public class ListNode extends Node {
private List<Node> list;
private static final Node[] EMPTY = new Node[0];
private static final int INITIAL_SIZE = 4;
private Node[] list;
private int size = 0;

/**
* Create a new ListNode.
@@ -52,49 +55,62 @@ public class ListNode extends Node {
public ListNode(ISourcePosition position, Node firstNode) {
super(position, firstNode != null && firstNode.containsVariableAssignment);

list = new ArrayList<>(4);
list.add(firstNode);
list = new Node[INITIAL_SIZE];
addInternal(firstNode);
}

public ListNode(ISourcePosition position) {
super(position, false);

list = new ArrayList<>(0);
list = EMPTY;
}

public NodeType getNodeType() {
return NodeType.LISTNODE;
}

protected void growList(int mustBeDelta) {
int newSize = list.length * 2;
// Fairly arbitrary to scale 1.5 here but this means we are adding a lot so I think
// we can taper the multiplier
if (size + mustBeDelta >= newSize) newSize = (int) ((size + mustBeDelta) * 1.5);

Node[] newList = new Node[newSize];
System.arraycopy(list, 0, newList, 0, size);
list = newList;
}

protected void addInternal(Node node) {
if (size >= list.length) growList(1);

list[size++] = node;
}

protected void addAllInternal(ListNode other) {
if (size + other.size() >= list.length) growList(other.size);

System.arraycopy(other.list, 0, list, size, other.size);
size += other.size;
}

public ListNode add(Node node) {
// Ruby Grammar productions return plenty of nulls.
if (node == null || node == NilImplicitNode.NIL) {
list.add(NilImplicitNode.NIL);
addInternal(NilImplicitNode.NIL);

return this;
}

if (node.containsVariableAssignment()) containsVariableAssignment = true;
list.add(node);
addInternal(node);

if (getPosition() == null) setPosition(node.getPosition());

return this;
}

public ListNode prepend(Node node) {
// Ruby Grammar productions return plenty of nulls.
if (node == null) return this;

if (node.containsVariableAssignment()) containsVariableAssignment = true;
list.add(0, node);

setPosition(node.getPosition());
return this;
}

public int size() {
return list.size();
return size;
}


@@ -107,7 +123,7 @@ public int size() {
public ListNode addAll(ListNode other) {
if (other != null && other.size() > 0) {
if (other.containsVariableAssignment()) containsVariableAssignment = true;
list.addAll(other.list);
addAllInternal(other);

if (getPosition() == null) setPosition(other.getPosition());
}
@@ -125,22 +141,29 @@ public ListNode addAll(Node other) {
}

public Node getLast() {
return list.size() == 0 ? null : list.get(list.size() - 1);
return size == 0 ? null : list[size - 1];
}

public boolean isEmpty() {
return list.isEmpty();
return size == 0;
}


public Node[] children() {
Node[] properList = new Node[size];
System.arraycopy(list, 0, properList, 0, size);
return properList;
}

@Deprecated
public List<Node> childNodes() {
return list;
return Arrays.asList(children());
}

public <T> T accept(NodeVisitor<T> visitor) {
return visitor.visitListNode(this);
}

public Node get(int idx) {
return list.get(idx);
return list[idx];
}
}
9 changes: 3 additions & 6 deletions core/src/main/java/org/jruby/ast/ZArrayNode.java
Original file line number Diff line number Diff line change
@@ -41,9 +41,9 @@
* zero length list
*
*/
public class ZArrayNode extends Node implements ILiteralNode {
public class ZArrayNode extends ListNode implements ILiteralNode {
public ZArrayNode(ISourcePosition position) {
super(position, false);
super(position);
}

public NodeType getNodeType() {
@@ -52,13 +52,10 @@ public NodeType getNodeType() {

/**
* Accept for the visitor pattern.
*
* @param iVisitor the visitor
**/
public <T> T accept(NodeVisitor<T> iVisitor) {
return iVisitor.visitZArrayNode(this);
}

public List<Node> childNodes() {
return EMPTY_LIST;
}
}
Original file line number Diff line number Diff line change
@@ -483,6 +483,15 @@ public IRubyObject getbyte() {
return getc();
}

@JRubyMethod(name = "readbyte")
public IRubyObject readbyte() {
IRubyObject dst = getbyte();
if (dst.isNil()) {
throw getRuntime().newEOFError();
}
return dst;
}

@JRubyMethod(name = "getc")
public IRubyObject getc_19() {
try {
Loading