dirwatch 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1248) hide show
  1. checksums.yaml +5 -5
  2. data/bin/dirwatch +1 -1
  3. data/lib/dirwatch/templates/linux/latex.yml +2 -2
  4. data/lib/dirwatch/templates/mac/latex.yml +2 -2
  5. data/lib/dirwatch/templates/windows/latex.yml +1 -1
  6. data/lib/dirwatch/version.rb +1 -1
  7. data/vendor/bundle/ruby/2.5.0/bin/cc-tddium-post-worker +27 -0
  8. data/vendor/bundle/ruby/2.5.0/bin/codeclimate-test-reporter +27 -0
  9. data/vendor/bundle/ruby/2.5.0/bin/dirwatch +27 -0
  10. data/vendor/bundle/ruby/2.5.0/bin/htmldiff +29 -0
  11. data/vendor/bundle/ruby/2.5.0/bin/ldiff +29 -0
  12. data/vendor/bundle/ruby/2.5.0/bin/rake +27 -0
  13. data/vendor/bundle/ruby/2.5.0/bin/rspec +27 -0
  14. data/vendor/bundle/ruby/2.5.0/bin/rubocop +27 -0
  15. data/vendor/bundle/ruby/2.5.0/bin/ruby-parse +27 -0
  16. data/vendor/bundle/ruby/2.5.0/bin/ruby-rewrite +27 -0
  17. data/vendor/bundle/ruby/2.5.0/cache/ast-2.3.0.gem +0 -0
  18. data/vendor/bundle/ruby/2.5.0/cache/codeclimate-test-reporter-1.0.8.gem +0 -0
  19. data/vendor/bundle/ruby/2.5.0/cache/diff-lcs-1.3.gem +0 -0
  20. data/vendor/bundle/ruby/2.5.0/cache/docile-1.1.5.gem +0 -0
  21. data/vendor/bundle/ruby/2.5.0/cache/parser-2.4.0.2.gem +0 -0
  22. data/vendor/bundle/ruby/2.5.0/cache/powerpack-0.1.1.gem +0 -0
  23. data/vendor/bundle/ruby/2.5.0/cache/rainbow-2.2.2.gem +0 -0
  24. data/vendor/bundle/ruby/2.5.0/cache/rake-12.3.0.gem +0 -0
  25. data/vendor/bundle/ruby/2.5.0/cache/rspec-3.7.0.gem +0 -0
  26. data/vendor/bundle/ruby/2.5.0/cache/rspec-core-3.7.0.gem +0 -0
  27. data/vendor/bundle/ruby/2.5.0/cache/rspec-expectations-3.7.0.gem +0 -0
  28. data/vendor/bundle/ruby/2.5.0/cache/rspec-mocks-3.7.0.gem +0 -0
  29. data/vendor/bundle/ruby/2.5.0/cache/rspec-support-3.7.0.gem +0 -0
  30. data/vendor/bundle/ruby/2.5.0/cache/rubocop-0.46.0.gem +0 -0
  31. data/vendor/bundle/ruby/2.5.0/cache/ruby-progressbar-1.9.0.gem +0 -0
  32. data/vendor/bundle/ruby/2.5.0/cache/simplecov-0.13.0.gem +0 -0
  33. data/vendor/bundle/ruby/2.5.0/cache/simplecov-html-0.10.2.gem +0 -0
  34. data/vendor/bundle/ruby/2.5.0/cache/unicode-display_width-1.3.0.gem +0 -0
  35. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/rainbow-2.2.2/gem.build_complete +0 -0
  36. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/rainbow-2.2.2/gem_make.out +5 -0
  37. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/CHANGELOG.md +9 -0
  38. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/Gemfile +4 -0
  39. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/LICENSE.MIT +20 -0
  40. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/README.YARD.md +12 -0
  41. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/README.md +23 -0
  42. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/Rakefile +19 -0
  43. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/ast.gemspec +29 -0
  44. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/lib/ast.rb +17 -0
  45. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/lib/ast/node.rb +253 -0
  46. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/lib/ast/processor.rb +12 -0
  47. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/lib/ast/processor/mixin.rb +288 -0
  48. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/lib/ast/sexp.rb +30 -0
  49. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/test/helper.rb +17 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/ast-2.3.0/test/test_ast.rb +264 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/LICENSE.txt +40 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/README.md +68 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/bin/cc-tddium-post-worker +23 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/bin/ci +15 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/bin/codeclimate-test-reporter +21 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/config/cacert.pem +3895 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter.rb +71 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/calculate_blob.rb +35 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/ci.rb +106 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/client.rb +103 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/configuration.rb +56 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/exception_message.rb +72 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/formatter.rb +104 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/git.rb +85 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/payload_validator.rb +59 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/post_results.rb +30 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/shorten_filename.rb +24 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/code_climate/test_reporter/version.rb +5 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/codeclimate-test-reporter-1.0.8/lib/codeclimate-test-reporter.rb +10 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Code-of-Conduct.md +74 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Contributing.md +83 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/History.md +220 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/License.md +39 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Manifest.txt +37 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/README.rdoc +84 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/Rakefile +57 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/autotest/discover.rb +1 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/htmldiff +32 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/bin/ldiff +6 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/COPYING.txt +339 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/docs/artistic.txt +127 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +3 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs.rb +725 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/array.rb +7 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/block.rb +37 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/callbacks.rb +322 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/change.rb +181 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/htmldiff.rb +149 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/hunk.rb +276 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/internals.rb +307 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/ldiff.rb +167 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/lib/diff/lcs/string.rb +5 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/change_spec.rb +65 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/diff_spec.rb +47 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds1.csv +50 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/fixtures/ds2.csv +51 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +72 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/issues_spec.rb +49 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/lcs_spec.rb +56 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/ldiff_spec.rb +47 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/patch_spec.rb +422 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +214 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/spec_helper.rb +321 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +310 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/diff-lcs-1.3/spec/traverse_sequences_spec.rb +139 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/Gemfile +4 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/HISTORY.md +61 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/LICENSE +21 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/README.md +241 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/Rakefile +28 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/docile.gemspec +43 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/lib/docile.rb +84 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/lib/docile/chaining_fallback_context_proxy.rb +20 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/lib/docile/execution.rb +35 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/lib/docile/fallback_context_proxy.rb +63 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/lib/docile/version.rb +4 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/on_what.rb +14 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/spec/docile_spec.rb +339 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/docile-1.1.5/spec/spec_helper.rb +30 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/CHANGELOG.md +823 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/CONTRIBUTING.md +17 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/Gemfile +8 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/LICENSE.txt +25 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/README.md +300 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/Rakefile +163 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/bin/ruby-parse +6 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/bin/ruby-rewrite +6 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/doc/AST_FORMAT.md +1678 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/doc/CUSTOMIZATION.md +37 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/doc/INTERNALS.md +21 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/doc/css/common.css +68 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/gauntlet_parser.rb +121 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser.rb +81 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/all.rb +8 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ast/node.rb +38 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ast/processor.rb +234 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/base.rb +268 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/builders/default.rb +1621 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/clobbering_error.rb +11 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/compatibility/ruby1_8.rb +20 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/compatibility/ruby1_9.rb +32 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/current.rb +90 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/diagnostic.rb +163 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/diagnostic/engine.rb +103 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/lexer.rb +21892 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/lexer.rl +2265 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/lexer/dedenter.rb +49 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/lexer/explanation.rb +53 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/lexer/literal.rb +262 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/lexer/stack_state.rb +42 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/macruby.rb +6103 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/macruby.y +2183 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/messages.rb +70 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/meta.rb +27 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/rewriter.rb +119 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby18.rb +5647 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby18.y +1927 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby19.rb +6050 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby19.y +2160 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby20.rb +6487 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby20.y +2338 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby21.rb +6552 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby21.y +2342 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby22.rb +6585 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby22.y +2349 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby23.rb +6595 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby23.y +2355 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby24.rb +6631 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby24.y +2366 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby25.rb +6617 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/ruby25.y +2362 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/rubymotion.rb +6056 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/rubymotion.y +2167 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/runner.rb +246 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/runner/ruby_parse.rb +146 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/runner/ruby_rewrite.rb +99 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/buffer.rb +333 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/comment.rb +119 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/comment/associator.rb +208 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map.rb +184 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/collection.rb +16 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/condition.rb +19 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/constant.rb +30 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/definition.rb +21 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/for.rb +17 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/heredoc.rb +17 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/keyword.rb +18 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/objc_kwarg.rb +17 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/operator.rb +15 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/rescue_body.rb +19 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/send.rb +34 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/ternary.rb +16 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/map/variable.rb +29 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/range.rb +242 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/rewriter.rb +475 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/source/rewriter/action.rb +42 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/static_environment.rb +44 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/syntax_error.rb +19 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/lib/parser/version.rb +3 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/parser.gemspec +47 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/bug_163/fixtures/input.rb +3 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/bug_163/fixtures/output.rb +3 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/bug_163/rewriter.rb +18 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/bug_163/test_runner_rewrite.rb +35 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/helper.rb +41 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/parse_helper.rb +264 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/racc_coverage_helper.rb +131 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_base.rb +29 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_current.rb +27 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_diagnostic.rb +94 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_diagnostic_engine.rb +60 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_encoding.rb +78 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_lexer.rb +3414 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_lexer_stack_state.rb +76 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_parse_helper.rb +80 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_parser.rb +6024 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_buffer.rb +144 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_comment.rb +34 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_comment_associator.rb +365 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_map.rb +13 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_range.rb +125 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_rewriter.rb +539 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_source_rewriter_action.rb +44 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/parser-2.4.0.2/test/test_static_environment.rb +43 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/CHANGELOG.md +39 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/Gemfile +4 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/LICENSE.txt +22 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/README.md +99 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/Rakefile +12 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack.rb +11 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/array.rb +2 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/array/butfirst.rb +15 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/array/butlast.rb +15 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable.rb +9 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/average.rb +20 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/drop_last.rb +20 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/drop_last_while.rb +21 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/exactly.rb +43 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/frequencies.rb +17 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/several.rb +37 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/sum.rb +21 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/take_last.rb +20 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/enumerable/take_last_while.rb +17 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/hash.rb +1 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/hash/symbolize_keys.rb +14 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/numeric.rb +3 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/numeric/neg.rb +19 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/numeric/pos.rb +19 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/numeric/scale.rb +44 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string.rb +9 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/ascii_only.rb +42 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/blank.rb +20 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/format.rb +20 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/remove.rb +17 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/remove_prefix.rb +23 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/remove_suffix.rb +23 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/squish.rb +27 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/strip_indent.rb +22 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/string/strip_margin.rb +21 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/lib/powerpack/version.rb +3 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/powerpack.gemspec +24 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/array/butfirst_spec.rb +11 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/array/butlast_spec.rb +11 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/average_spec.rb +19 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/drop_last_spec.rb +15 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/drop_last_while_spec.rb +7 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/exactly_spec.rb +39 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/frequencies_spec.rb +20 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/several_spec.rb +27 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/sum_spec.rb +15 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/take_last_spec.rb +15 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/enumerable/take_last_while_spec.rb +7 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/hash/symbolize_keys_spec.rb +15 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/numeric/neg_spec.rb +24 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/numeric/pos_spec.rb +24 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/numeric/scale_spec.rb +139 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/ascii_only_spec.rb +45 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/blank_spec.rb +15 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/format_spec.rb +12 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/remove_prefix_spec.rb +13 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/remove_spec.rb +13 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/remove_suffix_spec.rb +13 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/squish_spec.rb +21 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/strip_indent_spec.rb +13 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/powerpack/string/strip_margin_spec.rb +26 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/powerpack-0.1.1/spec/spec_helper.rb +15 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/Changelog.md +87 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/Gemfile +23 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/Guardfile +9 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/LICENSE +20 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/README.markdown +217 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/Rakefile +6 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/ext/Rakefile +1 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/ext/mkrf_conf.rb +22 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow.rb +24 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/color.rb +144 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/ext/string.rb +56 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/global.rb +21 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/legacy.rb +15 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/null_presenter.rb +41 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/presenter.rb +135 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/string_utils.rb +20 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/version.rb +3 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/wrapper.rb +22 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/lib/rainbow/x11_color_names.rb +152 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/rainbow.gemspec +26 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/integration/instance_spec.rb +35 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/integration/rainbow_spec.rb +160 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/integration/string_spec.rb +84 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/spec_helper.rb +6 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/support/presenter_shared_examples.rb +9 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/unit/color_spec.rb +301 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/unit/namespace_spec.rb +31 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/unit/null_presenter_spec.rb +111 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/unit/presenter_spec.rb +201 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/unit/string_utils_spec.rb +62 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/rainbow-2.2.2/spec/unit/wrapper_spec.rb +34 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/CONTRIBUTING.rdoc +36 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/Gemfile +3 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/History.rdoc +2299 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/MIT-LICENSE +21 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/README.rdoc +156 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/Rakefile +38 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/bin/console +7 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/bin/setup +6 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/command_line_usage.rdoc +158 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/example/Rakefile1 +38 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/example/Rakefile2 +35 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/example/a.c +6 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/example/b.c +6 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/example/main.c +11 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/glossary.rdoc +42 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/jamis.rb +592 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/proto_rake.rdoc +127 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/rake.1 +156 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/rakefile.rdoc +622 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/doc/rational.rdoc +151 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/exe/rake +27 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake.rb +71 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/application.rb +824 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/backtrace.rb +24 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/clean.rb +78 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/cloneable.rb +17 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/cpu_counter.rb +107 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/default_loader.rb +15 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/dsl_definition.rb +195 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/early_time.rb +22 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/ext/core.rb +26 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/ext/string.rb +176 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/file_creation_task.rb +25 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/file_list.rb +435 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/file_task.rb +54 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/file_utils.rb +137 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/file_utils_ext.rb +145 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/invocation_chain.rb +57 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/invocation_exception_mixin.rb +17 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/late_time.rb +18 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/linked_list.rb +112 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/loaders/makefile.rb +54 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/multi_task.rb +50 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/name_space.rb +38 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/packagetask.rb +211 -0
  363. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/phony.rb +16 -0
  364. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/private_reader.rb +21 -0
  365. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/promise.rb +100 -0
  366. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/pseudo_status.rb +30 -0
  367. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/rake_module.rb +67 -0
  368. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/rake_test_loader.rb +26 -0
  369. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  370. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/scope.rb +43 -0
  371. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/task.rb +391 -0
  372. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/task_argument_error.rb +8 -0
  373. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/task_arguments.rb +109 -0
  374. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/task_manager.rb +319 -0
  375. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/tasklib.rb +12 -0
  376. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/testtask.rb +224 -0
  377. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/thread_history_display.rb +49 -0
  378. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/thread_pool.rb +163 -0
  379. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/trace_output.rb +23 -0
  380. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/version.rb +10 -0
  381. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/lib/rake/win32.rb +51 -0
  382. data/vendor/bundle/ruby/2.5.0/gems/rake-12.3.0/rake.gemspec +43 -0
  383. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.7.0/LICENSE.md +27 -0
  384. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.7.0/README.md +39 -0
  385. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.7.0/lib/rspec.rb +3 -0
  386. data/vendor/bundle/ruby/2.5.0/gems/rspec-3.7.0/lib/rspec/version.rb +5 -0
  387. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/Changelog.md +2187 -0
  388. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/LICENSE.md +26 -0
  389. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/README.md +384 -0
  390. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/exe/rspec +4 -0
  391. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/autorun.rb +3 -0
  392. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core.rb +185 -0
  393. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/backtrace_formatter.rb +65 -0
  394. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/bisect/coordinator.rb +66 -0
  395. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/bisect/example_minimizer.rb +169 -0
  396. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/bisect/runner.rb +169 -0
  397. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/bisect/server.rb +70 -0
  398. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb +2179 -0
  399. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration_options.rb +196 -0
  400. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/drb.rb +113 -0
  401. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/dsl.rb +98 -0
  402. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb +653 -0
  403. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb +884 -0
  404. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/example_status_persister.rb +235 -0
  405. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/filter_manager.rb +231 -0
  406. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/flat_map.rb +20 -0
  407. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters.rb +265 -0
  408. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/base_formatter.rb +70 -0
  409. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/base_text_formatter.rb +75 -0
  410. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/bisect_formatter.rb +69 -0
  411. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/bisect_progress_formatter.rb +144 -0
  412. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/console_codes.rb +68 -0
  413. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/deprecation_formatter.rb +221 -0
  414. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/documentation_formatter.rb +70 -0
  415. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/exception_presenter.rb +496 -0
  416. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/fallback_message_formatter.rb +28 -0
  417. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/helpers.rb +110 -0
  418. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/html_formatter.rb +153 -0
  419. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/html_printer.rb +416 -0
  420. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/html_snippet_extractor.rb +120 -0
  421. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/json_formatter.rb +102 -0
  422. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/profile_formatter.rb +68 -0
  423. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/progress_formatter.rb +29 -0
  424. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/protocol.rb +182 -0
  425. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/snippet_extractor.rb +134 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/formatters/syntax_highlighter.rb +91 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb +626 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/invocations.rb +85 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/memoized_helpers.rb +535 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/metadata.rb +499 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/metadata_filter.rb +255 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/minitest_assertions_adapter.rb +31 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/mocking_adapters/flexmock.rb +31 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/mocking_adapters/mocha.rb +57 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/mocking_adapters/null.rb +14 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/mocking_adapters/rr.rb +31 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/mocking_adapters/rspec.rb +32 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/notifications.rb +521 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/option_parser.rb +309 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/ordering.rb +158 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/output_wrapper.rb +29 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/pending.rb +165 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/profiler.rb +32 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/project_initializer.rb +48 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/project_initializer/spec/spec_helper.rb +100 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/rake_task.rb +168 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/reporter.rb +260 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/ruby_project.rb +53 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb +193 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/sandbox.rb +37 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/set.rb +54 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/shared_context.rb +55 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/shared_example_group.rb +271 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/shell_escape.rb +49 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/test_unit_assertions_adapter.rb +30 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/version.rb +9 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/warnings.rb +40 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/rspec-core-3.7.0/lib/rspec/core/world.rb +264 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/Changelog.md +1083 -0
  460. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/LICENSE.md +25 -0
  461. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/README.md +305 -0
  462. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations.rb +82 -0
  463. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  464. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/configuration.rb +201 -0
  465. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/expectation_target.rb +127 -0
  466. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/fail_with.rb +39 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/failure_aggregator.rb +194 -0
  468. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb +170 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/minitest_integration.rb +58 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/syntax.rb +132 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/version.rb +8 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers.rb +1031 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/aliased_matcher.rb +116 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in.rb +52 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/all.rb +85 -0
  476. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  477. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/be.rb +288 -0
  478. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/be_between.rb +77 -0
  479. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/be_instance_of.rb +22 -0
  480. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/be_kind_of.rb +16 -0
  481. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/be_within.rb +72 -0
  482. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/change.rb +387 -0
  483. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/compound.rb +272 -0
  484. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/contain_exactly.rb +301 -0
  485. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/cover.rb +24 -0
  486. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/eq.rb +40 -0
  487. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/eql.rb +34 -0
  488. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/equal.rb +81 -0
  489. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/exist.rb +90 -0
  490. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/has.rb +103 -0
  491. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  492. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/include.rb +143 -0
  493. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/match.rb +106 -0
  494. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/operators.rb +128 -0
  495. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/output.rb +200 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/respond_to.rb +165 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  499. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/yield.rb +432 -0
  502. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/composable.rb +169 -0
  503. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/dsl.rb +527 -0
  504. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/english_phrasing.rb +58 -0
  505. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  506. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/fail_matchers.rb +42 -0
  507. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/generated_descriptions.rb +42 -0
  508. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/matcher_delegator.rb +35 -0
  509. data/vendor/bundle/ruby/2.5.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/matcher_protocol.rb +99 -0
  510. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/Changelog.md +1089 -0
  511. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/LICENSE.md +25 -0
  512. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/README.md +460 -0
  513. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks.rb +130 -0
  514. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance.rb +11 -0
  515. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/chain.rb +110 -0
  516. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  517. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  518. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  519. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  520. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  521. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/recorder.rb +289 -0
  522. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  523. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  524. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  525. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/argument_matchers.rb +320 -0
  526. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/configuration.rb +212 -0
  527. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/error_generator.rb +369 -0
  528. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/example_methods.rb +434 -0
  529. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  530. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/marshal_extension.rb +41 -0
  531. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  532. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/matchers/have_received.rb +130 -0
  533. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/matchers/receive.rb +132 -0
  534. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  535. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  536. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_chain.rb +87 -0
  537. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb +740 -0
  538. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb +287 -0
  539. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_reference.rb +202 -0
  540. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/minitest_integration.rb +68 -0
  541. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/mutate_const.rb +339 -0
  542. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/object_reference.rb +149 -0
  543. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/order_group.rb +81 -0
  544. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb +484 -0
  545. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/space.rb +238 -0
  546. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/standalone.rb +3 -0
  547. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/syntax.rb +325 -0
  548. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/targets.rb +124 -0
  549. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/test_double.rb +171 -0
  550. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/verifying_double.rb +129 -0
  551. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  552. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/verifying_proxy.rb +220 -0
  553. data/vendor/bundle/ruby/2.5.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/version.rb +9 -0
  554. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/Changelog.md +229 -0
  555. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/LICENSE.md +23 -0
  556. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/README.md +40 -0
  557. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support.rb +149 -0
  558. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/caller_filter.rb +83 -0
  559. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/comparable_version.rb +46 -0
  560. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/differ.rb +215 -0
  561. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/directory_maker.rb +63 -0
  562. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/encoded_string.rb +165 -0
  563. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/fuzzy_matcher.rb +48 -0
  564. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/hunk_generator.rb +47 -0
  565. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/matcher_definition.rb +42 -0
  566. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/method_signature_verifier.rb +392 -0
  567. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/mutex.rb +73 -0
  568. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/object_formatter.rb +267 -0
  569. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/recursive_const_methods.rb +76 -0
  570. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/reentrant_mutex.rb +53 -0
  571. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/ruby_features.rb +162 -0
  572. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/source.rb +75 -0
  573. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/source/location.rb +21 -0
  574. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/source/node.rb +107 -0
  575. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/source/token.rb +87 -0
  576. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec.rb +81 -0
  577. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  578. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/formatting_support.rb +9 -0
  579. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/in_sub_process.rb +69 -0
  580. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  581. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/shell_out.rb +84 -0
  582. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  583. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/string_matcher.rb +46 -0
  584. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  585. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  586. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/version.rb +7 -0
  587. data/vendor/bundle/ruby/2.5.0/gems/rspec-support-3.7.0/lib/rspec/support/warnings.rb +39 -0
  588. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/LICENSE.txt +20 -0
  589. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/README.md +128 -0
  590. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/assets/logo.png +0 -0
  591. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/assets/output.html.erb +261 -0
  592. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/bin/rubocop +17 -0
  593. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/config/default.yml +1338 -0
  594. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/config/disabled.yml +115 -0
  595. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/config/enabled.yml +1588 -0
  596. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop.rb +452 -0
  597. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/ast_node.rb +624 -0
  598. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/ast_node/builder.rb +30 -0
  599. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/ast_node/sexp.rb +13 -0
  600. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/ast_node/traversal.rb +171 -0
  601. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cached_data.rb +63 -0
  602. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cli.rb +185 -0
  603. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/comment_config.rb +157 -0
  604. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/config.rb +346 -0
  605. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/config_loader.rb +205 -0
  606. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/config_loader_resolver.rb +43 -0
  607. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/config_store.rb +48 -0
  608. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/autocorrect_logic.rb +26 -0
  609. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/bundler/duplicated_gem.rb +69 -0
  610. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/bundler/ordered_gems.rb +54 -0
  611. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/commissioner.rb +103 -0
  612. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/cop.rb +304 -0
  613. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/corrector.rb +135 -0
  614. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/force.rb +41 -0
  615. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/ignored_node.rb +38 -0
  616. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/ambiguous_operator.rb +50 -0
  617. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +36 -0
  618. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/assignment_in_condition.rb +66 -0
  619. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/block_alignment.rb +198 -0
  620. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/circular_argument_reference.rb +69 -0
  621. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/condition_position.rb +54 -0
  622. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/debugger.rb +52 -0
  623. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/def_end_alignment.rb +57 -0
  624. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/deprecated_class_methods.rb +80 -0
  625. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/duplicate_case_condition.rb +49 -0
  626. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/duplicate_methods.rb +137 -0
  627. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/duplicated_key.rb +30 -0
  628. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/each_with_object_argument.rb +28 -0
  629. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/else_layout.rb +68 -0
  630. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/empty_ensure.rb +18 -0
  631. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/empty_expression.rb +32 -0
  632. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/empty_interpolation.rb +28 -0
  633. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/empty_when.rb +40 -0
  634. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/end_alignment.rb +137 -0
  635. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/end_in_method.rb +17 -0
  636. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/ensure_return.rb +22 -0
  637. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/eval.rb +18 -0
  638. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/float_out_of_range.rb +30 -0
  639. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/format_parameter_mismatch.rb +155 -0
  640. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/handle_exceptions.rb +18 -0
  641. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/implicit_string_concatenation.rb +90 -0
  642. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/ineffective_access_modifier.rb +134 -0
  643. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/inherit_exception.rb +83 -0
  644. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/invalid_character_literal.rb +38 -0
  645. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/literal_in_condition.rb +129 -0
  646. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/literal_in_interpolation.rb +68 -0
  647. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/loop.rb +27 -0
  648. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/nested_method_definition.rb +60 -0
  649. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/next_without_accumulator.rb +45 -0
  650. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +77 -0
  651. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +53 -0
  652. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/percent_string_array.rb +70 -0
  653. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/percent_symbol_array.rb +56 -0
  654. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/rand_one.rb +35 -0
  655. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/require_parentheses.rb +66 -0
  656. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/rescue_exception.rb +25 -0
  657. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/shadowed_exception.rb +131 -0
  658. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +29 -0
  659. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +51 -0
  660. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/syntax.rb +55 -0
  661. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +38 -0
  662. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/unified_integer.rb +37 -0
  663. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/unneeded_disable.rb +207 -0
  664. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +136 -0
  665. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/unreachable_code.rb +32 -0
  666. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/unused_block_argument.rb +143 -0
  667. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/unused_method_argument.rb +51 -0
  668. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/useless_access_modifier.rb +202 -0
  669. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/useless_assignment.rb +113 -0
  670. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/useless_comparison.rb +25 -0
  671. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/useless_else_without_rescue.rb +31 -0
  672. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/useless_setter_call.rb +150 -0
  673. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/lint/void.rb +56 -0
  674. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/abc_size.rb +39 -0
  675. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/block_length.rb +26 -0
  676. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/block_nesting.rb +52 -0
  677. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/class_length.rb +24 -0
  678. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +31 -0
  679. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/line_length.rb +168 -0
  680. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/method_length.rb +27 -0
  681. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/module_length.rb +24 -0
  682. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/parameter_lists.rb +44 -0
  683. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/metrics/perceived_complexity.rb +62 -0
  684. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/access_modifier_node.rb +41 -0
  685. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/annotation_comment.rb +36 -0
  686. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/array_hash_indentation.rb +82 -0
  687. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/array_syntax.rb +24 -0
  688. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/autocorrect_alignment.rb +149 -0
  689. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/check_assignment.rb +40 -0
  690. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/classish_length.rb +36 -0
  691. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/code_length.rb +32 -0
  692. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/configurable_enforced_style.rb +91 -0
  693. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/configurable_max.rb +19 -0
  694. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/configurable_naming.rb +44 -0
  695. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/configurable_numbering.rb +58 -0
  696. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/def_node.rb +27 -0
  697. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/documentation_comment.rb +40 -0
  698. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/empty_lines_around_body.rb +161 -0
  699. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/end_keyword_alignment.rb +85 -0
  700. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/first_element_line_break.rb +41 -0
  701. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/frozen_string_literal.rb +34 -0
  702. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/hash_node.rb +14 -0
  703. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/if_node.rb +42 -0
  704. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/integer_node.rb +12 -0
  705. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/match_range.rb +22 -0
  706. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/method_complexity.rb +30 -0
  707. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/method_preference.rb +28 -0
  708. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/min_body_length.rb +19 -0
  709. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +191 -0
  710. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +152 -0
  711. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/negative_conditional.rb +29 -0
  712. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/on_method_def.rb +30 -0
  713. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/on_normal_if_unless.rb +37 -0
  714. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/parentheses.rb +22 -0
  715. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/parser_diagnostic.rb +34 -0
  716. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/percent_literal.rb +32 -0
  717. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/preceding_following_alignment.rb +89 -0
  718. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/safe_assignment.rb +20 -0
  719. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/safe_mode.rb +22 -0
  720. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/space_after_punctuation.rb +55 -0
  721. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/space_before_punctuation.rb +48 -0
  722. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/space_inside.rb +76 -0
  723. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/statement_modifier.rb +73 -0
  724. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/string_help.rb +33 -0
  725. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/string_literals_help.rb +33 -0
  726. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/surrounding_space.rb +40 -0
  727. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/too_many_lines.rb +39 -0
  728. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/trailing_comma.rb +162 -0
  729. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/mixin/unused_argument.rb +42 -0
  730. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/offense.rb +188 -0
  731. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/case_when_splat.rb +179 -0
  732. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/casecmp.rb +107 -0
  733. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/compare_with_block.rb +61 -0
  734. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/count.rb +98 -0
  735. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/detect.rb +106 -0
  736. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/double_start_end_with.rb +68 -0
  737. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/end_with.rb +54 -0
  738. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/fixed_size.rb +56 -0
  739. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/flat_map.rb +73 -0
  740. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/hash_each_methods.rb +84 -0
  741. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/lstrip_rstrip.rb +41 -0
  742. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/range_include.rb +39 -0
  743. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/redundant_block_call.rb +93 -0
  744. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/redundant_match.rb +54 -0
  745. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/redundant_merge.rb +152 -0
  746. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/redundant_sort_by.rb +45 -0
  747. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/reverse_each.rb +39 -0
  748. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/sample.rb +140 -0
  749. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/size.rb +76 -0
  750. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/start_with.rb +57 -0
  751. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/string_replacement.rb +175 -0
  752. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/performance/times_map.rb +61 -0
  753. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/action_filter.rb +96 -0
  754. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/date.rb +130 -0
  755. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/delegate.rb +106 -0
  756. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/delegate_allow_blank.rb +62 -0
  757. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/dynamic_find_by.rb +77 -0
  758. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/enum_uniqueness.rb +71 -0
  759. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/exit.rb +61 -0
  760. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/find_by.rb +53 -0
  761. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/find_each.rb +59 -0
  762. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/has_and_belongs_to_many.rb +17 -0
  763. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/http_positional_arguments.rb +92 -0
  764. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/not_null_column.rb +44 -0
  765. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/output.rb +25 -0
  766. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/output_safety.rb +58 -0
  767. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/pluralization_grammar.rb +105 -0
  768. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/read_write_attribute.rb +74 -0
  769. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/request_referer.rb +38 -0
  770. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/safe_navigation.rb +88 -0
  771. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/save_bang.rb +155 -0
  772. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/scope_args.rb +29 -0
  773. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/time_zone.rb +195 -0
  774. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/uniq_before_pluck.rb +90 -0
  775. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/rails/validation.rb +67 -0
  776. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/security/json_load.rb +44 -0
  777. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/severity.rb +76 -0
  778. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/access_modifier_indentation.rb +80 -0
  779. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/accessor_method_name.rb +45 -0
  780. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/alias.rb +119 -0
  781. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/align_array.rb +20 -0
  782. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/align_hash.rb +266 -0
  783. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/align_parameters.rb +69 -0
  784. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/and_or.rb +140 -0
  785. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/array_join.rb +30 -0
  786. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/ascii_comments.rb +38 -0
  787. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/ascii_identifiers.rb +36 -0
  788. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/attr.rb +44 -0
  789. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/auto_resource_cleanup.rb +45 -0
  790. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/bare_percent_literals.rb +57 -0
  791. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/begin_block.rb +16 -0
  792. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/block_comments.rb +46 -0
  793. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/block_delimiters.rb +230 -0
  794. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/block_end_newline.rb +56 -0
  795. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/braces_around_hash_parameters.rb +113 -0
  796. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/case_equality.rb +18 -0
  797. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/case_indentation.rb +89 -0
  798. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/character_literal.rb +43 -0
  799. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/class_and_module_camel_case.rb +29 -0
  800. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/class_and_module_children.rb +69 -0
  801. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/class_check.rb +42 -0
  802. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/class_methods.rb +67 -0
  803. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/class_vars.rb +23 -0
  804. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/closing_parenthesis_indentation.rb +87 -0
  805. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/collection_methods.rb +51 -0
  806. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/colon_method_call.rb +40 -0
  807. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/command_literal.rb +119 -0
  808. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/comment_annotation.rb +62 -0
  809. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/comment_indentation.rb +71 -0
  810. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/conditional_assignment.rb +681 -0
  811. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/constant_name.rb +29 -0
  812. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/copyright.rb +89 -0
  813. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/def_with_parentheses.rb +31 -0
  814. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/documentation.rb +79 -0
  815. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/documentation_method.rb +79 -0
  816. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/dot_position.rb +88 -0
  817. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/double_negation.rb +34 -0
  818. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/each_for_simple_loop.rb +57 -0
  819. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/each_with_object.rb +88 -0
  820. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/else_alignment.rb +111 -0
  821. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_case_condition.rb +93 -0
  822. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_else.rb +140 -0
  823. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_line_between_defs.rb +73 -0
  824. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_lines.rb +60 -0
  825. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_lines_around_access_modifier.rb +95 -0
  826. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_lines_around_block_body.rb +41 -0
  827. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_lines_around_class_body.rb +39 -0
  828. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_lines_around_method_body.rb +41 -0
  829. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_lines_around_module_body.rb +44 -0
  830. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_literal.rb +100 -0
  831. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/empty_method.rb +96 -0
  832. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/encoding.rb +92 -0
  833. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/end_block.rb +17 -0
  834. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/end_of_line.rb +30 -0
  835. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/even_odd.rb +56 -0
  836. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/extra_spacing.rb +237 -0
  837. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/file_name.rb +163 -0
  838. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/first_array_element_line_break.rb +41 -0
  839. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/first_hash_element_line_break.rb +33 -0
  840. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/first_method_argument_line_break.rb +49 -0
  841. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/first_method_parameter_line_break.rb +42 -0
  842. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/first_parameter_indentation.rb +111 -0
  843. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/flip_flop.rb +20 -0
  844. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/for.rb +52 -0
  845. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/format_string.rb +76 -0
  846. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/frozen_string_literal_comment.rb +67 -0
  847. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/global_vars.rb +70 -0
  848. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/guard_clause.rb +96 -0
  849. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/hash_syntax.rb +232 -0
  850. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/identical_conditional_branches.rb +92 -0
  851. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/if_inside_else.rb +48 -0
  852. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/if_unless_modifier.rb +89 -0
  853. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +44 -0
  854. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/if_with_semicolon.rb +20 -0
  855. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/implicit_runtime_error.rb +31 -0
  856. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/indent_array.rb +114 -0
  857. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/indent_assignment.rb +42 -0
  858. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/indent_hash.rb +133 -0
  859. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/indentation_consistency.rb +51 -0
  860. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/indentation_width.rb +302 -0
  861. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/infinite_loop.rb +92 -0
  862. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/initial_indentation.rb +42 -0
  863. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/inline_comment.rb +32 -0
  864. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/lambda.rb +209 -0
  865. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/lambda_call.rb +62 -0
  866. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/leading_comment_space.rb +43 -0
  867. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/line_end_concatenation.rb +115 -0
  868. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/method_call_parentheses.rb +78 -0
  869. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/method_called_on_do_end_block.rb +41 -0
  870. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/method_def_parentheses.rb +83 -0
  871. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/method_missing.rb +81 -0
  872. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/method_name.rb +28 -0
  873. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/missing_else.rb +73 -0
  874. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/module_function.rb +64 -0
  875. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_array_brace_layout.rb +81 -0
  876. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_assignment_layout.rb +88 -0
  877. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_block_chain.rb +42 -0
  878. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_block_layout.rb +134 -0
  879. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_hash_brace_layout.rb +81 -0
  880. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_if_modifier.rb +73 -0
  881. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_if_then.rb +41 -0
  882. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_memoization.rb +44 -0
  883. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_method_call_brace_layout.rb +98 -0
  884. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_method_call_indentation.rb +196 -0
  885. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_method_definition_brace_layout.rb +82 -0
  886. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_operation_indentation.rb +88 -0
  887. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/multiline_ternary_operator.rb +23 -0
  888. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/mutable_constant.rb +63 -0
  889. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/negated_if.rb +47 -0
  890. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/negated_while.rb +47 -0
  891. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/nested_modifier.rb +114 -0
  892. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/nested_parenthesized_calls.rb +59 -0
  893. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/nested_ternary_operator.rb +23 -0
  894. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/next.rb +223 -0
  895. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/nil_comparison.rb +35 -0
  896. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/non_nil_check.rb +125 -0
  897. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/not.rb +72 -0
  898. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/numeric_literal_prefix.rb +97 -0
  899. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/numeric_literals.rb +79 -0
  900. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/numeric_predicate.rb +140 -0
  901. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/one_line_conditional.rb +85 -0
  902. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/op_method.rb +41 -0
  903. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/option_hash.rb +69 -0
  904. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/optional_arguments.rb +62 -0
  905. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/parallel_assignment.rb +295 -0
  906. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/parentheses_around_condition.rb +60 -0
  907. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/percent_literal_delimiters.rb +85 -0
  908. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/percent_q_literals.rb +49 -0
  909. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/perl_backrefs.rb +31 -0
  910. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/predicate_name.rb +67 -0
  911. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/preferred_hash_methods.rb +78 -0
  912. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/proc.rb +26 -0
  913. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/raise_args.rb +136 -0
  914. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/redundant_begin.rb +47 -0
  915. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/redundant_exception.rb +55 -0
  916. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/redundant_freeze.rb +46 -0
  917. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/redundant_parentheses.rb +177 -0
  918. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/redundant_return.rb +125 -0
  919. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/redundant_self.rb +163 -0
  920. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/regexp_literal.rb +114 -0
  921. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/rescue_ensure_alignment.rb +86 -0
  922. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/rescue_modifier.rb +49 -0
  923. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/safe_navigation.rb +138 -0
  924. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/self_assignment.rb +93 -0
  925. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/semicolon.rb +70 -0
  926. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/send.rb +22 -0
  927. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/signal_exception.rb +109 -0
  928. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/single_line_block_params.rb +68 -0
  929. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/single_line_methods.rb +77 -0
  930. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_after_colon.rb +42 -0
  931. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_after_comma.rb +21 -0
  932. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_after_method_name.rb +37 -0
  933. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_after_not.rb +39 -0
  934. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_after_semicolon.rb +21 -0
  935. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_around_block_parameters.rb +109 -0
  936. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_around_equals_in_parameter_default.rb +68 -0
  937. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_around_keyword.rb +225 -0
  938. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_around_operators.rb +136 -0
  939. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_before_block_braces.rb +54 -0
  940. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_before_comma.rb +16 -0
  941. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_before_comment.rb +27 -0
  942. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_before_first_arg.rb +59 -0
  943. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_before_semicolon.rb +16 -0
  944. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_in_lambda_literal.rb +87 -0
  945. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_array_percent_literal.rb +53 -0
  946. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_block_braces.rb +158 -0
  947. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_brackets.rb +20 -0
  948. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_hash_literal_braces.rb +150 -0
  949. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_parens.rb +16 -0
  950. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_percent_literal_delimiters.rb +64 -0
  951. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_range_literal.rb +63 -0
  952. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/space_inside_string_interpolation.rb +65 -0
  953. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/special_global_vars.rb +156 -0
  954. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +112 -0
  955. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/string_literals.rb +102 -0
  956. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/string_literals_in_interpolation.rb +30 -0
  957. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/string_methods.rb +31 -0
  958. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/struct_inheritance.rb +43 -0
  959. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/symbol_array.rb +106 -0
  960. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/symbol_literal.rb +32 -0
  961. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/symbol_proc.rb +143 -0
  962. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/tab.rb +57 -0
  963. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/ternary_parentheses.rb +172 -0
  964. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/trailing_blank_lines.rb +78 -0
  965. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +70 -0
  966. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/trailing_comma_in_literal.rb +56 -0
  967. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/trailing_underscore_variable.rb +110 -0
  968. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/trailing_whitespace.rb +28 -0
  969. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/trivial_accessors.rb +176 -0
  970. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/unless_else.rb +43 -0
  971. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/unneeded_capital_w.rb +42 -0
  972. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/unneeded_interpolation.rb +98 -0
  973. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/unneeded_percent_q.rb +96 -0
  974. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/variable_interpolation.rb +44 -0
  975. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/variable_name.rb +39 -0
  976. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/variable_number.rb +78 -0
  977. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/when_then.rb +22 -0
  978. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/while_until_do.rb +40 -0
  979. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/while_until_modifier.rb +40 -0
  980. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/word_array.rb +160 -0
  981. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/style/zero_length_predicate.rb +83 -0
  982. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/team.rb +189 -0
  983. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/util.rb +276 -0
  984. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force.rb +458 -0
  985. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force/assignment.rb +97 -0
  986. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force/locatable.rb +200 -0
  987. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force/reference.rb +51 -0
  988. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force/scope.rb +91 -0
  989. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force/variable.rb +102 -0
  990. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/cop/variable_force/variable_table.rb +128 -0
  991. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/error.rb +11 -0
  992. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/base_formatter.rb +123 -0
  993. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/clang_style_formatter.rb +54 -0
  994. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/colorizable.rb +41 -0
  995. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/disabled_config_formatter.rb +180 -0
  996. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/disabled_lines_formatter.rb +57 -0
  997. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/emacs_style_formatter.rb +24 -0
  998. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/file_list_formatter.rb +19 -0
  999. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/formatter_set.rb +102 -0
  1000. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/fuubar_style_formatter.rb +80 -0
  1001. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/html_formatter.rb +133 -0
  1002. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/json_formatter.rb +74 -0
  1003. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/offense_count_formatter.rb +55 -0
  1004. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/progress_formatter.rb +63 -0
  1005. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/simple_text_formatter.rb +134 -0
  1006. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/text_util.rb +20 -0
  1007. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/formatter/worst_offenders_formatter.rb +60 -0
  1008. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/name_similarity.rb +21 -0
  1009. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/node_pattern.rb +542 -0
  1010. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/options.rb +320 -0
  1011. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/path_util.rb +31 -0
  1012. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/processed_source.rb +151 -0
  1013. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/rake_task.rb +86 -0
  1014. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/remote_config.rb +66 -0
  1015. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/result_cache.rb +176 -0
  1016. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/rspec/cop_helper.rb +87 -0
  1017. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/rspec/host_environment_simulation_helper.rb +32 -0
  1018. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/rspec/shared_contexts.rb +78 -0
  1019. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/rspec/shared_examples.rb +100 -0
  1020. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/rspec/support.rb +8 -0
  1021. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/runner.rb +323 -0
  1022. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/string_interpreter.rb +57 -0
  1023. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/string_util.rb +156 -0
  1024. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/target_finder.rb +139 -0
  1025. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/token.rb +25 -0
  1026. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/version.rb +21 -0
  1027. data/vendor/bundle/ruby/2.5.0/gems/rubocop-0.46.0/lib/rubocop/warning.rb +11 -0
  1028. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/LICENSE.txt +19 -0
  1029. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/README.md +38 -0
  1030. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/Rakefile +2 -0
  1031. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar.rb +18 -0
  1032. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/base.rb +183 -0
  1033. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/calculators/length.rb +99 -0
  1034. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/calculators/running_average.rb +9 -0
  1035. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components.rb +5 -0
  1036. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/bar.rb +96 -0
  1037. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/percentage.rb +29 -0
  1038. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/rate.rb +43 -0
  1039. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/time.rb +107 -0
  1040. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/title.rb +13 -0
  1041. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/errors/invalid_progress_error.rb +4 -0
  1042. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format.rb +3 -0
  1043. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format/formatter.rb +27 -0
  1044. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format/molecule.rb +59 -0
  1045. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format/string.rb +36 -0
  1046. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/output.rb +68 -0
  1047. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/non_tty.rb +47 -0
  1048. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/null.rb +33 -0
  1049. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb +32 -0
  1050. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/progress.rb +118 -0
  1051. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/refinements.rb +1 -0
  1052. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/refinements/enumerator.rb +25 -0
  1053. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/throttle.rb +25 -0
  1054. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/time.rb +30 -0
  1055. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/timer.rb +72 -0
  1056. data/vendor/bundle/ruby/2.5.0/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/version.rb +3 -0
  1057. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/CHANGELOG.md +411 -0
  1058. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/CONTRIBUTING.md +48 -0
  1059. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/Gemfile +38 -0
  1060. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/MIT-LICENSE +20 -0
  1061. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/README.md +633 -0
  1062. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/Rakefile +41 -0
  1063. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/cucumber.yml +13 -0
  1064. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/doc/alternate-formatters.md +36 -0
  1065. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/doc/commercial-services.md +20 -0
  1066. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/doc/editor-integration.md +13 -0
  1067. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_autoload.feature +46 -0
  1068. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_command_name.feature +45 -0
  1069. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_coverage_dir.feature +33 -0
  1070. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_deactivate_merging.feature +42 -0
  1071. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_formatters.feature +77 -0
  1072. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_merge_timeout.feature +39 -0
  1073. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_nocov_token.feature +79 -0
  1074. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_profiles.feature +44 -0
  1075. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_project_name.feature +27 -0
  1076. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_styles.feature +121 -0
  1077. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/config_tracked_files.feature +29 -0
  1078. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/cucumber_basic.feature +29 -0
  1079. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/maximum_coverage_drop.feature +36 -0
  1080. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/merging_test_unit_and_rspec.feature +44 -0
  1081. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/minimum_coverage.feature +59 -0
  1082. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/refuse_coverage_drop.feature +35 -0
  1083. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/rspec_basic.feature +32 -0
  1084. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/rspec_fails_on_initialization.feature +14 -0
  1085. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/rspec_groups_and_filters_basic.feature +29 -0
  1086. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/rspec_groups_and_filters_complex.feature +37 -0
  1087. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/rspec_groups_using_filter_class.feature +41 -0
  1088. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/rspec_without_simplecov.feature +20 -0
  1089. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/skipping_code_blocks_manually.feature +70 -0
  1090. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/step_definitions/html_steps.rb +44 -0
  1091. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/step_definitions/simplecov_steps.rb +68 -0
  1092. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/step_definitions/transformers.rb +13 -0
  1093. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/step_definitions/web_steps.rb +64 -0
  1094. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/support/env.rb +50 -0
  1095. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/test_unit_basic.feature +34 -0
  1096. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/test_unit_groups_and_filters_basic.feature +29 -0
  1097. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/test_unit_groups_and_filters_complex.feature +35 -0
  1098. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/test_unit_groups_using_filter_class.feature +40 -0
  1099. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/test_unit_without_simplecov.feature +20 -0
  1100. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/features/unicode_compatiblity.feature +67 -0
  1101. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov.rb +184 -0
  1102. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/command_guesser.rb +59 -0
  1103. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/configuration.rb +296 -0
  1104. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/defaults.rb +122 -0
  1105. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/exit_codes.rb +8 -0
  1106. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/file_list.rb +59 -0
  1107. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/filter.rb +54 -0
  1108. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/formatter.rb +8 -0
  1109. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/formatter/multi_formatter.rb +32 -0
  1110. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/formatter/simple_formatter.rb +23 -0
  1111. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/jruby_fix.rb +42 -0
  1112. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/last_run.rb +22 -0
  1113. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/merge_helpers.rb +37 -0
  1114. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/no_defaults.rb +2 -0
  1115. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/profiles.rb +31 -0
  1116. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/railtie.rb +7 -0
  1117. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/railties/tasks.rake +11 -0
  1118. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/result.rb +87 -0
  1119. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/result_merger.rb +88 -0
  1120. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/source_file.rb +194 -0
  1121. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/lib/simplecov/version.rb +25 -0
  1122. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/simplecov.gemspec +27 -0
  1123. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/1_8_fallbacks_spec.rb +31 -0
  1124. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/command_guesser_spec.rb +48 -0
  1125. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/deleted_source_spec.rb +12 -0
  1126. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/Gemfile +6 -0
  1127. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/Rakefile +8 -0
  1128. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/cucumber.yml +13 -0
  1129. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/features/step_definitions/my_steps.rb +22 -0
  1130. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/features/support/env.rb +12 -0
  1131. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/features/test_stuff.feature +6 -0
  1132. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/lib/faked_project.rb +11 -0
  1133. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/lib/faked_project/framework_specific.rb +18 -0
  1134. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/lib/faked_project/meta_magic.rb +24 -0
  1135. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/lib/faked_project/some_class.rb +28 -0
  1136. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/lib/faked_project/untested_class.rb +11 -0
  1137. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/spec/faked_spec.rb +11 -0
  1138. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/spec/forking_spec.rb +8 -0
  1139. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/spec/meta_magic_spec.rb +15 -0
  1140. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/spec/some_class_spec.rb +13 -0
  1141. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/spec/spec_helper.rb +11 -0
  1142. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/test/faked_test.rb +11 -0
  1143. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/test/meta_magic_test.rb +13 -0
  1144. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/test/some_class_test.rb +15 -0
  1145. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/faked_project/test/test_helper.rb +12 -0
  1146. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/file_list_spec.rb +50 -0
  1147. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/filters_spec.rb +98 -0
  1148. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/app/controllers/sample_controller.rb +10 -0
  1149. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/app/models/user.rb +10 -0
  1150. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/deleted_source_sample.rb +15 -0
  1151. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/frameworks/rspec_bad.rb +9 -0
  1152. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/frameworks/rspec_good.rb +9 -0
  1153. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/frameworks/testunit_bad.rb +9 -0
  1154. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/frameworks/testunit_good.rb +9 -0
  1155. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/iso-8859.rb +3 -0
  1156. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/resultset1.rb +4 -0
  1157. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/resultset2.rb +4 -0
  1158. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/sample.rb +16 -0
  1159. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/fixtures/utf-8.rb +3 -0
  1160. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/helper.rb +24 -0
  1161. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/merge_helpers_spec.rb +126 -0
  1162. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/multi_formatter_spec.rb +20 -0
  1163. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/result_spec.rb +209 -0
  1164. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/return_codes_spec.rb +34 -0
  1165. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/source_file_line_spec.rb +155 -0
  1166. data/vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/source_file_spec.rb +77 -0
  1167. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/CHANGELOG.md +13 -0
  1168. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/Gemfile +34 -0
  1169. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/Guardfile +12 -0
  1170. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/LICENSE +20 -0
  1171. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/README.md +30 -0
  1172. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/Rakefile +41 -0
  1173. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/application.js +127 -0
  1174. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/libraries/jquery-1.6.2.min.js +18 -0
  1175. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/plugins/highlight.pack.js +1 -0
  1176. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.colorbox.js +1090 -0
  1177. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.dataTables.min.js +152 -0
  1178. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.timeago.js +141 -0
  1179. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/javascripts/plugins/jquery.url.js +174 -0
  1180. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/stylesheets/application.css +3 -0
  1181. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/stylesheets/plugins/highlight.css +129 -0
  1182. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/stylesheets/plugins/jquery-ui-1.8.4.custom.css +295 -0
  1183. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/stylesheets/plugins/jquery.colorbox.css +52 -0
  1184. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/stylesheets/reset.css +103 -0
  1185. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/assets/stylesheets/screen.css.sass +220 -0
  1186. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/lib/simplecov-html.rb +110 -0
  1187. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/lib/simplecov-html/version.rb +7 -0
  1188. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/application.css +799 -0
  1189. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/application.js +1707 -0
  1190. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/colorbox/border.png +0 -0
  1191. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/colorbox/controls.png +0 -0
  1192. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/colorbox/loading.gif +0 -0
  1193. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/colorbox/loading_background.png +0 -0
  1194. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/favicon_green.png +0 -0
  1195. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/favicon_red.png +0 -0
  1196. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/favicon_yellow.png +0 -0
  1197. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/loading.gif +0 -0
  1198. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/magnify.png +0 -0
  1199. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  1200. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  1201. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  1202. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  1203. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  1204. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  1205. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  1206. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  1207. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_222222_256x240.png +0 -0
  1208. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  1209. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_454545_256x240.png +0 -0
  1210. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_888888_256x240.png +0 -0
  1211. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/public/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  1212. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/simplecov-html.gemspec +22 -0
  1213. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/test/helper.rb +4 -0
  1214. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/test/test_simple_cov-html.rb +8 -0
  1215. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/views/file_list.erb +45 -0
  1216. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/views/layout.erb +41 -0
  1217. data/vendor/bundle/ruby/2.5.0/gems/simplecov-html-0.10.2/views/source_file.erb +23 -0
  1218. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/CHANGELOG.md +96 -0
  1219. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/MIT-LICENSE.txt +22 -0
  1220. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/README.md +120 -0
  1221. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/Rakefile +64 -0
  1222. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/data/display_width.marshal.gz +0 -0
  1223. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/lib/unicode/display_width.rb +51 -0
  1224. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/lib/unicode/display_width/constants.rb +8 -0
  1225. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/lib/unicode/display_width/index.rb +7 -0
  1226. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/lib/unicode/display_width/no_string_ext.rb +7 -0
  1227. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/lib/unicode/display_width/string_ext.rb +17 -0
  1228. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/spec/display_width_spec.rb +156 -0
  1229. data/vendor/bundle/ruby/2.5.0/gems/unicode-display_width-1.3.0/unicode-display_width.gemspec +18 -0
  1230. data/vendor/bundle/ruby/2.5.0/specifications/ast-2.3.0.gemspec +59 -0
  1231. data/vendor/bundle/ruby/2.5.0/specifications/codeclimate-test-reporter-1.0.8.gemspec +50 -0
  1232. data/vendor/bundle/ruby/2.5.0/specifications/diff-lcs-1.3.gemspec +61 -0
  1233. data/vendor/bundle/ruby/2.5.0/specifications/docile-1.1.5.gemspec +48 -0
  1234. data/vendor/bundle/ruby/2.5.0/specifications/parser-2.4.0.2.gemspec +61 -0
  1235. data/vendor/bundle/ruby/2.5.0/specifications/powerpack-0.1.1.gemspec +41 -0
  1236. data/vendor/bundle/ruby/2.5.0/specifications/rainbow-2.2.2.gemspec +39 -0
  1237. data/vendor/bundle/ruby/2.5.0/specifications/rake-12.3.0.gemspec +49 -0
  1238. data/vendor/bundle/ruby/2.5.0/specifications/rspec-3.7.0.gemspec +42 -0
  1239. data/vendor/bundle/ruby/2.5.0/specifications/rspec-core-3.7.0.gemspec +62 -0
  1240. data/vendor/bundle/ruby/2.5.0/specifications/rspec-expectations-3.7.0.gemspec +50 -0
  1241. data/vendor/bundle/ruby/2.5.0/specifications/rspec-mocks-3.7.0.gemspec +50 -0
  1242. data/vendor/bundle/ruby/2.5.0/specifications/rspec-support-3.7.0.gemspec +41 -0
  1243. data/vendor/bundle/ruby/2.5.0/specifications/rubocop-0.46.0.gemspec +51 -0
  1244. data/vendor/bundle/ruby/2.5.0/specifications/ruby-progressbar-1.9.0.gemspec +46 -0
  1245. data/vendor/bundle/ruby/2.5.0/specifications/simplecov-0.13.0.gemspec +42 -0
  1246. data/vendor/bundle/ruby/2.5.0/specifications/simplecov-html-0.10.2.gemspec +33 -0
  1247. data/vendor/bundle/ruby/2.5.0/specifications/unicode-display_width-1.3.0.gemspec +38 -0
  1248. metadata +1244 -3
@@ -0,0 +1,131 @@
1
+ require 'racc/grammarfileparser'
2
+
3
+ # Unfortunately, Ruby's Coverage module ignores module_eval statements,
4
+ # which Racc uses to map `parser.y` locations in the generated
5
+ # `parser.rb`.
6
+ module RaccCoverage
7
+ @coverage = {}
8
+ @base_path = nil
9
+ @trace = nil
10
+
11
+ def self.start(parsers, base_path)
12
+ @base_path = base_path
13
+
14
+ parsers.each do |parser|
15
+ @coverage[parser] = extract_interesting_lines(parser, base_path)
16
+ end
17
+
18
+ @trace = TracePoint.new(:line) do |trace|
19
+ lineno = trace.lineno - 1
20
+
21
+ if (line_coverage = @coverage[trace.path])
22
+ if line_coverage[lineno]
23
+ line_coverage[lineno] += 1
24
+ end
25
+ end
26
+ end
27
+ @trace.enable
28
+ end
29
+
30
+ def self.stop
31
+ @trace.disable
32
+ end
33
+
34
+ # Ruby's TracePoint#lineno will point only on "interesting" lines,
35
+ # i.e.: only code (no comments or empty lines), no `end` keywords,
36
+ # and for multi-line statements, only the first line of the statement.
37
+ #
38
+ # This method implements a very dumb Ruby parser, which skips empty lines
39
+ # or lines with just comments, `end` keywords, and correctly handles
40
+ # multi-line statements of the following form:
41
+ #
42
+ # * All lines of the statement except the last must end with `,`, `.` or `(`.
43
+ #
44
+ # Coverage can be disabled for code regions with annotations :nocov: and :cov:.
45
+ #
46
+ # Also, for best results, all actions should be delimited by at least
47
+ # one non-action line.
48
+ #
49
+ def self.extract_interesting_lines(parser, base_path)
50
+ grammar_source = File.join(@base_path, parser)
51
+ grammar_file = Racc::GrammarFileParser.parse_file(grammar_source)
52
+
53
+ ruby_sources = [
54
+ # Header and footer aren't passed through module_eval
55
+ # in Racc-generated file, so the location info is lost.
56
+ *grammar_file.params.inner,
57
+ ].compact
58
+
59
+ grammar_file.grammar.each_rule do |rule|
60
+ source = rule.action.source
61
+ next if source.nil?
62
+
63
+ ruby_sources << source
64
+ end
65
+
66
+ lines = []
67
+
68
+ ruby_sources.each do |source|
69
+ first_line = source.lineno
70
+
71
+ state = :first_line
72
+
73
+ source.text.each_line.with_index do |line, index|
74
+ line = line.strip
75
+
76
+ continues = line.end_with?(',') ||
77
+ line.end_with?('(') ||
78
+ line.end_with?('.')
79
+
80
+ case state
81
+ when :first_line
82
+ if line =~ /:nocov/
83
+ state = :nocov
84
+ next
85
+ elsif line.empty? ||
86
+ line == 'end' ||
87
+ line.start_with?('#')
88
+ next
89
+ elsif continues
90
+ state = :mid_line
91
+ end
92
+
93
+ lines[first_line + index - 1] = 0
94
+
95
+ when :mid_line
96
+ unless continues
97
+ state = :first_line
98
+ end
99
+
100
+ when :nocov
101
+ if line =~ /:cov:/
102
+ state = :first_line
103
+ end
104
+ end
105
+ end
106
+ end
107
+
108
+ lines
109
+ end
110
+
111
+ def self.result
112
+ result =
113
+ @coverage.map do |parser, coverage|
114
+ [File.join(@base_path, parser), coverage]
115
+ end
116
+
117
+ Hash[result]
118
+ end
119
+ end
120
+
121
+ class << SimpleCov
122
+ def result_with_racc_coverage
123
+ @result ||= SimpleCov::Result.new(
124
+ Coverage.result.merge(RaccCoverage.result))
125
+
126
+ result_without_racc_coverage
127
+ end
128
+
129
+ alias result_without_racc_coverage result
130
+ alias result result_with_racc_coverage
131
+ end
@@ -0,0 +1,29 @@
1
+ require 'helper'
2
+ require 'parser/current'
3
+
4
+ class TestBase < Minitest::Test
5
+ include AST::Sexp
6
+
7
+ def test_parse
8
+ ast = Parser::CurrentRuby.parse('1')
9
+ assert_equal s(:int, 1), ast
10
+ end
11
+
12
+ def test_parse_with_comments
13
+ ast, comments = Parser::CurrentRuby.parse_with_comments('1 # foo')
14
+ assert_equal s(:int, 1), ast
15
+ assert_equal 1, comments.size
16
+ assert_equal '# foo', comments.first.text
17
+ end
18
+
19
+ def test_loc_to_node
20
+ ast = Parser::CurrentRuby.parse('1')
21
+ assert_equal ast.loc.node, ast
22
+ end
23
+
24
+ def test_loc_dup
25
+ ast = Parser::CurrentRuby.parse('1')
26
+ assert_nil ast.loc.dup.node
27
+ Parser::AST::Node.new(:root, [], :location => ast.loc)
28
+ end
29
+ end
@@ -0,0 +1,27 @@
1
+ require 'helper'
2
+ require 'parser/current'
3
+
4
+ class TestCurrent < Minitest::Test
5
+ def test_current
6
+ case RUBY_VERSION
7
+ when '1.8.7'
8
+ assert_equal Parser::Ruby18, Parser::CurrentRuby
9
+ when '1.9.2', '1.9.3'
10
+ assert_equal Parser::Ruby19, Parser::CurrentRuby
11
+ when '2.0.0'
12
+ assert_equal Parser::Ruby20, Parser::CurrentRuby
13
+ when /^2\.1\.\d+/
14
+ assert_equal Parser::Ruby21, Parser::CurrentRuby
15
+ when /^2\.2\.\d+/
16
+ assert_equal Parser::Ruby22, Parser::CurrentRuby
17
+ when /^2\.3\.\d+/
18
+ assert_equal Parser::Ruby23, Parser::CurrentRuby
19
+ when /^2\.4\.\d+/
20
+ assert_equal Parser::Ruby24, Parser::CurrentRuby
21
+ when /^2\.5\.\d+/
22
+ assert_equal Parser::Ruby25, Parser::CurrentRuby
23
+ else
24
+ flunk "Update test_current for #{RUBY_VERSION}"
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,94 @@
1
+ require 'helper'
2
+
3
+ class TestDiagnostic < Minitest::Test
4
+ def setup
5
+ @buffer = Parser::Source::Buffer.new('(string)')
6
+ @buffer.source = 'if (this is some bad code + bugs)'
7
+
8
+ @range1 = Parser::Source::Range.new(@buffer, 0, 2) # if
9
+ @range2 = Parser::Source::Range.new(@buffer, 4, 8) # this
10
+ end
11
+
12
+ def test_verifies_levels
13
+ error = assert_raises ArgumentError do
14
+ Parser::Diagnostic.new(:foobar, :escape_eof, {}, @range1)
15
+ end
16
+
17
+ assert_match /level/, error.message
18
+ end
19
+
20
+ def test_freezes
21
+ string = 'foo'
22
+ highlights = [@range2]
23
+
24
+ diag = Parser::Diagnostic.new(:error, :escape_eof, @range1, highlights)
25
+ assert diag.frozen?
26
+ assert diag.arguments.frozen?
27
+ assert diag.highlights.frozen?
28
+
29
+ refute string.frozen?
30
+ refute highlights.frozen?
31
+ end
32
+
33
+ def test_render
34
+ location = Parser::Source::Range.new(@buffer, 26, 27)
35
+
36
+ highlights = [
37
+ Parser::Source::Range.new(@buffer, 21, 25),
38
+ Parser::Source::Range.new(@buffer, 28, 32)
39
+ ]
40
+
41
+ diag = Parser::Diagnostic.new(:error, :unexpected, { :character => '+' },
42
+ location, highlights)
43
+ assert_equal([
44
+ "(string):1:27: error: unexpected `+'",
45
+ '(string):1: if (this is some bad code + bugs)',
46
+ '(string):1: ~~~~ ^ ~~~~ '
47
+ ], diag.render)
48
+ end
49
+
50
+ def test_multiline_render
51
+ @buffer = Parser::Source::Buffer.new('(string)')
52
+ @buffer.source = "abc abc abc\ndef def def\nghi ghi ghi\n"
53
+
54
+ location = Parser::Source::Range.new(@buffer, 4, 27)
55
+
56
+ highlights = [
57
+ Parser::Source::Range.new(@buffer, 0, 3),
58
+ Parser::Source::Range.new(@buffer, 28, 31)
59
+ ]
60
+
61
+ diag = Parser::Diagnostic.new(:error, :unexpected_token, { :token => 'ghi' },
62
+ location, highlights)
63
+
64
+ assert_equal([
65
+ "(string):1:5-3:3: error: unexpected token ghi",
66
+ '(string):1: abc abc abc',
67
+ '(string):1: ~~~ ^~~~~~~...',
68
+ '(string):3: ghi ghi ghi',
69
+ '(string):3: ~~~ ~~~ '
70
+ ], diag.render)
71
+ end
72
+
73
+ def test_bug_error_on_newline
74
+ # regression test; see GitHub issue 273
75
+ source = <<-CODE
76
+ {
77
+ foo: ->() # I forgot my brace
78
+ }
79
+ }
80
+ CODE
81
+ @buffer = Parser::Source::Buffer.new('(string)')
82
+ @buffer.source = source
83
+
84
+ location = Parser::Source::Range.new(@buffer, 33, 34)
85
+ diag = Parser::Diagnostic.new(:error, :unexpected_token, { :token => 'tNL' },
86
+ location)
87
+
88
+ assert_equal([
89
+ '(string):2:32: error: unexpected token tNL',
90
+ '(string):2: foo: ->() # I forgot my brace',
91
+ '(string):2: ^'
92
+ ], diag.render)
93
+ end
94
+ end
@@ -0,0 +1,60 @@
1
+ require 'helper'
2
+
3
+ class TestDiagnosticEngine < Minitest::Test
4
+ def setup
5
+ @buffer = Parser::Source::Buffer.new('(source)')
6
+ @buffer.source = 'foobar'
7
+
8
+ @engine = Parser::Diagnostic::Engine.new
9
+
10
+ @queue = []
11
+ @engine.consumer = lambda { |diag| @queue << diag }
12
+ end
13
+
14
+ def test_process_warnings
15
+ warn = Parser::Diagnostic.new(:warning, :invalid_escape, @buffer, 1..2)
16
+ @engine.process(warn)
17
+
18
+ assert_equal [warn], @queue
19
+ end
20
+
21
+ def test_ignore_warnings
22
+ @engine.ignore_warnings = true
23
+
24
+ warn = Parser::Diagnostic.new(:warning, :invalid_escape, @buffer, 1..2)
25
+ @engine.process(warn)
26
+
27
+ assert_equal [], @queue
28
+ end
29
+
30
+ def test_all_errors_are_fatal
31
+ @engine.all_errors_are_fatal = true
32
+
33
+ error = Parser::Diagnostic.new(:error, :invalid_escape, @buffer, 1..2)
34
+
35
+ err = assert_raises Parser::SyntaxError do
36
+ @engine.process(error)
37
+ end
38
+
39
+ assert_equal error, err.diagnostic
40
+
41
+ assert_equal [error], @queue
42
+ end
43
+
44
+ def test_all_errors_are_collected
45
+ error = Parser::Diagnostic.new(:error, :invalid_escape, @buffer, 1..2)
46
+ @engine.process(error)
47
+
48
+ assert_equal [error], @queue
49
+ end
50
+
51
+ def test_fatal_error
52
+ fatal = Parser::Diagnostic.new(:fatal, :invalid_escape, @buffer, 1..2)
53
+
54
+ assert_raises Parser::SyntaxError do
55
+ @engine.process(fatal)
56
+ end
57
+
58
+ assert_equal [fatal], @queue
59
+ end
60
+ end
@@ -0,0 +1,78 @@
1
+ # encoding: binary
2
+
3
+ require 'helper'
4
+
5
+ class TestEncoding < Minitest::Test
6
+ include AST::Sexp
7
+
8
+ def recognize(string)
9
+ Parser::Source::Buffer.recognize_encoding(string)
10
+ end
11
+
12
+ if defined?(Encoding)
13
+ require 'parser/all'
14
+
15
+ def test_default
16
+ assert_nil recognize('foobar')
17
+ end
18
+
19
+ def test_bom
20
+ assert_equal Encoding::UTF_8, recognize("\xef\xbb\xbf\nfoobar")
21
+ assert_equal Encoding::UTF_8, recognize("\xef\xbb\xbf# coding:koi8-r\nfoobar")
22
+ end
23
+
24
+ def test_magic_comment
25
+ assert_equal Encoding::KOI8_R, recognize("# coding:koi8-r\nfoobar")
26
+ end
27
+
28
+ def test_shebang
29
+ assert_equal Encoding::KOI8_R, recognize("#!/bin/foo\n# coding:koi8-r\nfoobar")
30
+ end
31
+
32
+ def test_case
33
+ assert_equal Encoding::KOI8_R, recognize("# coding:KoI8-r\nfoobar")
34
+ end
35
+
36
+ def test_space
37
+ assert_equal Encoding::KOI8_R, recognize("# coding : koi8-r\nfoobar")
38
+ end
39
+
40
+ def test_empty
41
+ assert_nil recognize('')
42
+ end
43
+
44
+ def test_no_comment
45
+ assert_nil recognize(%{require 'cane/encoding_aware_iterator'})
46
+ end
47
+
48
+ def test_adjacent
49
+ assert_nil recognize('# codingkoi8-r')
50
+ assert_nil recognize('# coding koi8-r')
51
+ end
52
+
53
+ def test_utf8_mac
54
+ assert_equal Encoding::UTF8_MAC, recognize('# coding: utf8-mac')
55
+ end
56
+
57
+ def test_suffix
58
+ assert_equal Encoding::UTF_8, recognize('# coding: utf-8-dos')
59
+ assert_equal Encoding::UTF_8, recognize('# coding: utf-8-unix')
60
+ assert_equal Encoding::UTF_8, recognize('# coding: utf-8-mac')
61
+
62
+ assert_raises(ArgumentError) do
63
+ assert_nil recognize('# coding: utf-8-dicks')
64
+ end
65
+ end
66
+
67
+ def test_parse_18_invalid_enc
68
+ ast = Parser::Ruby18.parse("# encoding:feynman-diagram\n1")
69
+ assert_equal ast, s(:int, 1)
70
+ end
71
+
72
+ def test_parse_19_invalid_enc
73
+ assert_raises(ArgumentError) do
74
+ Parser::Ruby19.parse("# encoding:feynman-diagram\n1")
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,3414 @@
1
+ # encoding: ascii-8bit
2
+
3
+ require 'helper'
4
+ require 'complex'
5
+
6
+ class TestLexer < Minitest::Test
7
+ def setup_lexer(version)
8
+ @lex = Parser::Lexer.new(version)
9
+
10
+ @lex.comments = []
11
+ @lex.diagnostics = Parser::Diagnostic::Engine.new
12
+ @lex.diagnostics.all_errors_are_fatal = true
13
+ # @lex.diagnostics.consumer = lambda { |diag| $stderr.puts "", diag.render }
14
+ end
15
+
16
+ def setup
17
+ setup_lexer 18
18
+ end
19
+
20
+ #
21
+ # Tools
22
+ #
23
+
24
+ def utf(str)
25
+ if str.respond_to?(:force_encoding)
26
+ str.force_encoding(Encoding::UTF_8)
27
+ else
28
+ str
29
+ end
30
+ end
31
+
32
+ #
33
+ # Additional matchers
34
+ #
35
+
36
+ def refute_scanned(s, *args)
37
+ assert_raises Parser::SyntaxError do
38
+ assert_scanned(s, *args)
39
+ end
40
+ end
41
+
42
+ def assert_escape(expected, input)
43
+ source_buffer = Parser::Source::Buffer.new('(assert_escape)')
44
+
45
+ if defined?(Encoding)
46
+ source_buffer.source = "\"\\#{input}\"".encode(input.encoding)
47
+ else
48
+ source_buffer.source = "\"\\#{input}\""
49
+ end
50
+
51
+ @lex.reset
52
+ @lex.source_buffer = source_buffer
53
+
54
+ lex_token, (lex_value, *) = @lex.advance
55
+
56
+ if lex_value.respond_to?(:force_encoding)
57
+ lex_value.force_encoding(Encoding::BINARY)
58
+ end
59
+
60
+ assert_equal [:tSTRING, expected],
61
+ [lex_token, lex_value],
62
+ source_buffer.source
63
+ end
64
+
65
+ def refute_escape(input)
66
+ err = assert_raises Parser::SyntaxError do
67
+ @lex.state = :expr_beg
68
+ assert_scanned "%Q[\\#{input}]"
69
+ end
70
+ assert_equal :fatal, err.diagnostic.level
71
+ end
72
+
73
+ def assert_lex_fname(name, type, range)
74
+ begin_pos, end_pos = range
75
+ assert_scanned("def #{name} ",
76
+ :kDEF, 'def', [0, 3],
77
+ type, name, [begin_pos + 4, end_pos + 4])
78
+
79
+ assert_equal :expr_endfn, @lex.state
80
+ end
81
+
82
+ def assert_scanned(input, *args)
83
+ source_buffer = Parser::Source::Buffer.new('(assert_scanned)')
84
+ source_buffer.source = input
85
+
86
+ @lex.reset(false)
87
+ @lex.source_buffer = source_buffer
88
+
89
+ until args.empty? do
90
+ token, value, (begin_pos, end_pos) = args.shift(3)
91
+
92
+ lex_token, (lex_value, lex_range) = @lex.advance
93
+ assert lex_token, 'no more tokens'
94
+ assert_operator [lex_token, lex_value], :eql?, [token, value], input
95
+ assert_equal begin_pos, lex_range.begin_pos
96
+ assert_equal end_pos, lex_range.end_pos
97
+ end
98
+
99
+ lex_token, (lex_value, *) = @lex.advance
100
+ refute lex_token, "must be empty, but had #{[lex_token, lex_value].inspect}"
101
+ end
102
+
103
+ #
104
+ # Tests
105
+ #
106
+
107
+ def test_read_escape
108
+ assert_escape "\\", "\\"
109
+ assert_escape "\n", "n"
110
+ assert_escape "\t", "t"
111
+ assert_escape "\r", "r"
112
+ assert_escape "\f", "f"
113
+ assert_escape "\13", "v"
114
+ assert_escape "\0", "0"
115
+ assert_escape "\07", "a"
116
+ assert_escape "\007", "a"
117
+ assert_escape "\033", "e"
118
+ assert_escape "\377", "377"
119
+ assert_escape "\377", "xff"
120
+ assert_escape "\010", "b"
121
+ assert_escape " ", "s"
122
+ assert_escape "q", "q" # plain vanilla escape
123
+ end
124
+
125
+ def test_read_escape_c
126
+ assert_escape "\030", "C-x"
127
+ assert_escape "\030", "cx"
128
+ assert_escape "\230", 'C-\M-x'
129
+ assert_escape "\230", 'c\M-x'
130
+
131
+ assert_escape "\177", "C-?"
132
+ assert_escape "\177", "c?"
133
+ assert_escape "\r", "cM"
134
+ end
135
+
136
+ def test_read_escape_m
137
+ assert_escape "\370", "M-x"
138
+ assert_escape "\230", 'M-\C-x'
139
+ assert_escape "\230", 'M-\cx'
140
+ end
141
+
142
+ def test_read_escape_errors
143
+ refute_escape ""
144
+
145
+ refute_escape "M"
146
+ refute_escape "M-"
147
+ refute_escape "Mx"
148
+
149
+ refute_escape "Cx"
150
+ refute_escape "C"
151
+ refute_escape "C-"
152
+
153
+ refute_escape "c"
154
+
155
+ refute_escape "x"
156
+ end
157
+
158
+ def test_read_escape_unicode__19
159
+ if RUBY_VERSION >= '1.9'
160
+ assert_escape "\x09", 'u{9}'
161
+ assert_escape "\x31", 'u{31}'
162
+ assert_escape "\x09\x01", 'u{9 1}'
163
+
164
+ assert_escape "\xc4\xa3", utf('u0123')
165
+ assert_escape "\xc4\xa3\xc3\xb0\xeb\x84\xa3", utf('u{123 f0 B123}')
166
+ end
167
+ end
168
+
169
+ def test_read_escape_unicode_bad__19
170
+ if RUBY_VERSION >= '1.9'
171
+ refute_escape 'u123'
172
+ refute_escape 'u{}'
173
+ refute_escape 'u{123 f0h}'
174
+ refute_escape 'u{123 f0'
175
+ end
176
+ end
177
+
178
+ def test_ambiguous_uminus
179
+ assert_scanned("m -3",
180
+ :tIDENTIFIER, "m", [0, 1],
181
+ :tUNARY_NUM, "-", [2, 3],
182
+ :tINTEGER, 3, [3, 4])
183
+ end
184
+
185
+ def test_ambiguous_uplus
186
+ assert_scanned("m +3",
187
+ :tIDENTIFIER, "m", [0, 1],
188
+ :tUNARY_NUM, "+", [2, 3],
189
+ :tINTEGER, 3, [3, 4])
190
+ end
191
+
192
+ def test_and
193
+ assert_scanned "&", :tAMPER, "&", [0, 1]
194
+ end
195
+
196
+ def test_and2
197
+ @lex.state = :expr_end
198
+
199
+ assert_scanned "&&", :tANDOP, "&&", [0, 2]
200
+ end
201
+
202
+ def test_and2_equals
203
+ @lex.state = :expr_end
204
+
205
+ assert_scanned "&&=", :tOP_ASGN, "&&", [0, 3]
206
+ end
207
+
208
+ def test_and_arg
209
+ @lex.state = :expr_arg
210
+
211
+ assert_scanned(" &y",
212
+ :tAMPER, "&", [1, 2],
213
+ :tIDENTIFIER, "y", [2, 3])
214
+ end
215
+
216
+ def test_and_equals
217
+ @lex.state = :expr_end
218
+
219
+ assert_scanned "&=", :tOP_ASGN, "&", [0, 2]
220
+ end
221
+
222
+ def test_and_expr
223
+ @lex.state = :expr_arg
224
+
225
+ assert_scanned("x & y",
226
+ :tIDENTIFIER, "x", [0, 1],
227
+ :tAMPER2, "&", [2, 3],
228
+ :tIDENTIFIER, "y", [4, 5])
229
+ end
230
+
231
+ def test_and_meth
232
+ assert_lex_fname "&", :tAMPER2, [0, 1]
233
+ end
234
+
235
+ def test_and_dot_arg
236
+ @lex.state = :expr_arg
237
+
238
+ assert_scanned "&.", :tANDDOT, "&.", [0, 2]
239
+ end
240
+
241
+ def test_and_dot_cmdarg
242
+ @lex.state = :expr_cmdarg
243
+
244
+ assert_scanned "&.", :tANDDOT, "&.", [0, 2]
245
+ end
246
+
247
+ def test_assoc
248
+ assert_scanned "=>", :tASSOC, "=>", [0, 2]
249
+ end
250
+
251
+ def test_label__18
252
+ assert_scanned("{a:b",
253
+ :tLBRACE, "{", [0, 1],
254
+ :tIDENTIFIER, "a", [1, 2],
255
+ :tSYMBOL, "b", [2, 4])
256
+ end
257
+
258
+ def test_label_in_params__18
259
+ assert_scanned("foo(a:b",
260
+ :tIDENTIFIER, "foo", [0, 3],
261
+ :tLPAREN2, "(", [3, 4],
262
+ :tIDENTIFIER, "a", [4, 5],
263
+ :tSYMBOL, "b", [5, 7])
264
+ end
265
+
266
+ def test_label__19
267
+ setup_lexer 19
268
+
269
+ assert_scanned("{a:b",
270
+ :tLBRACE, "{", [0, 1],
271
+ :tLABEL, "a", [1, 3],
272
+ :tIDENTIFIER, "b", [3, 4])
273
+ end
274
+
275
+ def test_label_in_params__19
276
+ setup_lexer 19
277
+
278
+ assert_scanned("foo(a:b",
279
+ :tIDENTIFIER, "foo", [0, 3],
280
+ :tLPAREN2, "(", [3, 4],
281
+ :tLABEL, "a", [4, 6],
282
+ :tIDENTIFIER, "b", [6, 7])
283
+ end
284
+
285
+ def test_label_fid__19
286
+ setup_lexer 19
287
+
288
+ assert_scanned("{a?:true",
289
+ :tLBRACE, '{', [0, 1],
290
+ :tLABEL, 'a?', [1, 4],
291
+ :kTRUE, 'true', [4, 8])
292
+ end
293
+
294
+ def test_label__22
295
+ setup_lexer 22
296
+
297
+ assert_scanned("{'a':",
298
+ :tLBRACE, '{', [0, 1],
299
+ :tSTRING_BEG, "'", [1, 2],
300
+ :tSTRING_CONTENT, 'a', [2, 3],
301
+ :tLABEL_END, "'", [3, 5])
302
+ end
303
+
304
+ def test_label_nested__22
305
+ setup_lexer 22
306
+
307
+ assert_scanned("{'a\":':",
308
+ :tLBRACE, '{', [0, 1],
309
+ :tSTRING_BEG, "'", [1, 2],
310
+ :tSTRING_CONTENT, 'a":', [2, 5],
311
+ :tLABEL_END, "'", [5, 7])
312
+ end
313
+
314
+ def test_label_colon2__22
315
+ setup_lexer 22
316
+
317
+ assert_scanned("{'a'::",
318
+ :tLBRACE, '{', [0, 1],
319
+ :tSTRING, "a", [1, 4],
320
+ :tCOLON2, '::', [4, 6])
321
+ end
322
+
323
+ def test_pct_string_colon__22
324
+ setup_lexer 22
325
+
326
+ assert_scanned("{%'a':",
327
+ :tLBRACE, '{', [0, 1],
328
+ :tSTRING_BEG, "%'", [1, 3],
329
+ :tSTRING_CONTENT, 'a', [3, 4],
330
+ :tSTRING_END, "'", [4, 5],
331
+ :tCOLON, ':', [5, 6])
332
+ end
333
+
334
+ def test_command_start__19
335
+ setup_lexer 19
336
+
337
+ %w[case elsif for in until when while
338
+ if unless and or].each do |keyword|
339
+ token = "k#{keyword.upcase}".to_sym
340
+
341
+ @lex.reset
342
+ assert_scanned("#{keyword} a:b",
343
+ token, keyword, [0, keyword.length],
344
+ :tIDENTIFIER, "a", [keyword.length + 1, keyword.length + 2],
345
+ :tSYMBOL, "b", [keyword.length + 2, keyword.length + 4])
346
+ end
347
+ end
348
+
349
+ def test_mod_not_command_start__19
350
+ setup_lexer 19
351
+
352
+ %w[if unless while until rescue].each do |keyword|
353
+ token = "k#{keyword.upcase}_MOD".to_sym
354
+
355
+ @lex.state = :expr_end
356
+ assert_scanned("#{keyword} a:b",
357
+ token, keyword, [0, keyword.length],
358
+ :tLABEL, "a", [keyword.length + 1, keyword.length + 3],
359
+ :tIDENTIFIER, "b", [keyword.length + 3, keyword.length + 4])
360
+ end
361
+ end
362
+
363
+ def test_back_ref
364
+ assert_scanned("[$&, $`, $', $+]",
365
+ :tLBRACK, "[", [0, 1],
366
+ :tBACK_REF, "$&", [1, 3], :tCOMMA, ",", [3, 4],
367
+ :tBACK_REF, "$`", [5, 7], :tCOMMA, ",", [7, 8],
368
+ :tBACK_REF, "$'", [9, 11], :tCOMMA, ",", [11, 12],
369
+ :tBACK_REF, "$+", [13, 15],
370
+ :tRBRACK, "]", [15, 16])
371
+ end
372
+
373
+ def test_backslash
374
+ assert_scanned("1 \\\n+ 2",
375
+ :tINTEGER, 1, [0, 1],
376
+ :tPLUS, "+", [4, 5],
377
+ :tINTEGER, 2, [6, 7])
378
+ end
379
+
380
+ def test_backslash_bad
381
+ refute_scanned("1 \\ + 2",
382
+ :tINTEGER, 1, [0, 1])
383
+ end
384
+
385
+ def test_backtick
386
+ assert_scanned("`ls`",
387
+ :tXSTRING_BEG, "`", [0, 1],
388
+ :tSTRING_CONTENT, "ls", [1, 3],
389
+ :tSTRING_END, "`", [3, 4])
390
+ end
391
+
392
+ def test_backtick_cmdarg
393
+ @lex.state = :expr_dot
394
+ assert_scanned("\n`", :tBACK_REF2, "`", [1, 2]) # \n ensures expr_cmd
395
+
396
+ assert_equal :expr_arg, @lex.state
397
+ end
398
+
399
+ def test_backtick_dot
400
+ @lex.state = :expr_dot
401
+ assert_scanned("a.`(3)",
402
+ :tIDENTIFIER, "a", [0, 1],
403
+ :tDOT, ".", [1, 2],
404
+ :tBACK_REF2, "`", [2, 3],
405
+ :tLPAREN2, "(", [3, 4],
406
+ :tINTEGER, 3, [4, 5],
407
+ :tRPAREN, ")", [5, 6])
408
+ end
409
+
410
+ def test_backtick_method
411
+ @lex.state = :expr_fname
412
+ assert_scanned("`", :tBACK_REF2, "`", [0, 1])
413
+ assert_equal :expr_endfn, @lex.state
414
+ end
415
+
416
+ def test_bad_char
417
+ refute_scanned(" \010 ")
418
+ end
419
+
420
+ def test_bang
421
+ assert_scanned "!", :tBANG, "!", [0, 1]
422
+ end
423
+
424
+ def test_bang_equals
425
+ assert_scanned "!=", :tNEQ, "!=", [0, 2]
426
+ end
427
+
428
+ def test_bang_tilde
429
+ assert_scanned "!~", :tNMATCH, "!~", [0, 2]
430
+ end
431
+
432
+ def test_def_ubang
433
+ setup_lexer(20)
434
+
435
+ @lex.state = :expr_fname
436
+ assert_scanned '!@', :tBANG, '!@', [0, 2]
437
+ end
438
+
439
+ def test_carat
440
+ assert_scanned "^", :tCARET, "^", [0, 1]
441
+ end
442
+
443
+ def test_carat_equals
444
+ assert_scanned "^=", :tOP_ASGN, "^", [0, 2]
445
+ end
446
+
447
+ def test_colon2
448
+ assert_scanned("A::B",
449
+ :tCONSTANT, "A", [0, 1],
450
+ :tCOLON2, "::", [1, 3],
451
+ :tCONSTANT, "B", [3, 4])
452
+
453
+ @lex.state = :expr_arg
454
+ assert_scanned("::Array",
455
+ :tCOLON2, "::", [0, 2],
456
+ :tCONSTANT, "Array", [2, 7])
457
+ end
458
+
459
+ def test_colon3
460
+ assert_scanned("::Array",
461
+ :tCOLON3, "::", [0, 2],
462
+ :tCONSTANT, "Array", [2, 7])
463
+
464
+ @lex.state = :expr_arg
465
+ assert_scanned(" ::Array",
466
+ :tCOLON3, "::", [1, 3],
467
+ :tCONSTANT, "Array", [3, 8])
468
+ end
469
+
470
+ def test_comma
471
+ assert_scanned ",", :tCOMMA, ",", [0, 1]
472
+ end
473
+
474
+ def test_comment
475
+ assert_scanned("1 # one\n# two\n2",
476
+ :tINTEGER, 1, [0, 1],
477
+ :tNL, nil, [7, 8],
478
+ :tINTEGER, 2, [14, 15])
479
+
480
+ assert_equal 2, @lex.comments.length
481
+ assert_equal '# one', @lex.comments[0].text
482
+ assert_equal '# two', @lex.comments[1].text
483
+ end
484
+
485
+ def test_comment_expr_beg
486
+ assert_scanned("{#1\n}",
487
+ :tLBRACE, "{", [0, 1],
488
+ :tRCURLY, "}", [4, 5])
489
+ end
490
+
491
+ def test_comment_begin
492
+ assert_scanned("=begin\nblah\nblah\n=end\n42",
493
+ :tINTEGER, 42, [22, 24])
494
+ assert_equal 1, @lex.comments.length
495
+ assert_equal "=begin\nblah\nblah\n=end\n", @lex.comments[0].text
496
+ end
497
+
498
+ def test_comment_begin_bad
499
+ refute_scanned("=begin\nblah\nblah\n")
500
+ end
501
+
502
+ def test_comment_begin_not_comment
503
+ assert_scanned("beginfoo = 5\np x \\\n=beginfoo",
504
+ :tIDENTIFIER, "beginfoo", [0, 8],
505
+ :tEQL, "=", [9, 10],
506
+ :tINTEGER, 5, [11, 12],
507
+ :tNL, nil, [12, 13],
508
+ :tIDENTIFIER, "p", [13, 14],
509
+ :tIDENTIFIER, "x", [15, 16],
510
+ :tEQL, "=", [19, 20],
511
+ :tIDENTIFIER, "beginfoo", [20, 28])
512
+ end
513
+
514
+ def test_comment_begin_space
515
+ assert_scanned("=begin blah\nblah\n=end\n")
516
+
517
+ assert_equal 1, @lex.comments.length
518
+ assert_equal "=begin blah\nblah\n=end\n", @lex.comments[0].text
519
+ end
520
+
521
+ def test_comment_end_space_and_text
522
+ assert_scanned("=begin blah\nblah\n=end blab\n")
523
+
524
+ assert_equal 1, @lex.comments.length
525
+ assert_equal "=begin blah\nblah\n=end blab\n", @lex.comments[0].text
526
+ end
527
+
528
+ def test_comment_eos
529
+ assert_scanned("# comment")
530
+ end
531
+
532
+ def test_constant
533
+ assert_scanned("ArgumentError",
534
+ :tCONSTANT, "ArgumentError", [0, 13])
535
+ end
536
+
537
+ def test_constant_semi
538
+ assert_scanned("ArgumentError;",
539
+ :tCONSTANT, "ArgumentError", [0, 13],
540
+ :tSEMI, ";", [13, 14])
541
+ end
542
+
543
+ def test_cvar
544
+ assert_scanned "@@blah", :tCVAR, "@@blah", [0, 6]
545
+ end
546
+
547
+ def test_cvar_bad
548
+ refute_scanned "@@1"
549
+ end
550
+
551
+ def test_div
552
+ assert_scanned("a / 2",
553
+ :tIDENTIFIER, "a", [0, 1],
554
+ :tDIVIDE, "/", [2, 3],
555
+ :tINTEGER, 2, [4, 5])
556
+ end
557
+
558
+ def test_div_equals
559
+ assert_scanned("a /= 2",
560
+ :tIDENTIFIER, "a", [0, 1],
561
+ :tOP_ASGN, "/", [2, 4],
562
+ :tINTEGER, 2, [5, 6])
563
+ end
564
+
565
+ def test_do
566
+ assert_scanned("x do 42 end",
567
+ :tIDENTIFIER, "x", [0, 1],
568
+ :kDO, "do", [2, 4],
569
+ :tINTEGER, 42, [5, 7],
570
+ :kEND, "end", [8, 11])
571
+ end
572
+
573
+ def test_do_block
574
+ @lex.state = :expr_endarg
575
+
576
+ assert_scanned("do 42 end",
577
+ :kDO_BLOCK, "do", [0, 2],
578
+ :tINTEGER, 42, [3, 5],
579
+ :kEND, "end", [6, 9])
580
+ end
581
+
582
+ def test_do_cond
583
+ @lex.cond.push true
584
+
585
+ assert_scanned("x do 42 end",
586
+ :tIDENTIFIER, "x", [0, 1],
587
+ :kDO_COND, "do", [2, 4],
588
+ :tINTEGER, 42, [5, 7],
589
+ :kEND, "end", [8, 11])
590
+ end
591
+
592
+ def test_dot
593
+ assert_scanned ".", :tDOT, ".", [0, 1]
594
+ end
595
+
596
+ def test_dot2
597
+ assert_scanned "..", :tDOT2, "..", [0, 2]
598
+ end
599
+
600
+ def test_dot3
601
+ assert_scanned "...", :tDOT3, "...", [0, 3]
602
+ end
603
+
604
+ def test_equals
605
+ assert_scanned "=", :tEQL, "=", [0, 1]
606
+ end
607
+
608
+ def test_equals2
609
+ assert_scanned "==", :tEQ, "==", [0, 2]
610
+ end
611
+
612
+ def test_equals3
613
+ assert_scanned "===", :tEQQ, "===", [0, 3]
614
+ end
615
+
616
+ def test_equals_tilde
617
+ assert_scanned "=~", :tMATCH, "=~", [0, 2]
618
+ end
619
+
620
+ def test_float
621
+ assert_scanned "1.0", :tFLOAT, 1.0, [0, 3]
622
+ end
623
+
624
+ def test_float_bad_no_underscores
625
+ refute_scanned "1__0.0"
626
+ end
627
+
628
+ def test_float_bad_no_zero_leading
629
+ refute_scanned ".0"
630
+ end
631
+
632
+ def test_float_bad_trailing_underscore
633
+ refute_scanned "123_.0"
634
+ end
635
+
636
+ def test_float_call
637
+ assert_scanned("1.0.to_s",
638
+ :tFLOAT, 1.0, [0, 3],
639
+ :tDOT, ".", [3, 4],
640
+ :tIDENTIFIER, "to_s", [4, 8])
641
+ end
642
+
643
+ def test_float_dot_E
644
+ assert_scanned "1.0E10", :tFLOAT, 1.0e10, [0, 6]
645
+ end
646
+
647
+ def test_float_dot_E_neg
648
+ assert_scanned("-1.0E10",
649
+ :tUNARY_NUM, "-", [0, 1],
650
+ :tFLOAT, 1.0e10, [1, 7])
651
+ end
652
+
653
+ def test_float_dot_E_pos
654
+ assert_scanned("+1.0E10",
655
+ :tUNARY_NUM, "+", [0, 1],
656
+ :tFLOAT, 1.0e10, [1, 7])
657
+ end
658
+
659
+ def test_float_dot_e
660
+ assert_scanned "1.0e10", :tFLOAT, 1.0e10, [0, 6]
661
+ end
662
+
663
+ def test_float_dot_e_neg
664
+ assert_scanned("-1.0e10",
665
+ :tUNARY_NUM, "-", [0, 1],
666
+ :tFLOAT, 1.0e10, [1, 7])
667
+ end
668
+
669
+ def test_float_dot_e_pos
670
+ assert_scanned("+1.0e10",
671
+ :tUNARY_NUM, "+", [0, 1],
672
+ :tFLOAT, 1.0e10, [1, 7])
673
+ end
674
+
675
+ def test_float_e
676
+ assert_scanned "1e10", :tFLOAT, 1e10, [0, 4]
677
+ end
678
+
679
+ def test_float_e_bad_trailing_underscore
680
+ refute_scanned "123_e10"
681
+ end
682
+
683
+ def test_float_e_minus
684
+ assert_scanned "1e-10", :tFLOAT, 1e-10, [0, 5]
685
+ end
686
+
687
+ def test_float_e_neg
688
+ assert_scanned("-1e10",
689
+ :tUNARY_NUM, "-", [0, 1],
690
+ :tFLOAT, 1e10, [1, 5])
691
+ end
692
+
693
+ def test_float_e_neg_minus
694
+ assert_scanned("-1e-10",
695
+ :tUNARY_NUM, "-", [0, 1],
696
+ :tFLOAT, 1e-10, [1, 6])
697
+ end
698
+
699
+ def test_float_e_neg_plus
700
+ assert_scanned("-1e+10",
701
+ :tUNARY_NUM, "-", [0, 1],
702
+ :tFLOAT, 1e10, [1, 6])
703
+ end
704
+
705
+ def test_float_e_pos
706
+ assert_scanned("+1e10",
707
+ :tUNARY_NUM, "+", [0, 1],
708
+ :tFLOAT, 1e10, [1, 5])
709
+ end
710
+
711
+ def test_float_e_pos_minus
712
+ assert_scanned("+1e-10",
713
+ :tUNARY_NUM, "+", [0, 1],
714
+ :tFLOAT, 1e-10, [1, 6])
715
+ end
716
+
717
+ def test_float_e_pos_plus
718
+ assert_scanned("+1e+10",
719
+ :tUNARY_NUM, "+", [0, 1],
720
+ :tFLOAT, 1e10, [1, 6])
721
+ end
722
+
723
+ def test_float_e_plus
724
+ assert_scanned "1e+10", :tFLOAT, 1e10, [0, 5]
725
+ end
726
+
727
+ def test_float_e_zero
728
+ assert_scanned "0e0", :tFLOAT, 0e0, [0, 3]
729
+ end
730
+
731
+ def test_float_e_nothing
732
+ [18, 19, 20].each do |version|
733
+ setup_lexer version
734
+
735
+ refute_scanned "1end"
736
+ refute_scanned "1.1end"
737
+ end
738
+
739
+ setup_lexer 21
740
+
741
+ assert_scanned("1end",
742
+ :tINTEGER, 1, [0, 1],
743
+ :kEND, 'end', [1, 4])
744
+ assert_scanned("1.1end",
745
+ :tFLOAT, 1.1, [0, 3],
746
+ :kEND, 'end', [3, 6])
747
+ end
748
+
749
+ def test_float_neg
750
+ assert_scanned("-1.0",
751
+ :tUNARY_NUM, "-", [0, 1],
752
+ :tFLOAT, 1.0, [1, 4])
753
+ end
754
+
755
+ def test_float_pos
756
+ assert_scanned("+1.0",
757
+ :tUNARY_NUM, "+", [0, 1],
758
+ :tFLOAT, 1.0, [1, 4])
759
+ end
760
+
761
+ def test_ge
762
+ assert_scanned("a >= 2",
763
+ :tIDENTIFIER, "a", [0, 1],
764
+ :tGEQ, ">=", [2, 4],
765
+ :tINTEGER, 2, [5, 6])
766
+ end
767
+
768
+ def test_global
769
+ assert_scanned("$blah", :tGVAR, "$blah", [0, 5])
770
+ end
771
+
772
+ def test_global_backref
773
+ assert_scanned("$`", :tBACK_REF, "$`", [0, 2])
774
+ end
775
+
776
+ # This was removed in 2.1.
777
+ # def test_global_dash_nothing
778
+ # assert_scanned("$- ", :tGVAR, "$-")
779
+ # end
780
+
781
+ def test_global_dash_something
782
+ assert_scanned("$-x", :tGVAR, "$-x", [0, 3])
783
+ end
784
+
785
+ def test_global_number
786
+ assert_scanned("$10", :tNTH_REF, 10, [0, 3])
787
+ end
788
+
789
+ def test_global_other
790
+ assert_scanned("[$~, $*, $$, $?, $!, $@, $/, $\\, $;, $,, $., $=, $:, $<, $>, $\"]",
791
+ :tLBRACK, "[", [0, 1],
792
+ :tGVAR, "$~", [1, 3], :tCOMMA, ",", [3, 4],
793
+ :tGVAR, "$*", [5, 7], :tCOMMA, ",", [7, 8],
794
+ :tGVAR, "$$", [9, 11], :tCOMMA, ",", [11, 12],
795
+ :tGVAR, "$\?", [13, 15], :tCOMMA, ",", [15, 16],
796
+ :tGVAR, "$!", [17, 19], :tCOMMA, ",", [19, 20],
797
+ :tGVAR, "$@", [21, 23], :tCOMMA, ",", [23, 24],
798
+ :tGVAR, "$/", [25, 27], :tCOMMA, ",", [27, 28],
799
+ :tGVAR, "$\\", [29, 31], :tCOMMA, ",", [31, 32],
800
+ :tGVAR, "$;", [33, 35], :tCOMMA, ",", [35, 36],
801
+ :tGVAR, "$,", [37, 39], :tCOMMA, ",", [39, 40],
802
+ :tGVAR, "$.", [41, 43], :tCOMMA, ",", [43, 44],
803
+ :tGVAR, "$=", [45, 47], :tCOMMA, ",", [47, 48],
804
+ :tGVAR, "$:", [49, 51], :tCOMMA, ",", [51, 52],
805
+ :tGVAR, "$<", [53, 55], :tCOMMA, ",", [55, 56],
806
+ :tGVAR, "$>", [57, 59], :tCOMMA, ",", [59, 60],
807
+ :tGVAR, "$\"", [61, 63],
808
+ :tRBRACK, "]", [63, 64])
809
+ end
810
+
811
+ def test_global_underscore
812
+ assert_scanned("$_",
813
+ :tGVAR, "$_", [0, 2])
814
+ end
815
+
816
+ def test_global_weird
817
+ assert_scanned("$__blah",
818
+ :tGVAR, "$__blah", [0, 7])
819
+ end
820
+
821
+ def test_global_zero
822
+ assert_scanned("$0", :tGVAR, "$0", [0, 2])
823
+ end
824
+
825
+ def test_gt
826
+ assert_scanned("a > 2",
827
+ :tIDENTIFIER, "a", [0, 1],
828
+ :tGT, ">", [2, 3],
829
+ :tINTEGER, 2, [4, 5])
830
+ end
831
+
832
+ def test_heredoc_backtick
833
+ assert_scanned("a = <<`EOF`\n blah blah\nEOF\n",
834
+ :tIDENTIFIER, "a", [0, 1],
835
+ :tEQL, "=", [2, 3],
836
+ :tXSTRING_BEG, "<<`", [4, 11],
837
+ :tSTRING_CONTENT, " blah blah\n", [12, 24],
838
+ :tSTRING_END, "EOF", [24, 27],
839
+ :tNL, nil, [11, 12])
840
+ end
841
+
842
+ def test_heredoc_double
843
+ assert_scanned("a = <<\"EOF\"\n blah blah\nEOF\n",
844
+ :tIDENTIFIER, "a", [0, 1],
845
+ :tEQL, "=", [2, 3],
846
+ :tSTRING_BEG, "<<\"", [4, 11],
847
+ :tSTRING_CONTENT, " blah blah\n", [12, 24],
848
+ :tSTRING_END, "EOF", [24, 27],
849
+ :tNL, nil, [11, 12])
850
+ end
851
+
852
+ def test_heredoc_double_dash
853
+ assert_scanned("a = <<-\"EOF\"\n blah blah\n EOF\n",
854
+ :tIDENTIFIER, "a", [0, 1],
855
+ :tEQL, "=", [2, 3],
856
+ :tSTRING_BEG, "<<\"", [4, 12],
857
+ :tSTRING_CONTENT, " blah blah\n", [13, 25],
858
+ :tSTRING_END, "EOF", [25, 30],
859
+ :tNL, nil, [12, 13])
860
+ end
861
+
862
+ def test_heredoc_double_eos
863
+ refute_scanned("a = <<\"EOF\"\nblah",
864
+ :tIDENTIFIER, "a", [0, 1],
865
+ :tEQL, "=", [2, 3],
866
+ :tSTRING_BEG, "<<\"", [4, 7])
867
+ end
868
+
869
+ def test_heredoc_double_eos_nl
870
+ refute_scanned("a = <<\"EOF\"\nblah\n",
871
+ :tIDENTIFIER, "a", [0, 1],
872
+ :tEQL, "=", [2, 3],
873
+ :tSTRING_BEG, "<<\"", [4, 7])
874
+ end
875
+
876
+ def test_heredoc_double_interp
877
+ assert_scanned("a = <<\"EOF\"\n#x a \#@a b \#$b c \#{3} \nEOF\n",
878
+ :tIDENTIFIER, "a", [0, 1],
879
+ :tEQL, "=", [2, 3],
880
+ :tSTRING_BEG, "<<\"", [4, 11],
881
+ :tSTRING_CONTENT, "#x a ", [12, 17],
882
+ :tSTRING_DVAR, nil, [17, 18],
883
+ :tIVAR, "@a", [18, 20],
884
+ :tSTRING_CONTENT, " b ", [20, 23],
885
+ :tSTRING_DVAR, nil, [23, 24],
886
+ :tGVAR, "$b", [24, 26],
887
+ :tSTRING_CONTENT, " c ", [26, 29],
888
+ :tSTRING_DBEG, '#{', [29, 31],
889
+ :tINTEGER, 3, [31, 32],
890
+ :tRCURLY, "}", [32, 33],
891
+ :tSTRING_CONTENT, " \n", [33, 35],
892
+ :tSTRING_END, "EOF", [35, 38],
893
+ :tNL, nil, [11, 12])
894
+ end
895
+
896
+ def test_heredoc_empty
897
+ assert_scanned("<<\"\"\n\#{x}\nblah2\n\n",
898
+ :tSTRING_BEG, "<<\"", [0, 4],
899
+ :tSTRING_DBEG, "\#{", [5, 7],
900
+ :tIDENTIFIER, "x", [7, 8],
901
+ :tRCURLY, "}", [8, 9],
902
+ :tSTRING_CONTENT, "\n", [9, 10],
903
+ :tSTRING_CONTENT, "blah2\n", [10, 16],
904
+ :tSTRING_END, "", [16, 16],
905
+ :tNL, nil, [4, 5])
906
+ end
907
+
908
+ def test_heredoc_none
909
+ assert_scanned("a = <<EOF\nblah\nblah\nEOF",
910
+ :tIDENTIFIER, "a", [0, 1],
911
+ :tEQL, "=", [2, 3],
912
+ :tSTRING_BEG, "<<\"", [4, 9],
913
+ :tSTRING_CONTENT, "blah\n", [10, 15],
914
+ :tSTRING_CONTENT, "blah\n", [15, 20],
915
+ :tSTRING_END, "EOF", [20, 23],
916
+ :tNL, nil, [9, 10])
917
+ end
918
+
919
+ def test_heredoc_none_dash
920
+ assert_scanned("a = <<-EOF\nblah\nblah\n EOF",
921
+ :tIDENTIFIER, "a", [0, 1],
922
+ :tEQL, "=", [2, 3],
923
+ :tSTRING_BEG, "<<\"", [4, 10],
924
+ :tSTRING_CONTENT, "blah\n", [11, 16],
925
+ :tSTRING_CONTENT, "blah\n", [16, 21],
926
+ :tSTRING_END, "EOF", [21, 26],
927
+ :tNL, nil, [10, 11])
928
+ end
929
+
930
+ def test_heredoc_single
931
+ assert_scanned("a = <<'EOF'\n blah blah\nEOF\n",
932
+ :tIDENTIFIER, "a", [0, 1],
933
+ :tEQL, "=", [2, 3],
934
+ :tSTRING_BEG, "<<'", [4, 11],
935
+ :tSTRING_CONTENT, " blah blah\n", [12, 24],
936
+ :tSTRING_END, "EOF", [24, 27],
937
+ :tNL, nil, [11, 12])
938
+ end
939
+
940
+ def test_heredoc_single_bad_eos_body
941
+ refute_scanned("a = <<'EOF'\nblah",
942
+ :tIDENTIFIER, "a", [0, 1],
943
+ :tEQL, "=", [2, 3],
944
+ :tSTRING_BEG, "'", [6, 7])
945
+ end
946
+
947
+ def test_heredoc_single_dash
948
+ assert_scanned("a = <<-'EOF'\n blah blah\n EOF\n",
949
+ :tIDENTIFIER, "a", [0, 1],
950
+ :tEQL, "=", [2, 3],
951
+ :tSTRING_BEG, "<<'", [4, 12],
952
+ :tSTRING_CONTENT, " blah blah\n", [13, 25],
953
+ :tSTRING_END, "EOF", [25, 30],
954
+ :tNL, nil, [12, 13])
955
+ end
956
+
957
+ def test_heredoc_one_character
958
+ assert_scanned("a = <<E\nABCDEF\nE\n",
959
+ :tIDENTIFIER, "a", [0, 1],
960
+ :tEQL, "=", [2, 3],
961
+ :tSTRING_BEG, "<<\"", [4, 7],
962
+ :tSTRING_CONTENT, "ABCDEF\n", [8, 15],
963
+ :tSTRING_END, "E", [15, 16],
964
+ :tNL, nil, [7, 8])
965
+ end
966
+
967
+ def test_heredoc_cr
968
+ assert_scanned("a = <<E\r\r\nABCDEF\r\r\nE\r\r\r\n",
969
+ :tIDENTIFIER, "a", [0, 1],
970
+ :tEQL, "=", [2, 3],
971
+ :tSTRING_BEG, "<<\"", [4, 7],
972
+ :tSTRING_CONTENT, "ABCDEF\r\n", [9, 17],
973
+ :tSTRING_END, "E", [17, 20],
974
+ :tNL, nil, [8, 9])
975
+ end
976
+
977
+ def test_identifier
978
+ assert_scanned("identifier",
979
+ :tIDENTIFIER, "identifier", [0, 10])
980
+ end
981
+
982
+ def test_identifier_bang
983
+ assert_scanned("identifier!",
984
+ :tFID, "identifier!", [0, 11])
985
+
986
+ assert_scanned("identifier!=",
987
+ :tIDENTIFIER, "identifier", [0, 10],
988
+ :tNEQ, "!=", [10, 12])
989
+ end
990
+
991
+ def test_identifier_eh
992
+ setup_lexer 19
993
+
994
+ assert_scanned("identifier?",
995
+ :tFID, "identifier?", [0, 11])
996
+
997
+ assert_scanned("identifier?=",
998
+ :tIDENTIFIER, "identifier", [0, 10],
999
+ :tCHARACTER, "=", [10, 12])
1000
+ end
1001
+
1002
+ def test_identifier_cmp
1003
+ assert_lex_fname "<=>", :tCMP, [0, 3]
1004
+ end
1005
+
1006
+ def test_identifier_def
1007
+ assert_lex_fname "identifier", :tIDENTIFIER, [0, 10]
1008
+ end
1009
+
1010
+ def test_identifier_equals_arrow
1011
+ assert_scanned(":blah==>",
1012
+ :tSYMBOL, "blah=", [0, 6],
1013
+ :tASSOC, "=>", [6, 8])
1014
+ end
1015
+
1016
+ def test_identifier_equals3
1017
+ assert_scanned(":a===b",
1018
+ :tSYMBOL, "a", [0, 2],
1019
+ :tEQQ, "===", [2, 5],
1020
+ :tIDENTIFIER, "b", [5, 6])
1021
+ end
1022
+
1023
+ def test_identifier_equals_equals_arrow
1024
+ assert_scanned(":a==>b",
1025
+ :tSYMBOL, "a=", [0, 3],
1026
+ :tASSOC, "=>", [3, 5],
1027
+ :tIDENTIFIER, "b", [5, 6])
1028
+ end
1029
+
1030
+ def test_identifier_equals_caret
1031
+ assert_lex_fname "^", :tCARET, [0, 1]
1032
+ end
1033
+
1034
+ def test_identifier_equals_def
1035
+ assert_lex_fname "identifier=", :tIDENTIFIER, [0, 11]
1036
+ end
1037
+
1038
+ def test_identifier_equals_def2
1039
+ assert_lex_fname "==", :tEQ, [0, 2]
1040
+ end
1041
+
1042
+ def test_identifier_equals_expr
1043
+ @lex.state = :expr_dot
1044
+ assert_scanned("y = arg",
1045
+ :tIDENTIFIER, "y", [0, 1],
1046
+ :tEQL, "=", [2, 3],
1047
+ :tIDENTIFIER, "arg", [4, 7])
1048
+
1049
+ assert_equal :expr_arg, @lex.state
1050
+ end
1051
+
1052
+ def test_identifier_equals_or
1053
+ assert_lex_fname "|", :tPIPE, [0, 1]
1054
+ end
1055
+
1056
+ def test_identifier_equals_slash
1057
+ assert_lex_fname "/", :tDIVIDE, [0, 1]
1058
+ end
1059
+
1060
+ def test_identifier_equals_tilde
1061
+ @lex.state = :expr_fname
1062
+ assert_scanned("identifier=~",
1063
+ :tIDENTIFIER, "identifier=", [0, 11],
1064
+ :tTILDE, "~", [11, 12])
1065
+ end
1066
+
1067
+ def test_identifier_gt
1068
+ assert_lex_fname ">", :tGT, [0, 1]
1069
+ end
1070
+
1071
+ def test_identifier_le
1072
+ assert_lex_fname "<=", :tLEQ, [0, 2]
1073
+ end
1074
+
1075
+ def test_identifier_lt
1076
+ assert_lex_fname "<", :tLT, [0, 1]
1077
+ end
1078
+
1079
+ def test_identifier_tilde
1080
+ assert_lex_fname "~", :tTILDE, [0, 1]
1081
+ end
1082
+
1083
+ def test_identifier_defined?
1084
+ assert_lex_fname "defined?", :kDEFINED, [0, 8]
1085
+ end
1086
+
1087
+ def test_index
1088
+ assert_lex_fname "[]", :tAREF, [0, 2]
1089
+ end
1090
+
1091
+ def test_index_equals
1092
+ assert_lex_fname "[]=", :tASET, [0, 3]
1093
+ end
1094
+
1095
+ def test_integer
1096
+ assert_scanned "42", :tINTEGER, 42, [0, 2]
1097
+ end
1098
+
1099
+ def test_integer_bin
1100
+ assert_scanned "0b101010", :tINTEGER, 42, [0, 8]
1101
+ end
1102
+
1103
+ def test_integer_bin_bad_none
1104
+ refute_scanned "0b "
1105
+ end
1106
+
1107
+ def test_integer_bin_bad_underscores
1108
+ refute_scanned "0b10__01"
1109
+ end
1110
+
1111
+ def test_integer_dec
1112
+ assert_scanned "42", :tINTEGER, 42, [0, 2]
1113
+ end
1114
+
1115
+ def test_integer_dec_bad_underscores
1116
+ refute_scanned "42__24"
1117
+ end
1118
+
1119
+ def test_integer_dec_d
1120
+ assert_scanned "0d42", :tINTEGER, 42, [0, 4]
1121
+ end
1122
+
1123
+ def test_integer_dec_d_bad_none
1124
+ refute_scanned "0d"
1125
+ end
1126
+
1127
+ def test_integer_dec_d_bad_underscores
1128
+ refute_scanned "0d42__24"
1129
+ end
1130
+
1131
+ def test_question_eh_a__18
1132
+ setup_lexer 18
1133
+
1134
+ assert_scanned "?a", :tINTEGER, 97, [0, 2]
1135
+ end
1136
+
1137
+ def test_question_eh_a__19
1138
+ setup_lexer 19
1139
+
1140
+ assert_scanned '?a', :tCHARACTER, "a", [0, 2]
1141
+ end
1142
+
1143
+ def test_question_eh_escape_M_escape_C__18
1144
+ setup_lexer 18
1145
+
1146
+ assert_scanned '?\M-\C-a', :tINTEGER, 129, [0, 8]
1147
+ end
1148
+
1149
+ def test_question_eh_escape_M_escape_C__19
1150
+ setup_lexer 19
1151
+
1152
+ assert_scanned '?\M-\C-a', :tCHARACTER, "\M-\C-a", [0, 8]
1153
+ end
1154
+
1155
+ def test_question_eh_escape_u_1_digit
1156
+ setup_lexer 19
1157
+
1158
+ refute_scanned '?\\u1'
1159
+ end
1160
+
1161
+ def test_question_eh_escape_u_2_digits
1162
+ setup_lexer 19
1163
+
1164
+ refute_scanned '?\\u12'
1165
+ end
1166
+
1167
+ def test_question_eh_escape_u_3_digits
1168
+ setup_lexer 19
1169
+
1170
+ refute_scanned '?\\u123'
1171
+ end
1172
+
1173
+ def test_question_eh_escape_u_4_digits
1174
+ if RUBY_VERSION >= '1.9'
1175
+ setup_lexer 19
1176
+ assert_scanned '?\\u0001', :tCHARACTER, "\u0001", [0, 7]
1177
+ end
1178
+ end
1179
+
1180
+ def test_question_eh_single_unicode_point
1181
+ if RUBY_VERSION >= '1.9'
1182
+ setup_lexer 19
1183
+ assert_scanned '?\\u{123}', :tCHARACTER, "\u0123", [0, 8]
1184
+
1185
+ setup_lexer 19
1186
+ assert_scanned '?\\u{a}', :tCHARACTER, "\n", [0, 6]
1187
+ end
1188
+ end
1189
+
1190
+ def test_question_eh_multiple_unicode_points
1191
+ setup_lexer 19
1192
+ refute_scanned '?\\u{1 2 3}'
1193
+
1194
+ setup_lexer 19
1195
+ refute_scanned '?\\u{a b}'
1196
+ end
1197
+
1198
+ def test_question_eh_escape_u_unclosed_bracket
1199
+ setup_lexer 19
1200
+
1201
+ refute_scanned '?\\u{123'
1202
+ end
1203
+
1204
+ def test_integer_hex
1205
+ assert_scanned "0x2a", :tINTEGER, 42, [0, 4]
1206
+ end
1207
+
1208
+ def test_integer_hex_bad_none
1209
+ refute_scanned "0x "
1210
+ end
1211
+
1212
+ def test_integer_hex_bad_underscores
1213
+ refute_scanned "0xab__cd"
1214
+ end
1215
+
1216
+ def test_integer_oct
1217
+ assert_scanned "052", :tINTEGER, 42, [0, 3]
1218
+ end
1219
+
1220
+ def test_integer_oct_bad_range
1221
+ refute_scanned "08"
1222
+ end
1223
+
1224
+ def test_integer_oct_bad_underscores
1225
+ refute_scanned "01__23"
1226
+ end
1227
+
1228
+ def test_integer_oct_O
1229
+ assert_scanned "0O52", :tINTEGER, 42, [0, 4]
1230
+ end
1231
+
1232
+ def test_integer_oct_O_bad_range
1233
+ refute_scanned "0O1238"
1234
+ end
1235
+
1236
+ def test_integer_oct_O_bad_underscores
1237
+ refute_scanned "0O1__23"
1238
+ end
1239
+
1240
+ def test_integer_oct_O_not_bad_none
1241
+ assert_scanned "0O ", :tINTEGER, 0, [0, 2]
1242
+ end
1243
+
1244
+ def test_integer_oct_o
1245
+ assert_scanned "0o52", :tINTEGER, 42, [0, 4]
1246
+ end
1247
+
1248
+ def test_integer_oct_o_bad_range
1249
+ refute_scanned "0o1283"
1250
+ end
1251
+
1252
+ def test_integer_oct_o_bad_underscores
1253
+ refute_scanned "0o1__23"
1254
+ end
1255
+
1256
+ def test_integer_oct_o_not_bad_none
1257
+ assert_scanned "0o ", :tINTEGER, 0, [0, 2]
1258
+ end
1259
+
1260
+ def test_integer_trailing
1261
+ assert_scanned("1.to_s",
1262
+ :tINTEGER, 1, [0, 1],
1263
+ :tDOT, '.', [1, 2],
1264
+ :tIDENTIFIER, 'to_s', [2, 6])
1265
+ end
1266
+
1267
+ def test_integer_underscore
1268
+ assert_scanned "4_2", :tINTEGER, 42, [0, 3]
1269
+ end
1270
+
1271
+ def test_integer_underscore_bad
1272
+ refute_scanned "4__2"
1273
+ end
1274
+
1275
+ def test_integer_zero
1276
+ assert_scanned "0", :tINTEGER, 0, [0, 1]
1277
+ end
1278
+
1279
+ def test_ivar
1280
+ assert_scanned "@blah", :tIVAR, "@blah", [0, 5]
1281
+ end
1282
+
1283
+ def test_ivar_bad
1284
+ refute_scanned "@1"
1285
+ end
1286
+
1287
+ def test_ivar_bad_0_length
1288
+ refute_scanned "1+@\n", :tINTEGER, 1, [0, 1], :tPLUS, "+", [1, 2]
1289
+ end
1290
+
1291
+ def test_keyword_expr
1292
+ @lex.state = :expr_endarg
1293
+
1294
+ assert_scanned "if", :kIF_MOD, "if", [0, 2]
1295
+
1296
+ assert_equal :expr_beg, @lex.state
1297
+ end
1298
+
1299
+ def test_lt
1300
+ assert_scanned "<", :tLT, "<", [0, 1]
1301
+ end
1302
+
1303
+ def test_lt2
1304
+ assert_scanned("a <\< b",
1305
+ :tIDENTIFIER, "a", [0, 1],
1306
+ :tLSHFT, "<\<", [2, 4],
1307
+ :tIDENTIFIER, "b", [5, 6])
1308
+
1309
+ end
1310
+
1311
+ def test_lt2_equals
1312
+ assert_scanned("a <\<= b",
1313
+ :tIDENTIFIER, "a", [0, 1],
1314
+ :tOP_ASGN, "<\<", [2, 5],
1315
+ :tIDENTIFIER, "b", [6, 7])
1316
+ end
1317
+
1318
+ def test_lt_equals
1319
+ assert_scanned "<=", :tLEQ, "<=", [0, 2]
1320
+ end
1321
+
1322
+ def test_minus
1323
+ assert_scanned("1 - 2",
1324
+ :tINTEGER, 1, [0, 1],
1325
+ :tMINUS, "-", [2, 3],
1326
+ :tINTEGER, 2, [4, 5])
1327
+ end
1328
+
1329
+ def test_minus_equals
1330
+ @lex.state = :expr_end
1331
+
1332
+ assert_scanned "-=", :tOP_ASGN, "-", [0, 2]
1333
+ end
1334
+
1335
+ def test_minus_method
1336
+ @lex.state = :expr_fname
1337
+ assert_scanned "-", :tMINUS, "-", [0, 1]
1338
+ end
1339
+
1340
+ def test_minus_unary_method
1341
+ @lex.state = :expr_fname
1342
+ assert_scanned "-@", :tUMINUS, "-@", [0, 2]
1343
+ end
1344
+
1345
+ def test_minus_unary_number
1346
+ assert_scanned("-42",
1347
+ :tUNARY_NUM, "-", [0, 1],
1348
+ :tINTEGER, 42, [1, 3])
1349
+ end
1350
+
1351
+ def test_minus_unary_whitespace_number
1352
+ assert_scanned("- 42",
1353
+ :tUNARY_NUM, "-", [0, 1],
1354
+ :tINTEGER, 42, [2, 4])
1355
+ end
1356
+
1357
+ def test_nth_ref
1358
+ assert_scanned('[$1, $2, $3]',
1359
+ :tLBRACK, "[", [0, 1],
1360
+ :tNTH_REF, 1, [1, 3], :tCOMMA, ",", [3, 4],
1361
+ :tNTH_REF, 2, [5, 7], :tCOMMA, ",", [7, 8],
1362
+ :tNTH_REF, 3, [9, 11],
1363
+ :tRBRACK, "]", [11, 12])
1364
+ end
1365
+
1366
+ def test_open_bracket
1367
+ assert_scanned("(", :tLPAREN, "(", [0, 1])
1368
+ end
1369
+
1370
+ def test_open_bracket_cmdarg
1371
+ assert_scanned("m (", :tIDENTIFIER, "m", [0, 1],
1372
+ :tLPAREN_ARG, "(", [2, 3])
1373
+ end
1374
+
1375
+ def test_open_bracket_exprarg
1376
+ assert_scanned("m(", :tIDENTIFIER, "m", [0, 1],
1377
+ :tLPAREN2, "(", [1, 2])
1378
+ end
1379
+
1380
+ def test_open_curly_bracket
1381
+ assert_scanned("{",
1382
+ :tLBRACE, "{", [0, 1])
1383
+ end
1384
+
1385
+ def test_open_curly_bracket_arg
1386
+ assert_scanned("m { 3 }",
1387
+ :tIDENTIFIER, "m", [0, 1],
1388
+ :tLCURLY, "{", [2, 3],
1389
+ :tINTEGER, 3, [4, 5],
1390
+ :tRCURLY, "}", [6, 7])
1391
+ end
1392
+
1393
+ def test_open_curly_bracket_block
1394
+ @lex.state = :expr_endarg # seen m(3)
1395
+
1396
+ assert_scanned("{ 4 }",
1397
+ :tLBRACE_ARG, "{", [0, 1],
1398
+ :tINTEGER, 4, [2, 3],
1399
+ :tRCURLY, "}", [4, 5])
1400
+ end
1401
+
1402
+ def test_open_square_bracket_arg
1403
+ assert_scanned("m [ 3 ]",
1404
+ :tIDENTIFIER, "m", [0, 1],
1405
+ :tLBRACK, "[", [2, 3],
1406
+ :tINTEGER, 3, [4, 5],
1407
+ :tRBRACK, "]", [6, 7])
1408
+ end
1409
+
1410
+ def test_open_square_bracket_ary
1411
+ assert_scanned("[1, 2, 3]",
1412
+ :tLBRACK, "[", [0, 1],
1413
+ :tINTEGER, 1, [1, 2],
1414
+ :tCOMMA, ",", [2, 3],
1415
+ :tINTEGER, 2, [4, 5],
1416
+ :tCOMMA, ",", [5, 6],
1417
+ :tINTEGER, 3, [7, 8],
1418
+ :tRBRACK, "]", [8, 9])
1419
+ end
1420
+
1421
+ def test_open_square_bracket_meth
1422
+ assert_scanned("m[3]",
1423
+ :tIDENTIFIER, "m", [0, 1],
1424
+ :tLBRACK2, "[", [1, 2],
1425
+ :tINTEGER, 3, [2, 3],
1426
+ :tRBRACK, "]", [3, 4])
1427
+ end
1428
+
1429
+ def test_or
1430
+ assert_scanned "|", :tPIPE, "|", [0, 1]
1431
+ end
1432
+
1433
+ def test_or2
1434
+ assert_scanned "||", :tOROP, "||", [0, 2]
1435
+ end
1436
+
1437
+ def test_or2_equals
1438
+ assert_scanned "||=", :tOP_ASGN, "||", [0, 3]
1439
+ end
1440
+
1441
+ def test_or_equals
1442
+ assert_scanned "|=", :tOP_ASGN, "|", [0, 2]
1443
+ end
1444
+
1445
+ def test_percent
1446
+ assert_scanned("a % 2",
1447
+ :tIDENTIFIER, "a", [0, 1],
1448
+ :tPERCENT, "%", [2, 3],
1449
+ :tINTEGER, 2, [4, 5])
1450
+ end
1451
+
1452
+ def test_percent_equals
1453
+ assert_scanned("a %= 2",
1454
+ :tIDENTIFIER, "a", [0, 1],
1455
+ :tOP_ASGN, "%", [2, 4],
1456
+ :tINTEGER, 2, [5, 6])
1457
+ end
1458
+
1459
+ def test_plus
1460
+ assert_scanned("1 + 1",
1461
+ :tINTEGER, 1, [0, 1],
1462
+ :tPLUS, "+", [2, 3],
1463
+ :tINTEGER, 1, [4, 5])
1464
+ end
1465
+
1466
+ def test_plus_equals
1467
+ @lex.state = :expr_end
1468
+
1469
+ assert_scanned "+=", :tOP_ASGN, "+", [0, 2]
1470
+ end
1471
+
1472
+ def test_plus_method
1473
+ @lex.state = :expr_fname
1474
+ assert_scanned "+", :tPLUS, "+", [0, 1]
1475
+ end
1476
+
1477
+ def test_plus_unary_method
1478
+ @lex.state = :expr_fname
1479
+ assert_scanned "+@", :tUPLUS, "+@", [0, 2]
1480
+ end
1481
+
1482
+ def test_plus_unary_number
1483
+ assert_scanned("+42",
1484
+ :tUNARY_NUM, "+", [0, 1],
1485
+ :tINTEGER, 42, [1, 3])
1486
+ end
1487
+
1488
+ def test_plus_unary_whitespace_number
1489
+ assert_scanned("+ 42",
1490
+ :tUNARY_NUM, "+", [0, 1],
1491
+ :tINTEGER, 42, [2, 4])
1492
+ end
1493
+
1494
+ def test_numbers
1495
+ assert_scanned "0b10", :tINTEGER, 2, [0, 4]
1496
+ assert_scanned "0B10", :tINTEGER, 2, [0, 4]
1497
+
1498
+ assert_scanned "0d10", :tINTEGER, 10, [0, 4]
1499
+ assert_scanned "0D10", :tINTEGER, 10, [0, 4]
1500
+
1501
+ assert_scanned "0x10", :tINTEGER, 16, [0, 4]
1502
+ assert_scanned "0X10", :tINTEGER, 16, [0, 4]
1503
+
1504
+ assert_scanned "0o10", :tINTEGER, 8, [0, 4]
1505
+ assert_scanned "0O10", :tINTEGER, 8, [0, 4]
1506
+ assert_scanned "0o", :tINTEGER, 0, [0, 2]
1507
+ assert_scanned "0O", :tINTEGER, 0, [0, 2]
1508
+
1509
+ assert_scanned "0o", :tINTEGER, 0, [0, 2]
1510
+ assert_scanned "0O", :tINTEGER, 0, [0, 2]
1511
+
1512
+ assert_scanned "0777_333", :tINTEGER, 261851, [0, 8]
1513
+
1514
+ assert_scanned "0", :tINTEGER, 0, [0, 1]
1515
+
1516
+ refute_scanned "0x"
1517
+ refute_scanned "0X"
1518
+ refute_scanned "0b"
1519
+ refute_scanned "0B"
1520
+ refute_scanned "0d"
1521
+ refute_scanned "0D"
1522
+
1523
+ refute_scanned "08"
1524
+ refute_scanned "09"
1525
+ refute_scanned "0o8"
1526
+ refute_scanned "0o9"
1527
+ refute_scanned "0O8"
1528
+ refute_scanned "0O9"
1529
+
1530
+ refute_scanned "1_e1"
1531
+ refute_scanned "1_.1"
1532
+ refute_scanned "1__1"
1533
+
1534
+ refute_scanned "1end"
1535
+ refute_scanned "1.1end"
1536
+ end
1537
+
1538
+ def test_question__18
1539
+ setup_lexer 18
1540
+
1541
+ assert_scanned "?*", :tINTEGER, 42, [0, 2]
1542
+ end
1543
+
1544
+ def test_question__19
1545
+ setup_lexer 19
1546
+
1547
+ assert_scanned "?*", :tCHARACTER, "*", [0, 2]
1548
+ end
1549
+
1550
+ def test_question_bad_eos
1551
+ refute_scanned "?"
1552
+ end
1553
+
1554
+ def test_question_bad_ws
1555
+ assert_scanned "? ", :tEH, "?", [0, 1]
1556
+ assert_scanned "?\n", :tEH, "?", [0, 1]
1557
+ assert_scanned "?\t", :tEH, "?", [0, 1]
1558
+ assert_scanned "?\v", :tEH, "?", [0, 1]
1559
+ assert_scanned "?\r", :tEH, "?", [0, 1]
1560
+ assert_scanned "?\f", :tEH, "?", [0, 1]
1561
+ end
1562
+
1563
+ def test_question_ws_backslashed__18
1564
+ setup_lexer 18
1565
+
1566
+ @lex.state = :expr_beg
1567
+ assert_scanned "?\\ ", :tINTEGER, 32, [0, 3]
1568
+ @lex.state = :expr_beg
1569
+ assert_scanned "?\\n", :tINTEGER, 10, [0, 3]
1570
+ @lex.state = :expr_beg
1571
+ assert_scanned "?\\t", :tINTEGER, 9, [0, 3]
1572
+ @lex.state = :expr_beg
1573
+ assert_scanned "?\\v", :tINTEGER, 11, [0, 3]
1574
+ @lex.state = :expr_beg
1575
+ assert_scanned "?\\r", :tINTEGER, 13, [0, 3]
1576
+ @lex.state = :expr_beg
1577
+ assert_scanned "?\\f", :tINTEGER, 12, [0, 3]
1578
+ end
1579
+
1580
+ def test_question_ws_backslashed__19
1581
+ setup_lexer 19
1582
+
1583
+ @lex.state = :expr_beg
1584
+ assert_scanned "?\\ ", :tCHARACTER, " ", [0, 3]
1585
+ @lex.state = :expr_beg
1586
+ assert_scanned "?\\n", :tCHARACTER, "\n", [0, 3]
1587
+ @lex.state = :expr_beg
1588
+ assert_scanned "?\\t", :tCHARACTER, "\t", [0, 3]
1589
+ @lex.state = :expr_beg
1590
+ assert_scanned "?\\v", :tCHARACTER, "\v", [0, 3]
1591
+ @lex.state = :expr_beg
1592
+ assert_scanned "?\\r", :tCHARACTER, "\r", [0, 3]
1593
+ @lex.state = :expr_beg
1594
+ assert_scanned "?\\f", :tCHARACTER, "\f", [0, 3]
1595
+ end
1596
+
1597
+ def test_rbracket
1598
+ assert_scanned "]", :tRBRACK, "]", [0, 1]
1599
+ end
1600
+
1601
+ def test_rcurly
1602
+ assert_scanned "}", :tRCURLY, "}", [0, 1]
1603
+ end
1604
+
1605
+ def test_regexp
1606
+ assert_scanned("/regexp/",
1607
+ :tREGEXP_BEG, "/", [0, 1],
1608
+ :tSTRING_CONTENT, "regexp", [1, 7],
1609
+ :tSTRING_END, "/", [7, 8],
1610
+ :tREGEXP_OPT, "", [8, 8])
1611
+ end
1612
+
1613
+ def test_regexp_ambiguous
1614
+ assert_scanned("method /regexp/",
1615
+ :tIDENTIFIER, "method", [0, 6],
1616
+ :tREGEXP_BEG, "/", [7, 8],
1617
+ :tSTRING_CONTENT, "regexp", [8, 14],
1618
+ :tSTRING_END, "/", [14, 15],
1619
+ :tREGEXP_OPT, "", [15, 15])
1620
+ end
1621
+
1622
+ def test_regexp_bad
1623
+ refute_scanned("/.*/xyz",
1624
+ :tREGEXP_BEG, "/", [0, 1],
1625
+ :tSTRING_CONTENT, ".*", [1, 3],
1626
+ :tSTRING_END, "/", [3, 4])
1627
+ end
1628
+
1629
+ def test_regexp_escape_C
1630
+ assert_scanned('/regex\\C-x/',
1631
+ :tREGEXP_BEG, "/", [0, 1],
1632
+ :tSTRING_CONTENT, "regex\\C-x", [1, 10],
1633
+ :tSTRING_END, "/", [10, 11],
1634
+ :tREGEXP_OPT, "", [11, 11])
1635
+ end
1636
+
1637
+ def test_regexp_escape_C_M
1638
+ assert_scanned('/regex\\C-\\M-x/',
1639
+ :tREGEXP_BEG, "/", [0, 1],
1640
+ :tSTRING_CONTENT, "regex\\C-\\M-x", [1, 13],
1641
+ :tSTRING_END, "/", [13, 14],
1642
+ :tREGEXP_OPT, "", [14, 14])
1643
+ end
1644
+
1645
+ def test_regexp_escape_C_M_craaaazy
1646
+ assert_scanned("/regex\\C-\\\n\\M-x/",
1647
+ :tREGEXP_BEG, "/", [0, 1],
1648
+ :tSTRING_CONTENT, "regex\\C-\\M-x", [1, 15],
1649
+ :tSTRING_END, "/", [15, 16],
1650
+ :tREGEXP_OPT, "", [16, 16])
1651
+ end
1652
+
1653
+ def test_regexp_escape_C_bad_dash
1654
+ refute_scanned '/regex\\Cx/', :tREGEXP_BEG, "/", [0, 1]
1655
+ end
1656
+
1657
+ def test_regexp_escape_C_bad_dash_eos
1658
+ refute_scanned '/regex\\C-/', :tREGEXP_BEG, "/", [0, 1]
1659
+ end
1660
+
1661
+ def test_regexp_escape_C_bad_dash_eos2
1662
+ refute_scanned '/regex\\C-', :tREGEXP_BEG, "/", [0, 1]
1663
+ end
1664
+
1665
+ def test_regexp_escape_C_bad_eos
1666
+ refute_scanned '/regex\\C/', :tREGEXP_BEG, "/", [0, 1]
1667
+ end
1668
+
1669
+ def test_regexp_escape_C_bad_eos2
1670
+ refute_scanned '/regex\\c', :tREGEXP_BEG, "/", [0, 1]
1671
+ end
1672
+
1673
+ def test_regexp_escape_M
1674
+ assert_scanned('/regex\\M-x/',
1675
+ :tREGEXP_BEG, "/", [0, 1],
1676
+ :tSTRING_CONTENT, "regex\\M-x", [1, 10],
1677
+ :tSTRING_END, "/", [10, 11],
1678
+ :tREGEXP_OPT, "", [11, 11])
1679
+ end
1680
+
1681
+ def test_regexp_escape_M_C
1682
+ assert_scanned('/regex\\M-\\C-x/',
1683
+ :tREGEXP_BEG, "/", [0, 1],
1684
+ :tSTRING_CONTENT, "regex\\M-\\C-x", [1, 13],
1685
+ :tSTRING_END, "/", [13, 14],
1686
+ :tREGEXP_OPT, "", [14, 14])
1687
+ end
1688
+
1689
+ def test_regexp_escape_M_bad_dash
1690
+ refute_scanned '/regex\\Mx/', :tREGEXP_BEG, "/", [0, 1]
1691
+ end
1692
+
1693
+ def test_regexp_escape_M_bad_dash_eos
1694
+ refute_scanned '/regex\\M-/', :tREGEXP_BEG, "/", [0, 1]
1695
+ end
1696
+
1697
+ def test_regexp_escape_M_bad_dash_eos2
1698
+ refute_scanned '/regex\\M-', :tREGEXP_BEG, "/", [0, 1]
1699
+ end
1700
+
1701
+ def test_regexp_escape_M_bad_eos
1702
+ refute_scanned '/regex\\M/', :tREGEXP_BEG, "/", [0, 1]
1703
+ end
1704
+
1705
+ def test_regexp_escape_backslash_slash
1706
+ assert_scanned('/\\//',
1707
+ :tREGEXP_BEG, "/", [0, 1],
1708
+ :tSTRING_CONTENT, '/', [1, 3],
1709
+ :tSTRING_END, "/", [3, 4],
1710
+ :tREGEXP_OPT, "", [4, 4])
1711
+ end
1712
+
1713
+ def test_regexp_escape_backslash_terminator
1714
+ assert_scanned('%r%blah\\%blah%',
1715
+ :tREGEXP_BEG, "%r%", [0, 3],
1716
+ :tSTRING_CONTENT, "blah%blah", [3, 13],
1717
+ :tSTRING_END, "%", [13, 14],
1718
+ :tREGEXP_OPT, "", [14, 14])
1719
+ end
1720
+
1721
+ def test_regexp_escape_backslash_terminator_meta1
1722
+ assert_scanned('%r{blah\\}blah}',
1723
+ :tREGEXP_BEG, "%r{", [0, 3],
1724
+ :tSTRING_CONTENT, "blah\\}blah", [3, 13],
1725
+ :tSTRING_END, "}", [13, 14],
1726
+ :tREGEXP_OPT, "", [14, 14])
1727
+ end
1728
+
1729
+ def test_regexp_escape_backslash_terminator_meta2
1730
+ assert_scanned('%r/blah\\/blah/',
1731
+ :tREGEXP_BEG, "%r/", [0, 3],
1732
+ :tSTRING_CONTENT, "blah/blah", [3, 13],
1733
+ :tSTRING_END, "/", [13, 14],
1734
+ :tREGEXP_OPT, "", [14, 14])
1735
+ end
1736
+
1737
+ def test_regexp_escape_backslash_terminator_meta3
1738
+ assert_scanned('%r/blah\\%blah/',
1739
+ :tREGEXP_BEG, "%r/", [0, 3],
1740
+ :tSTRING_CONTENT, "blah\\%blah", [3, 13],
1741
+ :tSTRING_END, "/", [13, 14],
1742
+ :tREGEXP_OPT, "", [14, 14])
1743
+ end
1744
+
1745
+ def test_regexp_escape_bad_eos
1746
+ refute_scanned '/regex\\', :tREGEXP_BEG, "/", [0, 1]
1747
+ end
1748
+
1749
+ def test_regexp_escape_bs
1750
+ assert_scanned('/regex\\\\regex/',
1751
+ :tREGEXP_BEG, "/", [0, 1],
1752
+ :tSTRING_CONTENT, "regex\\\\regex", [1, 13],
1753
+ :tSTRING_END, "/", [13, 14],
1754
+ :tREGEXP_OPT, "", [14, 14])
1755
+ end
1756
+
1757
+ def test_regexp_escape_c
1758
+ assert_scanned('/regex\\cxxx/',
1759
+ :tREGEXP_BEG, "/", [0, 1],
1760
+ :tSTRING_CONTENT, "regex\\cxxx", [1, 11],
1761
+ :tSTRING_END, "/", [11, 12],
1762
+ :tREGEXP_OPT, "", [12, 12])
1763
+ end
1764
+
1765
+ def test_regexp_escape_c_backslash
1766
+ assert_scanned('/regex\\c\\n/',
1767
+ :tREGEXP_BEG, "/", [0, 1],
1768
+ :tSTRING_CONTENT, "regex\\c\\n", [1, 10],
1769
+ :tSTRING_END, "/", [10, 11],
1770
+ :tREGEXP_OPT, "", [11, 11])
1771
+ end
1772
+
1773
+ def test_regexp_escape_chars
1774
+ assert_scanned('/re\\tge\\nxp/',
1775
+ :tREGEXP_BEG, "/", [0, 1],
1776
+ :tSTRING_CONTENT, "re\\tge\\nxp", [1, 11],
1777
+ :tSTRING_END, "/", [11, 12],
1778
+ :tREGEXP_OPT, "", [12, 12])
1779
+ end
1780
+
1781
+ def test_regexp_escape_double_backslash
1782
+ assert_scanned('/[\\/\\\\]$/',
1783
+ :tREGEXP_BEG, "/", [0, 1],
1784
+ :tSTRING_CONTENT,'[/\\\\]$', [1, 8],
1785
+ :tSTRING_END, "/", [8, 9],
1786
+ :tREGEXP_OPT, "", [9, 9])
1787
+ end
1788
+
1789
+ def test_regexp_escape_hex
1790
+ assert_scanned('/regex\\x61xp/',
1791
+ :tREGEXP_BEG, "/", [0, 1],
1792
+ :tSTRING_CONTENT, "regex\\x61xp", [1, 12],
1793
+ :tSTRING_END, "/", [12, 13],
1794
+ :tREGEXP_OPT, "", [13, 13])
1795
+ end
1796
+
1797
+ def test_regexp_escape_hex_bad
1798
+ refute_scanned '/regex\\xzxp/', :tREGEXP_BEG, "/", [0, 1]
1799
+ end
1800
+
1801
+ def test_regexp_escape_hex_one
1802
+ assert_scanned('/^[\\xd\\xa]{2}/on',
1803
+ :tREGEXP_BEG, '/', [0, 1],
1804
+ :tSTRING_CONTENT, '^[\\xd\\xa]{2}', [1, 13],
1805
+ :tSTRING_END, "/", [13, 14],
1806
+ :tREGEXP_OPT, 'on', [14, 16])
1807
+ end
1808
+
1809
+ def test_regexp_escape_oct1
1810
+ assert_scanned('/regex\\0xp/',
1811
+ :tREGEXP_BEG, "/", [0, 1],
1812
+ :tSTRING_CONTENT, "regex\\0xp", [1, 10],
1813
+ :tSTRING_END, "/", [10, 11],
1814
+ :tREGEXP_OPT, "", [11, 11])
1815
+ end
1816
+
1817
+ def test_regexp_escape_oct2
1818
+ assert_scanned('/regex\\07xp/',
1819
+ :tREGEXP_BEG, "/", [0, 1],
1820
+ :tSTRING_CONTENT, "regex\\07xp", [1, 11],
1821
+ :tSTRING_END, "/", [11, 12],
1822
+ :tREGEXP_OPT, "", [12, 12])
1823
+ end
1824
+
1825
+ def test_regexp_escape_oct3
1826
+ assert_scanned('/regex\\10142/',
1827
+ :tREGEXP_BEG, "/", [0, 1],
1828
+ :tSTRING_CONTENT, "regex\\10142", [1, 12],
1829
+ :tSTRING_END, "/", [12, 13],
1830
+ :tREGEXP_OPT, "", [13, 13])
1831
+ end
1832
+
1833
+ def test_regexp_escape_return
1834
+ assert_scanned("/regex\\\nregex/",
1835
+ :tREGEXP_BEG, "/", [0, 1],
1836
+ :tSTRING_CONTENT, "regexregex", [1, 13],
1837
+ :tSTRING_END, "/", [13, 14],
1838
+ :tREGEXP_OPT, "", [14, 14])
1839
+ end
1840
+
1841
+ def test_regexp_escape_delimiter_meta
1842
+ assert_scanned("%r(\\))",
1843
+ :tREGEXP_BEG, "%r(", [0, 3],
1844
+ :tSTRING_CONTENT, "\\)", [3, 5],
1845
+ :tSTRING_END, ")", [5, 6],
1846
+ :tREGEXP_OPT, "", [6, 6])
1847
+ end
1848
+
1849
+ def test_regexp_escape_delimiter_nonmeta
1850
+ assert_scanned("%r'\\''",
1851
+ :tREGEXP_BEG, "%r'", [0, 3],
1852
+ :tSTRING_CONTENT, "'", [3, 5],
1853
+ :tSTRING_END, "'", [5, 6],
1854
+ :tREGEXP_OPT, "", [6, 6])
1855
+ end
1856
+
1857
+ def test_regexp_escape_other_meta
1858
+ assert_scanned("/\\.\\$\\*\\+\\.\\?\\|/",
1859
+ :tREGEXP_BEG, "/", [0, 1],
1860
+ :tSTRING_CONTENT, "\\.\\$\\*\\+\\.\\?\\|", [1, 15],
1861
+ :tSTRING_END, "/", [15, 16],
1862
+ :tREGEXP_OPT, "", [16, 16])
1863
+ end
1864
+
1865
+ def test_regexp_nm
1866
+ assert_scanned("/.*/nm",
1867
+ :tREGEXP_BEG, "/", [0, 1],
1868
+ :tSTRING_CONTENT, ".*", [1, 3],
1869
+ :tSTRING_END, "/", [3, 4],
1870
+ :tREGEXP_OPT, "nm", [4, 6])
1871
+ end
1872
+
1873
+ def test_rparen
1874
+ assert_scanned ")", :tRPAREN, ")", [0, 1]
1875
+ end
1876
+
1877
+ def test_rshft
1878
+ assert_scanned("a >> 2",
1879
+ :tIDENTIFIER, "a", [0, 1],
1880
+ :tRSHFT, ">>", [2, 4],
1881
+ :tINTEGER, 2, [5, 6])
1882
+ end
1883
+
1884
+ def test_rshft_equals
1885
+ assert_scanned("a >>= 2",
1886
+ :tIDENTIFIER, "a", [0, 1],
1887
+ :tOP_ASGN, ">>", [2, 5],
1888
+ :tINTEGER, 2, [6, 7])
1889
+ end
1890
+
1891
+ def test_star
1892
+ assert_scanned("a * ",
1893
+ :tIDENTIFIER, "a", [0, 1],
1894
+ :tSTAR2, "*", [2, 3])
1895
+
1896
+ assert_equal :expr_beg, @lex.state
1897
+ end
1898
+
1899
+ def test_star2
1900
+ assert_scanned("a ** ",
1901
+ :tIDENTIFIER, "a", [0, 1],
1902
+ :tPOW, "**", [2, 4])
1903
+
1904
+ assert_equal :expr_beg, @lex.state
1905
+ end
1906
+
1907
+ def test_star2_equals
1908
+ assert_scanned("a **= ",
1909
+ :tIDENTIFIER, "a", [0, 1],
1910
+ :tOP_ASGN, "**", [2, 5])
1911
+
1912
+ assert_equal :expr_beg, @lex.state
1913
+ end
1914
+
1915
+ def test_star2_beg
1916
+ assert_scanned("** ",
1917
+ :tDSTAR, "**", [0, 2])
1918
+
1919
+ assert_equal :expr_beg, @lex.state
1920
+ end
1921
+
1922
+ def test_star_arg
1923
+ @lex.state = :expr_arg
1924
+
1925
+ assert_scanned(" *a",
1926
+ :tSTAR, "*", [1, 2],
1927
+ :tIDENTIFIER, "a", [2, 3])
1928
+
1929
+ assert_equal :expr_arg, @lex.state
1930
+ end
1931
+
1932
+ def test_star_arg_beg
1933
+ @lex.state = :expr_beg
1934
+
1935
+ assert_scanned("*a",
1936
+ :tSTAR, "*", [0, 1],
1937
+ :tIDENTIFIER, "a", [1, 2])
1938
+
1939
+ assert_equal :expr_arg, @lex.state
1940
+ end
1941
+
1942
+ def test_star_arg_beg_fname
1943
+ @lex.state = :expr_fname
1944
+
1945
+ assert_scanned("*a",
1946
+ :tSTAR2, "*", [0, 1],
1947
+ :tIDENTIFIER, "a", [1, 2])
1948
+
1949
+ assert_equal :expr_arg, @lex.state
1950
+ end
1951
+
1952
+ def test_star_equals
1953
+ assert_scanned("a *= ",
1954
+ :tIDENTIFIER, "a", [0, 1],
1955
+ :tOP_ASGN, "*", [2, 4])
1956
+
1957
+ assert_equal :expr_beg, @lex.state
1958
+ end
1959
+
1960
+ def test_string_bad_eos
1961
+ refute_scanned('%',
1962
+ :tSTRING_BEG, '%', [0, 1])
1963
+ end
1964
+
1965
+ def test_string_bad_eos_quote
1966
+ refute_scanned('%{nest',
1967
+ :tSTRING_BEG, '%}', [0, 2])
1968
+ end
1969
+
1970
+ def test_string_double
1971
+ assert_scanned('"string"',
1972
+ :tSTRING, "string", [0, 8])
1973
+ end
1974
+
1975
+ def test_string_double_escape_C
1976
+ assert_scanned('"\\C-a"',
1977
+ :tSTRING, "\001", [0, 6])
1978
+ end
1979
+
1980
+ def test_string_double_escape_C_backslash
1981
+ assert_scanned('"\\C-\\\\"',
1982
+ :tSTRING, "\034", [0, 7])
1983
+ end
1984
+
1985
+ def test_string_double_escape_C_escape
1986
+ assert_scanned('"\\C-\\M-a"',
1987
+ :tSTRING, "\201", [0, 9])
1988
+ end
1989
+
1990
+ def test_string_double_escape_C_question
1991
+ assert_scanned('"\\C-?"',
1992
+ :tSTRING, "\177", [0, 6])
1993
+ end
1994
+
1995
+ def test_string_double_escape_M
1996
+ assert_scanned('"\\M-a"',
1997
+ :tSTRING, "\341", [0, 6])
1998
+ end
1999
+
2000
+ def test_string_double_escape_M_backslash
2001
+ assert_scanned('"\\M-\\\\"',
2002
+ :tSTRING, "\334", [0, 7])
2003
+ end
2004
+
2005
+ def test_string_double_escape_M_escape
2006
+ assert_scanned('"\\M-\\C-a"',
2007
+ :tSTRING, "\201", [0, 9])
2008
+ end
2009
+
2010
+ def test_string_double_escape_bs1
2011
+ assert_scanned('"a\\a\\a"',
2012
+ :tSTRING, "a\a\a", [0, 7])
2013
+ end
2014
+
2015
+ def test_string_double_escape_bs2
2016
+ assert_scanned('"a\\\\a"',
2017
+ :tSTRING, "a\\a", [0, 6])
2018
+ end
2019
+
2020
+ def test_string_double_escape_c
2021
+ assert_scanned('"\\ca"',
2022
+ :tSTRING, "\001", [0, 5])
2023
+ end
2024
+
2025
+ def test_string_double_escape_c_escape
2026
+ assert_scanned('"\\c\\M-a"',
2027
+ :tSTRING, "\201", [0, 8])
2028
+ end
2029
+
2030
+ def test_string_double_escape_c_question
2031
+ assert_scanned('"\\c?"',
2032
+ :tSTRING, "\177", [0, 5])
2033
+ end
2034
+
2035
+ def test_string_double_escape_chars
2036
+ assert_scanned('"s\\tri\\ng"',
2037
+ :tSTRING, "s\tri\ng", [0, 10])
2038
+ end
2039
+
2040
+ def test_string_double_escape_hex
2041
+ assert_scanned('"n = \\x61\\x62\\x63"',
2042
+ :tSTRING, "n = abc", [0, 18])
2043
+ end
2044
+
2045
+ def test_string_double_escape_octal
2046
+ assert_scanned('"n = \\101\\102\\103"',
2047
+ :tSTRING, "n = ABC", [0, 18])
2048
+ end
2049
+
2050
+ def test_string_double_escape_octal_wrap
2051
+ assert_scanned('"\\753"',
2052
+ :tSTRING, "\xEB", [0, 6])
2053
+ end
2054
+
2055
+ def test_string_double_interp
2056
+ assert_scanned("\"blah #x a \#@a b \#$b c \#{3} # \"",
2057
+ :tSTRING_BEG, "\"", [0, 1],
2058
+ :tSTRING_CONTENT, "blah #x a ", [1, 11],
2059
+ :tSTRING_DVAR, nil, [11, 12],
2060
+ :tIVAR, "@a", [12, 14],
2061
+ :tSTRING_CONTENT, " b ", [14, 17],
2062
+ :tSTRING_DVAR, nil, [17, 18],
2063
+ :tGVAR, "$b", [18, 20],
2064
+ :tSTRING_CONTENT, " c ", [20, 23],
2065
+ :tSTRING_DBEG, '#{', [23, 25],
2066
+ :tINTEGER, 3, [25, 26],
2067
+ :tRCURLY, "}", [26, 27],
2068
+ :tSTRING_CONTENT, " # ", [27, 30],
2069
+ :tSTRING_END, "\"", [30, 31])
2070
+ end
2071
+
2072
+ def test_string_double_interp_label
2073
+ assert_scanned('"#{foo:bar}"',
2074
+ :tSTRING_BEG, '"', [0, 1],
2075
+ :tSTRING_DBEG, '#{', [1, 3],
2076
+ :tIDENTIFIER, 'foo', [3, 6],
2077
+ :tSYMBOL, 'bar', [6, 10],
2078
+ :tRCURLY, '}', [10, 11],
2079
+ :tSTRING_END, '"', [11, 12])
2080
+ end
2081
+
2082
+ def test_string_double_nested_curlies
2083
+ assert_scanned('%{nest{one{two}one}nest}',
2084
+ :tSTRING_BEG, '%{', [0, 2],
2085
+ :tSTRING_CONTENT, "nest{one{two}one}nest", [2, 23],
2086
+ :tSTRING_END, '}', [23, 24])
2087
+ end
2088
+
2089
+ def test_string_double_no_interp
2090
+ assert_scanned("\"# blah\"", # pound first
2091
+ :tSTRING, "# blah", [0, 8])
2092
+
2093
+ assert_scanned("\"blah # blah\"", # pound not first
2094
+ :tSTRING, "blah # blah", [0, 13])
2095
+ end
2096
+
2097
+ def test_string_escape_x_single
2098
+ assert_scanned('"\\x0"',
2099
+ :tSTRING, "\000", [0, 5])
2100
+ end
2101
+
2102
+ def test_string_pct_Q
2103
+ assert_scanned("%Q[s1 s2]",
2104
+ :tSTRING_BEG, '%Q[', [0, 3],
2105
+ :tSTRING_CONTENT, "s1 s2", [3, 8],
2106
+ :tSTRING_END, ']', [8, 9])
2107
+ end
2108
+
2109
+ def test_string_pct_W
2110
+ assert_scanned("%W[s1 s2\ns3]",
2111
+ :tWORDS_BEG, "%W[", [0, 3],
2112
+ :tSTRING_CONTENT, "s1", [3, 5],
2113
+ :tSPACE, nil, [5, 6],
2114
+ :tSTRING_CONTENT, "s2", [6, 8],
2115
+ :tSPACE, nil, [8, 9],
2116
+ :tSTRING_CONTENT, "s3", [9, 11],
2117
+ :tSPACE, nil, [11, 11],
2118
+ :tSTRING_END, ']', [11, 12])
2119
+ end
2120
+
2121
+ def test_string_pct_W_bs_nl
2122
+ assert_scanned("%W[s1 \\\ns2]",
2123
+ :tWORDS_BEG, "%W[", [0, 3],
2124
+ :tSTRING_CONTENT, "s1", [3, 5],
2125
+ :tSPACE, nil, [5, 6],
2126
+ :tSTRING_CONTENT, "\ns2", [6, 10],
2127
+ :tSPACE, nil, [10, 10],
2128
+ :tSTRING_END, ']', [10, 11])
2129
+ end
2130
+
2131
+ def test_string_pct_W_interp
2132
+ assert_scanned('%W[#{1}#{2} #@a]',
2133
+ :tWORDS_BEG, '%W[', [0, 3],
2134
+ :tSTRING_DBEG, '#{', [3, 5],
2135
+ :tINTEGER, 1, [5, 6],
2136
+ :tRCURLY, '}', [6, 7],
2137
+ :tSTRING_DBEG, '#{', [7, 9],
2138
+ :tINTEGER, 2, [9, 10],
2139
+ :tRCURLY, '}', [10, 11],
2140
+ :tSPACE, nil, [11, 12],
2141
+ :tSTRING_DVAR, nil, [12, 13],
2142
+ :tIVAR, '@a', [13, 15],
2143
+ :tSPACE, nil, [15, 15],
2144
+ :tSTRING_END, ']', [15, 16])
2145
+ end
2146
+
2147
+ def test_string_pct_I
2148
+ assert_scanned("%I(s1 s2)",
2149
+ :tSYMBOLS_BEG, "%I(", [0, 3],
2150
+ :tSTRING_CONTENT, "s1", [3, 5],
2151
+ :tSPACE, nil, [5, 6],
2152
+ :tSTRING_CONTENT, "s2", [6, 8],
2153
+ :tSPACE, nil, [8, 8],
2154
+ :tSTRING_END, ')', [8, 9])
2155
+ end
2156
+
2157
+ def test_string_pct_angle
2158
+ assert_scanned("%<blah>",
2159
+ :tSTRING_BEG, '%<', [0, 2],
2160
+ :tSTRING_CONTENT, "blah", [2, 6],
2161
+ :tSTRING_END, '>', [6, 7])
2162
+ end
2163
+
2164
+ def test_string_pct_pct
2165
+ assert_scanned("%%blah%",
2166
+ :tSTRING_BEG, '%%', [0, 2],
2167
+ :tSTRING_CONTENT, "blah", [2, 6],
2168
+ :tSTRING_END, '%', [6, 7])
2169
+ end
2170
+
2171
+ def test_string_pct_w
2172
+ assert_scanned("%w[s1 s2 ]",
2173
+ :tQWORDS_BEG, "%w[", [0, 3],
2174
+ :tSTRING_CONTENT, "s1", [3, 5],
2175
+ :tSPACE, nil, [5, 6],
2176
+ :tSTRING_CONTENT, "s2", [6, 8],
2177
+ :tSPACE, nil, [8, 9],
2178
+ :tSTRING_END, "]", [9, 10])
2179
+ end
2180
+
2181
+ def test_string_pct_w_incomplete
2182
+ refute_scanned("%w[s1 ",
2183
+ :tQWORDS_BEG, "%w[", [0, 3],
2184
+ :tSTRING_CONTENT, "s1", [3, 5],
2185
+ :tSPACE, nil, [5, 6])
2186
+ end
2187
+
2188
+ def test_string_pct_w_bs_nl
2189
+ assert_scanned("%w[s1 \\\ns2]",
2190
+ :tQWORDS_BEG, "%w[", [0, 3],
2191
+ :tSTRING_CONTENT, "s1", [3, 5],
2192
+ :tSPACE, nil, [5, 6],
2193
+ :tSTRING_CONTENT, "\ns2", [6, 10],
2194
+ :tSPACE, nil, [10, 10],
2195
+ :tSTRING_END, ']', [10, 11])
2196
+ end
2197
+
2198
+ def test_string_pct_w_bs_sp
2199
+ assert_scanned("%w[s\\ 1 s\\ 2]",
2200
+ :tQWORDS_BEG, "%w[", [0, 3],
2201
+ :tSTRING_CONTENT, "s 1", [3, 7],
2202
+ :tSPACE, nil, [7, 8],
2203
+ :tSTRING_CONTENT, "s 2", [8, 12],
2204
+ :tSPACE, nil, [12, 12],
2205
+ :tSTRING_END, ']', [12, 13])
2206
+ end
2207
+
2208
+ def test_string_pct_w_tab
2209
+ assert_scanned("%w[abc\tdef]",
2210
+ :tQWORDS_BEG, "%w[", [0, 3],
2211
+ :tSTRING_CONTENT, "abc", [3, 6],
2212
+ :tSPACE, nil, [6, 7],
2213
+ :tSTRING_CONTENT, "def", [7, 10],
2214
+ :tSPACE, nil, [10, 10],
2215
+ :tSTRING_END, ']', [10, 11])
2216
+ end
2217
+
2218
+ def test_string_pct_i
2219
+ assert_scanned("%i(s1 s2)",
2220
+ :tQSYMBOLS_BEG, "%i(", [0, 3],
2221
+ :tSTRING_CONTENT, "s1", [3, 5],
2222
+ :tSPACE, nil, [5, 6],
2223
+ :tSTRING_CONTENT, "s2", [6, 8],
2224
+ :tSPACE, nil, [8, 8],
2225
+ :tSTRING_END, ')', [8, 9])
2226
+ end
2227
+
2228
+ def test_string_pct_backslash
2229
+ assert_scanned("%\\a\\",
2230
+ :tSTRING_BEG, "%\\", [0, 2],
2231
+ :tSTRING_CONTENT, "a", [2, 3],
2232
+ :tSTRING_END, "\\", [3, 4])
2233
+ end
2234
+
2235
+ def test_string_pct_w_backslash
2236
+ assert_scanned("%w\\s1 s2 \\",
2237
+ :tQWORDS_BEG, "%w\\", [0, 3],
2238
+ :tSTRING_CONTENT, "s1", [3, 5],
2239
+ :tSPACE, nil, [5, 6],
2240
+ :tSTRING_CONTENT, "s2", [6, 8],
2241
+ :tSPACE, nil, [8, 9],
2242
+ :tSTRING_END, "\\", [9, 10])
2243
+ end
2244
+
2245
+ def test_string_pct_w_backslash_nl
2246
+ assert_scanned("%w\\s1 s2 \\\n",
2247
+ :tQWORDS_BEG, "%w\\", [0, 3],
2248
+ :tSTRING_CONTENT, "s1", [3, 5],
2249
+ :tSPACE, nil, [5, 6],
2250
+ :tSTRING_CONTENT, "s2", [6, 8],
2251
+ :tSPACE, nil, [8, 9],
2252
+ :tSTRING_END, "\\", [9, 10],
2253
+ :tNL, nil, [10, 11])
2254
+ end
2255
+
2256
+ def test_string_pct_w_backslash_interp_nl
2257
+ assert_scanned("%W\\blah #x a \#@a b \#$b c \#{3} # \\",
2258
+ :tWORDS_BEG, "%W\\", [0, 3],
2259
+ :tSTRING_CONTENT, "blah", [3, 7],
2260
+ :tSPACE, nil, [7, 8],
2261
+ :tSTRING_CONTENT, "#x", [8, 10],
2262
+ :tSPACE, nil, [10, 11],
2263
+ :tSTRING_CONTENT, "a", [11, 12],
2264
+ :tSPACE, nil, [12, 13],
2265
+ :tSTRING_DVAR, nil, [13, 14],
2266
+ :tIVAR, "@a", [14, 16],
2267
+ :tSPACE, nil, [16, 17],
2268
+ :tSTRING_CONTENT, "b", [17, 18],
2269
+ :tSPACE, nil, [18, 19],
2270
+ :tSTRING_DVAR, nil, [19, 20],
2271
+ :tGVAR, "$b", [20, 22],
2272
+ :tSPACE, nil, [22, 23],
2273
+ :tSTRING_CONTENT, "c", [23, 24],
2274
+ :tSPACE, nil, [24, 25],
2275
+ :tSTRING_DBEG, '#{', [25, 27],
2276
+ :tINTEGER, 3, [27, 28],
2277
+ :tRCURLY, "}", [28, 29],
2278
+ :tSPACE, nil, [29, 30],
2279
+ :tSTRING_CONTENT, "#", [30, 31],
2280
+ :tSPACE, nil, [31, 32],
2281
+ :tSTRING_END, "\\", [32, 33])
2282
+ end
2283
+
2284
+ def test_string_pct_backslash_with_bad_escape
2285
+ # No escapes are allowed in a backslash-delimited string
2286
+ refute_scanned("%\\a\\n\\",
2287
+ :tSTRING_BEG, "%\\", [0, 2],
2288
+ :tSTRING_CONTENT, "a", [2, 3],
2289
+ :tSTRING_END, "\\", [3, 4],
2290
+ :tIDENTIFIER, "n", [4, 5])
2291
+ end
2292
+
2293
+ def test_string_pct_intertwined_with_heredoc
2294
+ assert_scanned("<<-foo + %\\a\nbar\nfoo\nb\\",
2295
+ :tSTRING_BEG, "<<\"", [0, 6],
2296
+ :tSTRING_CONTENT, "bar\n", [13, 17],
2297
+ :tSTRING_END, "foo", [17, 20],
2298
+ :tPLUS, "+", [7, 8],
2299
+ :tSTRING_BEG, "%\\", [9, 11],
2300
+ :tSTRING_CONTENT, "a\n", [11, 13],
2301
+ :tSTRING_CONTENT, "b", [21, 22],
2302
+ :tSTRING_END, "\\", [22, 23])
2303
+ end
2304
+
2305
+ def test_string_pct_q_backslash
2306
+ assert_scanned("%q\\a\\",
2307
+ :tSTRING_BEG, "%q\\", [0, 3],
2308
+ :tSTRING_CONTENT, "a", [3, 4],
2309
+ :tSTRING_END, "\\", [4, 5])
2310
+ end
2311
+
2312
+ def test_string_pct_Q_backslash
2313
+ assert_scanned("%Q\\a\\",
2314
+ :tSTRING_BEG, "%Q\\", [0, 3],
2315
+ :tSTRING_CONTENT, "a", [3, 4],
2316
+ :tSTRING_END, "\\", [4, 5])
2317
+ end
2318
+
2319
+ def test_string_single
2320
+ assert_scanned("'string'",
2321
+ :tSTRING, "string", [0, 8])
2322
+ end
2323
+
2324
+ def test_string_single_escape_chars
2325
+ assert_scanned("'s\\tri\\ng'",
2326
+ :tSTRING, "s\\tri\\ng", [0, 10])
2327
+ end
2328
+
2329
+ def test_string_single_nl
2330
+ assert_scanned("'blah\\\nblah'",
2331
+ :tSTRING_BEG, "'", [0, 1],
2332
+ :tSTRING_CONTENT, "blah\\\n", [1, 7],
2333
+ :tSTRING_CONTENT, "blah", [7, 11],
2334
+ :tSTRING_END, "'", [11, 12])
2335
+ end
2336
+
2337
+ def test_symbol
2338
+ assert_scanned(":symbol",
2339
+ :tSYMBOL, "symbol", [0, 7])
2340
+ end
2341
+
2342
+ def test_symbol_double
2343
+ assert_scanned(":\"symbol\"",
2344
+ :tSYMBEG, ":\"", [0, 2],
2345
+ :tSTRING_CONTENT, "symbol", [2, 8],
2346
+ :tSTRING_END, "\"", [8, 9])
2347
+ end
2348
+
2349
+ def test_symbol_single
2350
+ assert_scanned(":'symbol'",
2351
+ :tSYMBEG, ":'", [0, 2],
2352
+ :tSTRING_CONTENT, "symbol", [2, 8],
2353
+ :tSTRING_END, "'", [8, 9])
2354
+ end
2355
+
2356
+ def test_ternary
2357
+ assert_scanned("a ? b : c",
2358
+ :tIDENTIFIER, "a", [0, 1],
2359
+ :tEH, "?", [2, 3],
2360
+ :tIDENTIFIER, "b", [4, 5],
2361
+ :tCOLON, ":", [6, 7],
2362
+ :tIDENTIFIER, "c", [8, 9])
2363
+
2364
+ assert_scanned("a ?b : c",
2365
+ :tIDENTIFIER, "a", [0, 1],
2366
+ :tINTEGER, 98, [2, 4],
2367
+ :tCOLON, ":", [5, 6],
2368
+ :tIDENTIFIER, "c", [7, 8])
2369
+
2370
+ assert_scanned("a ?bb : c", # GAH! MATZ!!!
2371
+ :tIDENTIFIER, "a", [0, 1],
2372
+ :tEH, "?", [2, 3],
2373
+ :tIDENTIFIER, "bb", [3, 5],
2374
+ :tCOLON, ":", [6, 7],
2375
+ :tIDENTIFIER, "c", [8, 9])
2376
+
2377
+ assert_scanned("42 ?", # 42 forces expr_end
2378
+ :tINTEGER, 42, [0, 2],
2379
+ :tEH, "?", [3, 4])
2380
+ end
2381
+
2382
+ def test_tilde
2383
+ assert_scanned "~", :tTILDE, "~", [0, 1]
2384
+ end
2385
+
2386
+ def test_tilde_unary
2387
+ @lex.state = :expr_fname
2388
+ assert_scanned "~@", :tTILDE, "~@", [0, 2]
2389
+ end
2390
+
2391
+ def test_uminus
2392
+ assert_scanned("-blah",
2393
+ :tUMINUS, "-", [0, 1],
2394
+ :tIDENTIFIER, "blah", [1, 5])
2395
+ end
2396
+
2397
+ def test_underscore
2398
+ assert_scanned("_var", :tIDENTIFIER, "_var", [0, 4])
2399
+ end
2400
+
2401
+ def test_underscore_end
2402
+ assert_scanned("__END__\n")
2403
+ assert_scanned("__END__")
2404
+ assert_scanned("__END__ foo",
2405
+ :tIDENTIFIER, '__END__', [0, 7],
2406
+ :tIDENTIFIER, 'foo', [8, 11])
2407
+ assert_scanned("__END__\rfoo",
2408
+ :tIDENTIFIER, '__END__', [0, 7],
2409
+ :tIDENTIFIER, 'foo', [8, 11])
2410
+ end
2411
+
2412
+ def test_uplus
2413
+ assert_scanned("+blah",
2414
+ :tUPLUS, "+", [0, 1],
2415
+ :tIDENTIFIER, "blah", [1, 5])
2416
+ end
2417
+
2418
+ def test_if_unless_mod
2419
+ assert_scanned("return if true unless false",
2420
+ :kRETURN, "return", [0, 6],
2421
+ :kIF_MOD, "if", [7, 9],
2422
+ :kTRUE, "true", [10, 14],
2423
+ :kUNLESS_MOD, "unless", [15, 21],
2424
+ :kFALSE, "false", [22, 27])
2425
+ end
2426
+
2427
+ def test_if_stmt
2428
+ assert_scanned("if true\n return end",
2429
+ :kIF, "if", [0, 2],
2430
+ :kTRUE, "true", [3, 7],
2431
+ :tNL, nil, [7, 8],
2432
+ :kRETURN, "return", [9, 15],
2433
+ :kEND, "end", [16, 19])
2434
+ end
2435
+
2436
+ def test_sclass_label
2437
+ setup_lexer 20
2438
+ assert_scanned("class << a:b",
2439
+ :kCLASS, 'class', [0, 5],
2440
+ :tLSHFT, '<<', [6, 8],
2441
+ :tIDENTIFIER, 'a', [9, 10],
2442
+ :tSYMBOL, 'b', [10, 12])
2443
+ end
2444
+
2445
+ def test_fname_pct_s__22
2446
+ setup_lexer 22
2447
+ @lex.state = :expr_fname
2448
+ assert_scanned("%s(a)",
2449
+ :tPERCENT, '%', [0, 1],
2450
+ :tIDENTIFIER, 's', [1, 2],
2451
+ :tLPAREN2, '(', [2, 3],
2452
+ :tIDENTIFIER, 'a', [3, 4],
2453
+ :tRPAREN, ')', [4, 5])
2454
+ end
2455
+
2456
+ def test_fname_pct_s__23
2457
+ setup_lexer 23
2458
+ @lex.state = :expr_fname
2459
+ assert_scanned("%s(a)",
2460
+ :tSYMBEG, '%s(', [0, 3],
2461
+ :tSTRING_CONTENT, 'a', [3, 4],
2462
+ :tSTRING_END, ')', [4, 5])
2463
+ end
2464
+
2465
+ def test_static_env
2466
+ env = Parser::StaticEnvironment.new
2467
+ env.declare "a"
2468
+
2469
+ @lex.static_env = env
2470
+ assert_scanned("a [42]",
2471
+ :tIDENTIFIER, "a", [0, 1],
2472
+ :tLBRACK2, "[", [2, 3],
2473
+ :tINTEGER, 42, [3, 5],
2474
+ :tRBRACK, "]", [5, 6])
2475
+ end
2476
+
2477
+ def test_int_suffix
2478
+ [18, 19, 20].each do |version|
2479
+ setup_lexer version
2480
+
2481
+ assert_scanned("42r",
2482
+ :tINTEGER, 42, [0, 2],
2483
+ :tIDENTIFIER, 'r', [2, 3])
2484
+
2485
+ assert_scanned("42if",
2486
+ :tINTEGER, 42, [0, 2],
2487
+ :kIF_MOD, 'if', [2, 4])
2488
+ end
2489
+
2490
+ setup_lexer 21
2491
+
2492
+ assert_scanned("42r", :tRATIONAL, Rational(42), [0, 3])
2493
+ assert_scanned("42i", :tIMAGINARY, Complex(0, 42), [0, 3])
2494
+ assert_scanned("42ri", :tIMAGINARY, Complex(0, Rational(42)), [0, 4])
2495
+ end
2496
+
2497
+ def test_float_suffix
2498
+ [18, 19, 20].each do |version|
2499
+ setup_lexer version
2500
+
2501
+ assert_scanned("42.1r",
2502
+ :tFLOAT, 42.1, [0, 4],
2503
+ :tIDENTIFIER, 'r', [4, 5])
2504
+
2505
+ assert_scanned("42.1if",
2506
+ :tFLOAT, 42.1, [0, 4],
2507
+ :kIF_MOD, 'if', [4, 6])
2508
+
2509
+ assert_scanned("1e1r",
2510
+ :tFLOAT, 1e1, [0, 3],
2511
+ :tIDENTIFIER, 'r', [3, 4])
2512
+ end
2513
+
2514
+ begin
2515
+ # Feature-check.
2516
+ Rational("10")
2517
+
2518
+ setup_lexer 21
2519
+
2520
+ assert_scanned("42.1r", :tRATIONAL, Rational(421, 10), [0, 5])
2521
+ assert_scanned("42.1i", :tIMAGINARY, Complex(0, 42.1), [0, 5])
2522
+ assert_scanned("42.1ri", :tIMAGINARY, Complex(0, Rational(421, 10)), [0, 6])
2523
+ assert_scanned("42.1ir",
2524
+ :tIMAGINARY, Complex(0, 42.1), [0, 5],
2525
+ :tIDENTIFIER, 'r', [5, 6])
2526
+
2527
+ assert_scanned("1e1i", :tIMAGINARY, Complex(0, 1e1), [0, 4])
2528
+ assert_scanned("1e1r",
2529
+ :tFLOAT, 1e1, [0, 3],
2530
+ :tIDENTIFIER, 'r', [3, 4])
2531
+ assert_scanned("1e1ri",
2532
+ :tFLOAT, 1e1, [0, 3],
2533
+ :tIDENTIFIER, 'ri', [3, 5])
2534
+ assert_scanned("1e1ir",
2535
+ :tIMAGINARY, Complex(0, 1e1), [0, 4],
2536
+ :tIDENTIFIER, 'r', [4, 5])
2537
+ rescue NoMethodError
2538
+ # Ruby not modern enough
2539
+ end
2540
+ end
2541
+
2542
+ def test_eof
2543
+ assert_scanned("self",
2544
+ :kSELF, "self", [0, 4])
2545
+ assert_equal([false, ["$eof", Parser::Source::Range.new(@lex.source_buffer, 4, 4)]],
2546
+ @lex.advance)
2547
+ end
2548
+
2549
+ #
2550
+ # Test for 'fluent interface'
2551
+ #
2552
+
2553
+ def test_fluent_dot
2554
+ assert_scanned("x\n.y",
2555
+ :tIDENTIFIER, 'x', [0, 1],
2556
+ :tDOT, '.', [2, 3],
2557
+ :tIDENTIFIER, 'y', [3, 4])
2558
+
2559
+ assert_scanned("x\n .y",
2560
+ :tIDENTIFIER, 'x', [0, 1],
2561
+ :tDOT, '.', [4, 5],
2562
+ :tIDENTIFIER, 'y', [5, 6])
2563
+
2564
+ assert_scanned("x # comment\n .y",
2565
+ :tIDENTIFIER, 'x', [0, 1],
2566
+ :tDOT, '.', [14, 15],
2567
+ :tIDENTIFIER, 'y', [15, 16])
2568
+ end
2569
+
2570
+ def test_fluent_and_dot
2571
+ assert_scanned("x\n&.y",
2572
+ :tIDENTIFIER, 'x', [0, 1],
2573
+ :tANDDOT, '&.', [2, 4],
2574
+ :tIDENTIFIER, 'y', [4, 5])
2575
+ end
2576
+
2577
+ #
2578
+ # Tests for whitespace.
2579
+ #
2580
+
2581
+ def test_whitespace_fname
2582
+ @lex.state = :expr_fname
2583
+ assert_scanned('class',
2584
+ :kCLASS, 'class', [0, 5])
2585
+
2586
+ @lex.state = :expr_fname
2587
+ assert_scanned(' class',
2588
+ :kCLASS, 'class', [1, 6])
2589
+
2590
+ @lex.state = :expr_fname
2591
+ assert_scanned("\nclass",
2592
+ :kCLASS, 'class', [1, 6])
2593
+
2594
+ @lex.state = :expr_fname
2595
+ assert_scanned("\\\nclass",
2596
+ :kCLASS, 'class', [2, 7])
2597
+
2598
+ @lex.state = :expr_fname
2599
+ assert_scanned("#foo\nclass",
2600
+ :kCLASS, 'class', [5, 10])
2601
+ end
2602
+
2603
+ def test_whitespace_endfn
2604
+ setup_lexer(21)
2605
+
2606
+ @lex.state = :expr_endfn
2607
+ assert_scanned('foo:',
2608
+ :tLABEL, 'foo', [0, 4])
2609
+
2610
+ @lex.state = :expr_endfn
2611
+ assert_scanned(' foo:',
2612
+ :tLABEL, 'foo', [1, 5])
2613
+
2614
+ @lex.state = :expr_endfn
2615
+ assert_scanned("\nfoo:",
2616
+ :tNL, nil, [0, 1],
2617
+ :tIDENTIFIER, 'foo', [1, 4],
2618
+ :tCOLON, ':', [4, 5])
2619
+
2620
+ @lex.state = :expr_endfn
2621
+ assert_scanned("\nfoo: ",
2622
+ :tNL, nil, [0, 1],
2623
+ :tIDENTIFIER, 'foo', [1, 4],
2624
+ :tCOLON, ':', [4, 5])
2625
+
2626
+ @lex.state = :expr_endfn
2627
+ assert_scanned("\\\nfoo:",
2628
+ :tLABEL, 'foo', [2, 6])
2629
+
2630
+ @lex.state = :expr_endfn
2631
+ assert_scanned("#foo\nfoo:",
2632
+ :tNL, nil, [4, 5],
2633
+ :tIDENTIFIER, 'foo', [5, 8],
2634
+ :tCOLON, ':', [8, 9])
2635
+
2636
+ @lex.state = :expr_endfn
2637
+ assert_scanned("#foo\nfoo: ",
2638
+ :tNL, nil, [4, 5],
2639
+ :tIDENTIFIER, 'foo', [5, 8],
2640
+ :tCOLON, ':', [8, 9])
2641
+ end
2642
+
2643
+ def test_whitespace_dot
2644
+ @lex.state = :expr_dot
2645
+ assert_scanned('class',
2646
+ :tIDENTIFIER, 'class', [0, 5])
2647
+
2648
+ @lex.state = :expr_dot
2649
+ assert_scanned(' class',
2650
+ :tIDENTIFIER, 'class', [1, 6])
2651
+
2652
+ @lex.state = :expr_dot
2653
+ assert_scanned("\nclass",
2654
+ :tIDENTIFIER, 'class', [1, 6])
2655
+
2656
+ @lex.state = :expr_dot
2657
+ assert_scanned("\\\nclass",
2658
+ :tIDENTIFIER, 'class', [2, 7])
2659
+
2660
+ @lex.state = :expr_dot
2661
+ assert_scanned("#foo\nclass",
2662
+ :tIDENTIFIER, 'class', [5, 10])
2663
+ end
2664
+
2665
+ def test_whitespace_arg
2666
+ @lex.state = :expr_arg
2667
+ assert_scanned('+',
2668
+ :tPLUS, '+', [0, 1])
2669
+
2670
+ @lex.state = :expr_arg
2671
+ assert_scanned(' +',
2672
+ :tUPLUS, '+', [1, 2])
2673
+
2674
+ @lex.state = :expr_arg
2675
+ assert_scanned("\n+",
2676
+ :tNL, nil, [0, 1],
2677
+ :tUPLUS, '+', [1, 2])
2678
+
2679
+ @lex.state = :expr_arg
2680
+ assert_scanned("\\\n+",
2681
+ :tUPLUS, '+', [2, 3])
2682
+
2683
+ @lex.state = :expr_arg
2684
+ assert_scanned("\\\n +",
2685
+ :tUPLUS, '+', [3, 4])
2686
+
2687
+ @lex.state = :expr_arg
2688
+ assert_scanned("#foo\n+",
2689
+ :tNL, nil, [4, 5],
2690
+ :tUPLUS, '+', [5, 6])
2691
+ end
2692
+
2693
+ def test_whitespace_endarg
2694
+ @lex.state = :expr_endarg
2695
+ assert_scanned('{',
2696
+ :tLBRACE_ARG, '{', [0, 1])
2697
+
2698
+ @lex.state = :expr_endarg
2699
+ assert_scanned(' {',
2700
+ :tLBRACE_ARG, '{', [1, 2])
2701
+
2702
+ @lex.state = :expr_endarg
2703
+ assert_scanned("\n{",
2704
+ :tNL, nil, [0, 1],
2705
+ :tLBRACE, '{', [1, 2])
2706
+
2707
+ @lex.state = :expr_endarg
2708
+ assert_scanned("\\\n{",
2709
+ :tLBRACE_ARG, '{', [2, 3])
2710
+
2711
+ @lex.state = :expr_endarg
2712
+ assert_scanned("#foo\n{",
2713
+ :tNL, nil, [4, 5],
2714
+ :tLBRACE, '{', [5, 6])
2715
+ end
2716
+
2717
+ def test_whitespace_mid
2718
+ @lex.state = :expr_mid
2719
+ assert_scanned('+',
2720
+ :tUPLUS, '+', [0, 1])
2721
+
2722
+ @lex.state = :expr_mid
2723
+ assert_scanned(' +',
2724
+ :tUPLUS, '+', [1, 2])
2725
+
2726
+ @lex.state = :expr_mid
2727
+ assert_scanned("\n+",
2728
+ :tNL, nil, [0, 1],
2729
+ :tUPLUS, '+', [1, 2])
2730
+
2731
+ @lex.state = :expr_mid
2732
+ assert_scanned("\\\n+",
2733
+ :tUPLUS, '+', [2, 3])
2734
+
2735
+ @lex.state = :expr_mid
2736
+ assert_scanned("#foo\n+",
2737
+ :tNL, nil, [4, 5],
2738
+ :tUPLUS, '+', [5, 6])
2739
+ end
2740
+
2741
+ def test_whitespace_beg
2742
+ @lex.state = :expr_beg
2743
+ assert_scanned('+',
2744
+ :tUPLUS, '+', [0, 1])
2745
+
2746
+ @lex.state = :expr_beg
2747
+ assert_scanned(' +',
2748
+ :tUPLUS, '+', [1, 2])
2749
+
2750
+ @lex.state = :expr_beg
2751
+ assert_scanned("\n+",
2752
+ :tUPLUS, '+', [1, 2])
2753
+
2754
+ @lex.state = :expr_beg
2755
+ assert_scanned("\\\n+",
2756
+ :tUPLUS, '+', [2, 3])
2757
+
2758
+ @lex.state = :expr_beg
2759
+ assert_scanned("#foo\n+",
2760
+ :tUPLUS, '+', [5, 6])
2761
+ end
2762
+
2763
+ def test_whitespace_value
2764
+ setup_lexer(20)
2765
+
2766
+ @lex.state = :expr_value
2767
+ assert_scanned('a:b',
2768
+ :tIDENTIFIER, 'a', [0, 1],
2769
+ :tSYMBOL, 'b', [1, 3])
2770
+
2771
+ @lex.state = :expr_value
2772
+ assert_scanned(' a:b',
2773
+ :tIDENTIFIER, 'a', [1, 2],
2774
+ :tSYMBOL, 'b', [2, 4])
2775
+
2776
+ @lex.state = :expr_value
2777
+ assert_scanned("\na:b",
2778
+ :tIDENTIFIER, 'a', [1, 2],
2779
+ :tSYMBOL, 'b', [2, 4])
2780
+
2781
+ @lex.state = :expr_value
2782
+ assert_scanned("\\\na:b",
2783
+ :tIDENTIFIER, 'a', [2, 3],
2784
+ :tSYMBOL, 'b', [3, 5])
2785
+
2786
+ @lex.state = :expr_value
2787
+ assert_scanned("#foo\na:b",
2788
+ :tIDENTIFIER, 'a', [5, 6],
2789
+ :tSYMBOL, 'b', [6, 8])
2790
+ end
2791
+
2792
+ def test_whitespace_end
2793
+ @lex.state = :expr_end
2794
+ assert_scanned('+ 1',
2795
+ :tPLUS, '+', [0, 1],
2796
+ :tINTEGER, 1, [2, 3])
2797
+
2798
+ @lex.state = :expr_end
2799
+ assert_scanned(' + 1',
2800
+ :tPLUS, '+', [1, 2],
2801
+ :tINTEGER, 1, [3, 4])
2802
+
2803
+ @lex.state = :expr_end
2804
+ assert_scanned("\n+ 1",
2805
+ :tNL, nil, [0, 1],
2806
+ :tUNARY_NUM, '+', [1, 2],
2807
+ :tINTEGER, 1, [3, 4])
2808
+
2809
+ @lex.state = :expr_end
2810
+ assert_scanned("\\\n+ 1",
2811
+ :tPLUS, '+', [2, 3],
2812
+ :tINTEGER, 1, [4, 5])
2813
+
2814
+ @lex.state = :expr_end
2815
+ assert_scanned("#foo\n+ 1",
2816
+ :tNL, nil, [4, 5],
2817
+ :tUNARY_NUM, '+', [5, 6],
2818
+ :tINTEGER, 1, [7, 8])
2819
+ end
2820
+
2821
+ def test_whitespace_cr
2822
+ setup_lexer(20)
2823
+ assert_scanned("<<E\nfoo\nE\rO",
2824
+ :tSTRING_BEG, '<<"', [0, 3],
2825
+ :tSTRING_CONTENT, "foo\n", [4, 8],
2826
+ :tSTRING_END, 'E', [8, 11],
2827
+ :tNL, nil, [3, 4])
2828
+
2829
+ setup_lexer(21)
2830
+ refute_scanned("<<E\nfoo\nE\rO",
2831
+ :tSTRING_BEG, '<<"', [0, 3],
2832
+ :tSTRING_CONTENT, "foo\n", [4, 8])
2833
+ end
2834
+
2835
+ #
2836
+ # Handling of encoding-related issues.
2837
+ #
2838
+
2839
+ if defined?(Encoding)
2840
+ def test_transcoded_source_is_converted_back_to_original_encoding
2841
+ setup_lexer(19)
2842
+ @lex.force_utf32 = true
2843
+ @lex.tokens = []
2844
+ assert_scanned(utf('"a" + "b"'),
2845
+ :tSTRING, "a", [0, 3],
2846
+ :tPLUS, "+", [4, 5],
2847
+ :tSTRING, "b", [6, 9])
2848
+
2849
+ @lex.tokens.each do |_type, (str, _range)|
2850
+ assert_equal Encoding::UTF_8, str.encoding
2851
+ end
2852
+ end
2853
+ end
2854
+
2855
+ #
2856
+ # Tests for bugs.
2857
+ #
2858
+ # These tests should be moved from nursery and properly
2859
+ # categorized when it's clear how to do that.
2860
+ #
2861
+
2862
+ def test_bug_sclass_joined
2863
+ assert_scanned("class<<self",
2864
+ :kCLASS, "class", [0, 5],
2865
+ :tLSHFT, "<<", [5, 7],
2866
+ :kSELF, "self", [7, 11])
2867
+ end
2868
+
2869
+ def test_bug_const_expr_end
2870
+ assert_scanned("Option",
2871
+ :tCONSTANT, 'Option', [0, 6])
2872
+
2873
+ assert_equal :expr_cmdarg, @lex.state
2874
+ end
2875
+
2876
+ def test_bug_expr_beg_div
2877
+ @lex.state = :expr_beg
2878
+ assert_scanned("/=/",
2879
+ :tREGEXP_BEG, "/", [0, 1],
2880
+ :tSTRING_CONTENT, "=", [1, 2],
2881
+ :tSTRING_END, "/", [2, 3],
2882
+ :tREGEXP_OPT, "", [3, 3])
2883
+
2884
+ @lex.state = :expr_beg
2885
+ assert_scanned("/ = /",
2886
+ :tREGEXP_BEG, "/", [0, 1],
2887
+ :tSTRING_CONTENT, " = ", [1, 4],
2888
+ :tSTRING_END, "/", [4, 5],
2889
+ :tREGEXP_OPT, "", [5, 5])
2890
+ end
2891
+
2892
+ def test_bug_expr_beg_percent
2893
+ @lex.state = :expr_beg
2894
+ assert_scanned("%=foo=",
2895
+ :tSTRING_BEG, "%=", [0, 2],
2896
+ :tSTRING_CONTENT, 'foo', [2, 5],
2897
+ :tSTRING_END, "=", [5, 6])
2898
+
2899
+ @lex.state = :expr_beg
2900
+ assert_scanned("% = ",
2901
+ :tSTRING_BEG, "% ", [0, 2],
2902
+ :tSTRING_CONTENT, '=', [2, 3],
2903
+ :tSTRING_END, ' ', [3, 4])
2904
+ end
2905
+
2906
+ def test_bug_expr_beg_document
2907
+ @lex.state = :expr_beg
2908
+ assert_scanned(" \n=begin\n=end\nend",
2909
+ :kEND, "end", [14, 17])
2910
+
2911
+ end
2912
+
2913
+ def test_bug_expr_beg_number
2914
+ @lex.state = :expr_beg
2915
+ assert_scanned("86400_000_000",
2916
+ :tINTEGER, 86400_000_000, [0, 13])
2917
+ end
2918
+
2919
+ def test_bug_expr_beg_backspace_nl
2920
+ @lex.state = :expr_beg
2921
+ assert_scanned("\n/foo/",
2922
+ :tREGEXP_BEG, "/", [1, 2],
2923
+ :tSTRING_CONTENT, "foo", [2, 5],
2924
+ :tSTRING_END, "/", [5, 6],
2925
+ :tREGEXP_OPT, "", [6, 6])
2926
+ end
2927
+
2928
+ def test_bug_expr_beg_heredoc
2929
+ assert_scanned("<<EOL % [\nfoo\nEOL\n]",
2930
+ :tSTRING_BEG, '<<"', [0, 5],
2931
+ :tSTRING_CONTENT, "foo\n", [10, 14],
2932
+ :tSTRING_END, 'EOL', [14, 17],
2933
+ :tPERCENT, '%', [6, 7],
2934
+ :tLBRACK, '[', [8, 9],
2935
+ :tRBRACK, ']', [18, 19])
2936
+ end
2937
+
2938
+ def test_bug_expr_beg_fid
2939
+ assert_scanned("Rainbows!",
2940
+ :tFID, 'Rainbows!', [0, 9])
2941
+ end
2942
+
2943
+ def test_bug_expr_beg_rescue_assoc
2944
+ assert_scanned("rescue=>",
2945
+ :kRESCUE, 'rescue', [0, 6],
2946
+ :tASSOC, '=>', [6, 8])
2947
+ end
2948
+
2949
+ def test_bug_expr_arg_percent
2950
+ @lex.state = :expr_arg
2951
+ assert_scanned("%[",
2952
+ :tPERCENT, "%", [0, 1],
2953
+ :tLBRACK, "[", [1, 2])
2954
+
2955
+ @lex.state = :expr_arg
2956
+ assert_scanned("%=1",
2957
+ :tOP_ASGN, "%", [0, 2],
2958
+ :tINTEGER, 1, [2, 3])
2959
+
2960
+ @lex.state = :expr_arg
2961
+ assert_scanned(" %[1]",
2962
+ :tSTRING_BEG, "%[", [1, 3],
2963
+ :tSTRING_CONTENT, '1', [3, 4],
2964
+ :tSTRING_END, ']', [4, 5])
2965
+
2966
+ @lex.state = :expr_arg
2967
+ assert_scanned(" %=1=",
2968
+ :tOP_ASGN, "%", [1, 3],
2969
+ :tINTEGER, 1, [3, 4],
2970
+ :tEQL, "=", [4, 5])
2971
+
2972
+ @lex.state = :expr_arg
2973
+ assert_scanned(" %\n",
2974
+ :tPERCENT, '%', [1, 2])
2975
+ end
2976
+
2977
+ def test_bug_expr_arg_lt_lt
2978
+ @lex.state = :expr_arg
2979
+ assert_scanned("<<EOS\nEOS",
2980
+ :tLSHFT, "<<", [0, 2],
2981
+ :tCONSTANT, "EOS", [2, 5],
2982
+ :tNL, nil, [5, 6],
2983
+ :tCONSTANT, "EOS", [6, 9])
2984
+
2985
+ @lex.state = :expr_arg
2986
+ assert_scanned(" <<EOS\nEOS",
2987
+ :tSTRING_BEG, "<<\"", [1, 6],
2988
+ :tSTRING_END, "EOS", [7, 10],
2989
+ :tNL, nil, [6, 7])
2990
+ end
2991
+
2992
+ def test_bug_expr_arg_slash
2993
+ @lex.state = :expr_arg
2994
+ assert_scanned("/1",
2995
+ :tDIVIDE, "/", [0, 1],
2996
+ :tINTEGER, 1, [1, 2])
2997
+
2998
+ @lex.state = :expr_arg
2999
+ assert_scanned("/ 1",
3000
+ :tDIVIDE, "/", [0, 1],
3001
+ :tINTEGER, 1, [2, 3])
3002
+
3003
+ @lex.state = :expr_arg
3004
+ assert_scanned(" /1/",
3005
+ :tREGEXP_BEG, "/", [1, 2],
3006
+ :tSTRING_CONTENT, "1", [2, 3],
3007
+ :tSTRING_END, "/", [3, 4],
3008
+ :tREGEXP_OPT, "", [4, 4])
3009
+
3010
+ @lex.state = :expr_arg
3011
+ assert_scanned(" / 1",
3012
+ :tDIVIDE, "/", [1, 2],
3013
+ :tINTEGER, 1, [3, 4])
3014
+ end
3015
+
3016
+ def test_bug_expr_arg_label
3017
+ setup_lexer 19
3018
+
3019
+ @lex.state = :expr_arg
3020
+ assert_scanned(" unless:",
3021
+ :tLABEL, 'unless', [1, 8])
3022
+
3023
+ @lex.state = :expr_arg
3024
+ assert_scanned(" unless: ",
3025
+ :tLABEL, 'unless', [1, 8])
3026
+ end
3027
+
3028
+ def test_bug_heredoc_continuation
3029
+ @lex.state = :expr_arg
3030
+ assert_scanned(" <<EOS\nEOS\nend",
3031
+ :tSTRING_BEG, "<<\"", [1, 6],
3032
+ :tSTRING_END, "EOS", [7, 10],
3033
+ :tNL, nil, [6, 7],
3034
+ :kEND, "end", [11, 14])
3035
+ end
3036
+
3037
+ def test_bug_heredoc_cr_lf
3038
+ assert_scanned("<<FIN\r\nfoo\r\nFIN\r\n",
3039
+ :tSTRING_BEG, "<<\"", [0, 5],
3040
+ :tSTRING_CONTENT, "foo\n", [6, 10],
3041
+ :tSTRING_END, "FIN", [10, 13],
3042
+ :tNL, nil, [5, 6])
3043
+ end
3044
+
3045
+ def test_bug_eh_symbol_no_newline
3046
+ assert_scanned("?\"\nfoo",
3047
+ :tINTEGER, 34, [0, 2],
3048
+ :tNL, nil, [2, 3],
3049
+ :tIDENTIFIER, "foo", [3, 6])
3050
+ end
3051
+
3052
+ def test_bug_expr_arg_newline
3053
+ @lex.state = :expr_arg
3054
+ assert_scanned("\nfoo",
3055
+ :tNL, nil, [0, 1],
3056
+ :tIDENTIFIER, "foo", [1, 4])
3057
+
3058
+ @lex.state = :expr_arg
3059
+ assert_scanned(" \nfoo",
3060
+ :tNL, nil, [1, 2],
3061
+ :tIDENTIFIER, "foo", [2, 5])
3062
+
3063
+ @lex.state = :expr_arg
3064
+ assert_scanned("#foo\nfoo",
3065
+ :tNL, nil, [4, 5],
3066
+ :tIDENTIFIER, "foo", [5, 8])
3067
+ end
3068
+
3069
+ def test_bug_expr_arg_comment_newline
3070
+ @lex.state = :expr_arg
3071
+ assert_scanned(" #\nfoo",
3072
+ :tNL, nil, [2, 3],
3073
+ :tIDENTIFIER, 'foo', [3, 6])
3074
+ end
3075
+
3076
+ def test_bug_expr_arg_eh_crlf
3077
+ @lex.state = :expr_arg
3078
+ assert_scanned(" ?\r\n",
3079
+ :tEH, '?', [1, 2])
3080
+ end
3081
+
3082
+ def test_bug_heredoc_backspace_nl
3083
+ assert_scanned(" <<'XXX'\nf \\\nXXX\n",
3084
+ :tSTRING_BEG, "<<'", [1, 8],
3085
+ :tSTRING_CONTENT, "f \\\n", [9, 13],
3086
+ :tSTRING_END, "XXX", [13, 16],
3087
+ :tNL, nil, [8, 9])
3088
+ end
3089
+
3090
+ def test_bug_heredoc_lshft
3091
+ assert_scanned("<<RULES << CLEANINGS\nRULES",
3092
+ :tSTRING_BEG, '<<"', [0, 7],
3093
+ :tSTRING_END, 'RULES', [21, 26],
3094
+ :tLSHFT, '<<', [8, 10],
3095
+ :tCONSTANT, 'CLEANINGS', [11, 20])
3096
+ end
3097
+
3098
+ def test_bug_sclass_comment_lshft_label
3099
+ assert_scanned("class # foo\n<< a:b;end",
3100
+ :kCLASS, 'class', [0, 5],
3101
+ :tLSHFT, '<<', [12, 14],
3102
+ :tIDENTIFIER, 'a', [15, 16],
3103
+ :tSYMBOL, 'b', [16, 18],
3104
+ :tSEMI, ';', [18, 19],
3105
+ :kEND, 'end', [19, 22])
3106
+ end
3107
+
3108
+ def test_bug_expr_dot_comment
3109
+ assert_scanned("foo. #bar\nbaz",
3110
+ :tIDENTIFIER, 'foo', [0, 3],
3111
+ :tDOT, '.', [3, 4],
3112
+ :tIDENTIFIER, 'baz', [10, 13])
3113
+ end
3114
+
3115
+ def test_bug_expr_dot_fid
3116
+ assert_scanned("foo.S?",
3117
+ :tIDENTIFIER, 'foo', [0, 3],
3118
+ :tDOT, '.', [3, 4],
3119
+ :tFID, 'S?', [4, 6])
3120
+ end
3121
+
3122
+ def test_bug_expr_dot_id_eq
3123
+ assert_scanned("foo.x= 1",
3124
+ :tIDENTIFIER, 'foo', [0, 3],
3125
+ :tDOT, '.', [3, 4],
3126
+ :tIDENTIFIER, 'x', [4, 5],
3127
+ :tEQL, '=', [5, 6],
3128
+ :tINTEGER, 1, [7, 8])
3129
+ end
3130
+
3131
+ def test_bug_expr_dot_fid_mod
3132
+ assert_scanned("foo.x!if 1",
3133
+ :tIDENTIFIER, 'foo', [0, 3],
3134
+ :tDOT, '.', [3, 4],
3135
+ :tFID, 'x!', [4, 6],
3136
+ :kIF_MOD, 'if', [6, 8],
3137
+ :tINTEGER, 1, [9, 10])
3138
+ end
3139
+
3140
+ def test_bug_expr_mid_comment
3141
+ assert_scanned("rescue #bar\nprint",
3142
+ :kRESCUE, 'rescue', [0, 6],
3143
+ :tNL, nil, [11, 12],
3144
+ :tIDENTIFIER, 'print', [12, 17])
3145
+ end
3146
+
3147
+ def test_bug_expr_mid_bareword
3148
+ assert_scanned("begin; rescue rescue1",
3149
+ :kBEGIN, 'begin', [0, 5],
3150
+ :tSEMI, ';', [5, 6],
3151
+ :kRESCUE, 'rescue', [7, 13],
3152
+ :tIDENTIFIER, 'rescue1', [14, 21])
3153
+ end
3154
+
3155
+ def test_bug_expr_value_document
3156
+ assert_scanned("1;\n=begin\n=end",
3157
+ :tINTEGER, 1, [0, 1],
3158
+ :tSEMI, ';', [1, 2])
3159
+ end
3160
+
3161
+ def test_bug_expr_end_colon
3162
+ assert_scanned("'foo':'bar'",
3163
+ :tSTRING, 'foo', [0, 5],
3164
+ :tCOLON, ':', [5, 6],
3165
+ :tSTRING, 'bar', [6, 11])
3166
+ end
3167
+
3168
+ def test_bug_expr_value_rescue_colon2
3169
+ @lex.state = :expr_value
3170
+ assert_scanned("rescue::Exception",
3171
+ :kRESCUE, 'rescue', [0, 6],
3172
+ :tCOLON3, '::', [6, 8],
3173
+ :tCONSTANT, 'Exception', [8, 17])
3174
+ end
3175
+
3176
+ def test_bug_expr_endarg_braces
3177
+ assert_scanned("let [] {",
3178
+ :tIDENTIFIER, 'let', [0, 3],
3179
+ :tLBRACK, '[', [4, 5],
3180
+ :tRBRACK, ']', [5, 6],
3181
+ :tLBRACE_ARG, '{', [7, 8])
3182
+ end
3183
+
3184
+ def test_bug_line_begin_label
3185
+ setup_lexer(19)
3186
+ assert_scanned("foo:bar",
3187
+ :tIDENTIFIER, 'foo', [0, 3],
3188
+ :tSYMBOL, 'bar', [3, 7])
3189
+ end
3190
+
3191
+ def test_bug_interp_expr_value
3192
+ assert_scanned('"#{f:a}"',
3193
+ :tSTRING_BEG, '"', [0, 1],
3194
+ :tSTRING_DBEG, '#{', [1, 3],
3195
+ :tIDENTIFIER, 'f', [3, 4],
3196
+ :tSYMBOL, 'a', [4, 6],
3197
+ :tRCURLY, '}', [6, 7],
3198
+ :tSTRING_END, '"', [7, 8])
3199
+ end
3200
+
3201
+ def test_bug_const_e
3202
+ assert_scanned('E10',
3203
+ :tCONSTANT, 'E10', [0, 3])
3204
+ assert_scanned('E4U',
3205
+ :tCONSTANT, 'E4U', [0, 3])
3206
+ end
3207
+
3208
+ def test_bug_symbol_newline
3209
+ assert_scanned(":foo\n",
3210
+ :tSYMBOL, 'foo', [0, 4],
3211
+ :tNL, nil, [4, 5])
3212
+
3213
+ assert_scanned(":foo=\n",
3214
+ :tSYMBOL, 'foo=', [0, 5],
3215
+ :tNL, nil, [5, 6])
3216
+ end
3217
+
3218
+ def test_bug_interleaved_heredoc
3219
+ assert_scanned(%Q{<<w; "\nfoo\nw\n"},
3220
+ :tSTRING_BEG, '<<"', [0, 3],
3221
+ :tSTRING_CONTENT, "foo\n", [7, 11],
3222
+ :tSTRING_END, 'w', [11, 12],
3223
+ :tSEMI, ';', [3, 4],
3224
+ :tSTRING_BEG, '"', [5, 6],
3225
+ :tSTRING_CONTENT, "\n", [6, 7],
3226
+ :tSTRING_END, '"', [13, 14])
3227
+
3228
+ @lex.state = :expr_beg
3229
+ assert_scanned(%Q{<<w; %w[\nfoo\nw\n1]},
3230
+ :tSTRING_BEG, '<<"', [0, 3],
3231
+ :tSTRING_CONTENT, "foo\n", [9, 13],
3232
+ :tSTRING_END, 'w', [13, 14],
3233
+ :tSEMI, ';', [3, 4],
3234
+ :tQWORDS_BEG, '%w[', [5, 8],
3235
+ :tSTRING_CONTENT, "1", [15, 16],
3236
+ :tSPACE, nil, [16, 16],
3237
+ :tSTRING_END, ']', [16, 17])
3238
+
3239
+ @lex.state = :expr_beg
3240
+ assert_scanned(%Q{<<w; "\#{\nfoo\nw\n}"},
3241
+ :tSTRING_BEG, '<<"', [0, 3],
3242
+ :tSTRING_CONTENT, "foo\n", [9, 13],
3243
+ :tSTRING_END, 'w', [13, 14],
3244
+ :tSEMI, ';', [3, 4],
3245
+ :tSTRING_BEG, '"', [5, 6],
3246
+ :tSTRING_DBEG, '#{', [6, 8],
3247
+ :tRCURLY, '}', [15, 16],
3248
+ :tSTRING_END, '"', [16, 17])
3249
+ end
3250
+
3251
+ def test_bug_fid_char
3252
+ setup_lexer(19)
3253
+ assert_scanned('eof??a',
3254
+ :tFID, 'eof?', [0, 4],
3255
+ :tCHARACTER, 'a', [4, 6])
3256
+ end
3257
+
3258
+ def test_bug_nonlabel_context__18
3259
+ env = Parser::StaticEnvironment.new
3260
+ env.declare "a"
3261
+
3262
+ @lex.static_env = env
3263
+ assert_scanned("1+a:a",
3264
+ :tINTEGER, 1, [0, 1],
3265
+ :tPLUS, '+', [1, 2],
3266
+ :tIDENTIFIER, 'a', [2, 3],
3267
+ :tCOLON, ':', [3, 4],
3268
+ :tIDENTIFIER, 'a', [4, 5])
3269
+ end
3270
+
3271
+ def test_bug_string_percent_newline
3272
+ assert_scanned(%Q{%\nfoo\n},
3273
+ :tSTRING_BEG, "%\n", [0, 2],
3274
+ :tSTRING_CONTENT, 'foo', [2, 5],
3275
+ :tSTRING_END, "\n", [5, 6])
3276
+ end
3277
+
3278
+ def test_bug_string_percent_zero
3279
+ assert_scanned(%Q{%\0foo\0},
3280
+ :tSTRING_BEG, "%\0", [0, 2],
3281
+ :tSTRING_CONTENT, 'foo', [2, 5],
3282
+ :tSTRING_END, "\0", [5, 6])
3283
+ end
3284
+
3285
+ def test_bug_string_utf_escape_composition
3286
+ assert_scanned(%q{"\xE2\x80\x99"},
3287
+ :tSTRING, "\xE2\x80\x99", [0, 14])
3288
+
3289
+ if defined?(Encoding)
3290
+ assert_scanned(utf(%q{"\xE2\x80\x99"}),
3291
+ :tSTRING, utf('’'), [0, 14])
3292
+ assert_scanned(utf(%q{"\342\200\231"}),
3293
+ :tSTRING, utf('’'), [0, 14])
3294
+ assert_scanned(utf(%q{"\M-b\C-\M-@\C-\M-Y"}),
3295
+ :tSTRING, utf('’'), [0, 20])
3296
+ end
3297
+ end
3298
+
3299
+ def test_bug_string_utf_escape_noop
3300
+ if defined?(Encoding)
3301
+ assert_scanned(utf(%q{"\あ"}),
3302
+ :tSTRING, utf("あ"), [0, 4])
3303
+ end
3304
+ end
3305
+
3306
+ def test_bug_string_non_utf
3307
+ assert_scanned(%Q{"caf\xE9"},
3308
+ :tSTRING, "caf\xE9", [0, 6])
3309
+ assert_scanned(%Q{"caf\xC3\xA9"},
3310
+ :tSTRING, "caf\xC3\xA9", [0, 7])
3311
+
3312
+ if defined?(Encoding)
3313
+ assert_scanned(utf(%q{"café"}),
3314
+ :tSTRING, utf("café"), [0, 6])
3315
+ end
3316
+ end
3317
+
3318
+ def test_bug_semi__END__
3319
+ assert_scanned(%Q{foo;\n__END__},
3320
+ :tIDENTIFIER, 'foo', [0, 3],
3321
+ :tSEMI, ';', [3, 4])
3322
+ end
3323
+
3324
+ def test_bug_eql_end
3325
+ assert_scanned(%Q{=begin\n#=end\n=end})
3326
+ end
3327
+
3328
+ def test_bug_hidden_eof
3329
+ @lex.state = :expr_beg
3330
+ assert_scanned(%Q{"foo\0\x1a\x04bar"},
3331
+ :tSTRING_BEG, '"', [0, 1],
3332
+ :tSTRING_CONTENT, "foo\0", [1, 5],
3333
+ :tSTRING_CONTENT, "\x1a", [5, 6],
3334
+ :tSTRING_CONTENT, "\x04", [6, 7],
3335
+ :tSTRING_CONTENT, "bar", [7, 10],
3336
+ :tSTRING_END, '"', [10, 11])
3337
+
3338
+ @lex.state = :expr_beg
3339
+ assert_scanned(%Q{'foo\0\x1a\x04bar'},
3340
+ :tSTRING_BEG, "'", [0, 1],
3341
+ :tSTRING_CONTENT, "foo\0", [1, 5],
3342
+ :tSTRING_CONTENT, "\x1a", [5, 6],
3343
+ :tSTRING_CONTENT, "\x04", [6, 7],
3344
+ :tSTRING_CONTENT, "bar", [7, 10],
3345
+ :tSTRING_END, "'", [10, 11])
3346
+
3347
+ @lex.state = :expr_beg
3348
+ assert_scanned(%Q{%w[foo\0\x1a\x04bar]},
3349
+ :tQWORDS_BEG, '%w[', [0, 3],
3350
+ :tSTRING_CONTENT, "foo\0", [3, 7],
3351
+ :tSTRING_CONTENT, "\x1a", [7, 8],
3352
+ :tSTRING_CONTENT, "\x04", [8, 9],
3353
+ :tSTRING_CONTENT, "bar", [9, 12],
3354
+ :tSPACE, nil, [12, 12],
3355
+ :tSTRING_END, ']', [12, 13])
3356
+
3357
+ @lex.state = :expr_beg
3358
+ assert_scanned(%Q{%W[foo\0\x1a\x04bar]},
3359
+ :tWORDS_BEG, '%W[', [0, 3],
3360
+ :tSTRING_CONTENT, "foo\0", [3, 7],
3361
+ :tSTRING_CONTENT, "\x1a", [7, 8],
3362
+ :tSTRING_CONTENT, "\x04", [8, 9],
3363
+ :tSTRING_CONTENT, "bar", [9, 12],
3364
+ :tSPACE, nil, [12, 12],
3365
+ :tSTRING_END, ']', [12, 13])
3366
+
3367
+ @lex.state = :expr_beg
3368
+ assert_scanned(%Q{# foo\0\nbar},
3369
+ :tIDENTIFIER, 'bar', [7, 10])
3370
+
3371
+ @lex.state = :line_begin
3372
+ assert_scanned(%Q{=begin\n\0\n=end\nbar},
3373
+ :tIDENTIFIER, 'bar', [14, 17])
3374
+ end
3375
+
3376
+ def test_bug_num_adj_kw
3377
+ assert_scanned('1if',
3378
+ :tINTEGER, 1, [0, 1],
3379
+ :kIF_MOD, 'if', [1, 3])
3380
+
3381
+ assert_scanned('1.0if',
3382
+ :tFLOAT, 1.0, [0, 3],
3383
+ :kIF_MOD, 'if', [3, 5])
3384
+ end
3385
+
3386
+ if defined?(Encoding)
3387
+ def test_bug_unicode_in_literal
3388
+ setup_lexer(19)
3389
+ assert_scanned('"\u00a4"',
3390
+ :tSTRING, "\u00a4", [0, 8])
3391
+ end
3392
+
3393
+ def test_bug_utf32le_leak
3394
+ setup_lexer(19)
3395
+ @lex.force_utf32 = true
3396
+ assert_scanned('"F0"',
3397
+ :tSTRING, "F0", [0, 4])
3398
+ end
3399
+ end
3400
+
3401
+ def test_bug_ragel_stack
3402
+ assert_scanned("\"\#{$2 ? $2 : 1}\"",
3403
+ :tSTRING_BEG, "\"", [0, 1],
3404
+ :tSTRING_DBEG, "\#{", [1, 3],
3405
+ :tNTH_REF, 2, [3, 5],
3406
+ :tEH, "?", [6, 7],
3407
+ :tNTH_REF, 2, [8, 10],
3408
+ :tCOLON, ":", [11, 12],
3409
+ :tINTEGER, 1, [13, 14],
3410
+ :tRCURLY, "}", [14, 15],
3411
+ :tSTRING_END, "\"", [15, 16])
3412
+ end
3413
+
3414
+ end