zuora_connect_ui 0.8.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1423) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -36
  3. data/app/assets/javascripts/zuora_connect_ui/input.js +0 -16
  4. data/app/assets/stylesheets/_zuora_connect_ui.scss +2 -1
  5. data/app/assets/stylesheets/zuora_connect_ui/datepicker.scss +2 -1
  6. data/app/assets/stylesheets/zuora_connect_ui/input.scss +34 -38
  7. data/app/helpers/zuora_connect_ui/input_helper.rb +2 -1
  8. data/lib/zuora_connect_ui/version.rb +1 -1
  9. data/vendor/assets/contextMenu/js/jquery.contextMenu.min.js +0 -1
  10. data/vendor/ruby/2.6.0/cache/autoprefixer-rails-9.6.4.gem +0 -0
  11. data/vendor/ruby/2.6.0/cache/erubi-1.9.0.gem +0 -0
  12. data/vendor/ruby/2.6.0/cache/i18n-1.7.0.gem +0 -0
  13. data/vendor/ruby/2.6.0/cache/loofah-2.3.0.gem +0 -0
  14. data/vendor/ruby/2.6.0/cache/minitest-5.12.2.gem +0 -0
  15. data/vendor/ruby/2.6.0/cache/parallel-1.18.0.gem +0 -0
  16. data/vendor/ruby/2.6.0/cache/parser-2.6.5.0.gem +0 -0
  17. data/vendor/ruby/2.6.0/cache/peek-1.1.0.gem +0 -0
  18. data/vendor/ruby/2.6.0/cache/rails-html-sanitizer-1.3.0.gem +0 -0
  19. data/vendor/ruby/2.6.0/cache/rspec-expectations-3.8.6.gem +0 -0
  20. data/vendor/ruby/2.6.0/cache/rspec-mocks-3.8.2.gem +0 -0
  21. data/vendor/ruby/2.6.0/cache/rspec-support-3.8.3.gem +0 -0
  22. data/vendor/ruby/2.6.0/cache/rubocop-0.75.0.gem +0 -0
  23. data/vendor/ruby/2.6.0/cache/sassc-2.2.1.gem +0 -0
  24. data/vendor/ruby/2.6.0/cache/tilt-2.0.10.gem +0 -0
  25. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/sassc-2.2.1/gem.build_complete +0 -0
  26. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/sassc-2.2.1/gem_make.out +75 -0
  27. data/vendor/ruby/2.6.0/extensions/x86_64-linux/2.6.0/sassc-2.2.1/sassc/libsass.so +0 -0
  28. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/CHANGELOG.md +1094 -0
  29. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/Gemfile +10 -0
  30. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/LICENSE +20 -0
  31. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/README.md +237 -0
  32. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/Rakefile +53 -0
  33. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/autoprefixer-rails.gemspec +32 -0
  34. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/autoprefixer-rails.rb +41 -0
  35. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/autoprefixer-rails/processor.rb +194 -0
  36. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/autoprefixer-rails/railtie.rb +50 -0
  37. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/autoprefixer-rails/result.rb +24 -0
  38. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/autoprefixer-rails/sprockets.rb +62 -0
  39. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/autoprefixer-rails/version.rb +3 -0
  40. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/lib/rake/autoprefixer_tasks.rb +28 -0
  41. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/Rakefile +2 -0
  42. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/assets/config/manifest.js +0 -0
  43. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/assets/stylesheets/evaluate.css.erb +1 -0
  44. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/assets/stylesheets/loaded.sass +2 -0
  45. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/assets/stylesheets/sass.sass +1 -0
  46. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/assets/stylesheets/test.css +3 -0
  47. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/assets/stylesheets/wrong.css +2 -0
  48. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/controllers/application_controller.rb +2 -0
  49. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/app/controllers/css_controller.rb +6 -0
  50. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config.ru +2 -0
  51. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/application.rb +16 -0
  52. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/autoprefixer.yml +2 -0
  53. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/boot.rb +2 -0
  54. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/environment.rb +3 -0
  55. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/environments/test.rb +9 -0
  56. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/initializers/secret_token.rb +1 -0
  57. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/app/config/routes.rb +3 -0
  58. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/autoprefixer_spec.rb +121 -0
  59. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/processor_spec.rb +25 -0
  60. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/rails_spec.rb +40 -0
  61. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/railtie_spec.rb +29 -0
  62. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/spec/spec_helper.rb +16 -0
  63. data/vendor/ruby/2.6.0/gems/autoprefixer-rails-9.6.4/vendor/autoprefixer.js +67521 -0
  64. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/CHANGELOG +79 -0
  65. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/MIT-LICENSE +21 -0
  66. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/README.rdoc +109 -0
  67. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/Rakefile +78 -0
  68. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/lib/erubi.rb +211 -0
  69. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/lib/erubi/capture_end.rb +52 -0
  70. data/vendor/ruby/2.6.0/gems/erubi-1.9.0/test/test.rb +780 -0
  71. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/MIT-LICENSE +20 -0
  72. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/README.md +125 -0
  73. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n.rb +398 -0
  74. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend.rb +21 -0
  75. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/base.rb +284 -0
  76. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/cache.rb +113 -0
  77. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/cache_file.rb +36 -0
  78. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/cascade.rb +56 -0
  79. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/chain.rb +131 -0
  80. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/fallbacks.rb +84 -0
  81. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/flatten.rb +115 -0
  82. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/gettext.rb +85 -0
  83. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/interpolation_compiler.rb +123 -0
  84. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/key_value.rb +206 -0
  85. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/memoize.rb +54 -0
  86. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/metadata.rb +71 -0
  87. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/pluralization.rb +55 -0
  88. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/simple.rb +109 -0
  89. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/backend/transliterator.rb +108 -0
  90. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/config.rb +165 -0
  91. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/core_ext/hash.rb +47 -0
  92. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/exceptions.rb +111 -0
  93. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/gettext.rb +28 -0
  94. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/gettext/helpers.rb +75 -0
  95. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/gettext/po_parser.rb +329 -0
  96. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/interpolate/ruby.rb +39 -0
  97. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/locale.rb +8 -0
  98. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/locale/fallbacks.rb +97 -0
  99. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/locale/tag.rb +28 -0
  100. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/locale/tag/parents.rb +22 -0
  101. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/locale/tag/rfc4646.rb +74 -0
  102. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/locale/tag/simple.rb +39 -0
  103. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/middleware.rb +17 -0
  104. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests.rb +14 -0
  105. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/basics.rb +60 -0
  106. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/defaults.rb +52 -0
  107. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/interpolation.rb +163 -0
  108. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/link.rb +56 -0
  109. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/localization.rb +19 -0
  110. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/localization/date.rb +117 -0
  111. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/localization/date_time.rb +103 -0
  112. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/localization/procs.rb +116 -0
  113. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/localization/time.rb +103 -0
  114. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/lookup.rb +81 -0
  115. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/pluralization.rb +35 -0
  116. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/tests/procs.rb +55 -0
  117. data/vendor/ruby/2.6.0/gems/i18n-1.7.0/lib/i18n/version.rb +5 -0
  118. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/CHANGELOG.md +327 -0
  119. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/Gemfile +22 -0
  120. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/MIT-LICENSE.txt +23 -0
  121. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/Manifest.txt +41 -0
  122. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/README.md +369 -0
  123. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/Rakefile +81 -0
  124. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/SECURITY.md +18 -0
  125. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/benchmark/benchmark.rb +149 -0
  126. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/benchmark/fragment.html +96 -0
  127. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/benchmark/helper.rb +73 -0
  128. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/benchmark/www.slashdot.com.html +2560 -0
  129. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah.rb +83 -0
  130. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/elements.rb +92 -0
  131. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/helpers.rb +103 -0
  132. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/html/document.rb +18 -0
  133. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/html/document_fragment.rb +40 -0
  134. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/html5/libxml2_workarounds.rb +26 -0
  135. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/html5/safelist.rb +800 -0
  136. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/html5/scrub.rb +133 -0
  137. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/instance_methods.rb +127 -0
  138. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/metahelpers.rb +13 -0
  139. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/scrubber.rb +133 -0
  140. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/scrubbers.rb +297 -0
  141. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/xml/document.rb +13 -0
  142. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/lib/loofah/xml/document_fragment.rb +23 -0
  143. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/assets/msword.html +63 -0
  144. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/assets/testdata_sanitizer_tests1.dat +502 -0
  145. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/helper.rb +18 -0
  146. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/html5/test_sanitizer.rb +401 -0
  147. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/html5/test_scrub.rb +10 -0
  148. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/integration/test_ad_hoc.rb +204 -0
  149. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/integration/test_helpers.rb +43 -0
  150. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/integration/test_html.rb +72 -0
  151. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/integration/test_scrubbers.rb +400 -0
  152. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/integration/test_xml.rb +55 -0
  153. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/unit/test_api.rb +142 -0
  154. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/unit/test_encoding.rb +20 -0
  155. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/unit/test_helpers.rb +62 -0
  156. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/unit/test_scrubber.rb +229 -0
  157. data/vendor/ruby/2.6.0/gems/loofah-2.3.0/test/unit/test_scrubbers.rb +14 -0
  158. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/History.rdoc +1347 -0
  159. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/Manifest.txt +27 -0
  160. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/README.rdoc +763 -0
  161. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/Rakefile +72 -0
  162. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/design_rationale.rb +52 -0
  163. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/hoe/minitest.rb +32 -0
  164. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest.rb +1041 -0
  165. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/assertions.rb +726 -0
  166. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/autorun.rb +13 -0
  167. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/benchmark.rb +455 -0
  168. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/expectations.rb +284 -0
  169. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/hell.rb +11 -0
  170. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/mock.rb +240 -0
  171. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/parallel.rb +70 -0
  172. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/pride.rb +4 -0
  173. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/pride_plugin.rb +142 -0
  174. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/spec.rb +335 -0
  175. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/test.rb +220 -0
  176. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/lib/minitest/unit.rb +45 -0
  177. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/metametameta.rb +105 -0
  178. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/test_minitest_assertions.rb +1389 -0
  179. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/test_minitest_benchmark.rb +137 -0
  180. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/test_minitest_mock.rb +874 -0
  181. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/test_minitest_reporter.rb +299 -0
  182. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/test_minitest_spec.rb +1021 -0
  183. data/vendor/ruby/2.6.0/gems/minitest-5.12.2/test/minitest/test_minitest_test.rb +1055 -0
  184. data/vendor/ruby/2.6.0/gems/parallel-1.18.0/MIT-LICENSE.txt +20 -0
  185. data/vendor/ruby/2.6.0/gems/parallel-1.18.0/lib/parallel.rb +520 -0
  186. data/vendor/ruby/2.6.0/gems/parallel-1.18.0/lib/parallel/processor_count.rb +42 -0
  187. data/vendor/ruby/2.6.0/gems/parallel-1.18.0/lib/parallel/version.rb +3 -0
  188. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/CHANGELOG.md +997 -0
  189. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/CONTRIBUTING.md +17 -0
  190. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/Gemfile +10 -0
  191. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/LICENSE.txt +25 -0
  192. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/README.md +301 -0
  193. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/Rakefile +166 -0
  194. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/bin/ruby-parse +7 -0
  195. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/bin/ruby-rewrite +7 -0
  196. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/ci/run_rubocop_specs +14 -0
  197. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/doc/AST_FORMAT.md +1816 -0
  198. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/doc/CUSTOMIZATION.md +37 -0
  199. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/doc/INTERNALS.md +21 -0
  200. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/doc/css/common.css +68 -0
  201. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/gauntlet_parser.rb +123 -0
  202. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser.rb +82 -0
  203. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/all.rb +12 -0
  204. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ast/node.rb +40 -0
  205. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ast/processor.rb +264 -0
  206. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/base.rb +270 -0
  207. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/builders/default.rb +1741 -0
  208. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/clobbering_error.rb +13 -0
  209. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/color.rb +32 -0
  210. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/context.rb +59 -0
  211. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/current.rb +92 -0
  212. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/deprecation.rb +13 -0
  213. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/diagnostic.rb +163 -0
  214. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/diagnostic/engine.rb +105 -0
  215. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer.rb +23730 -0
  216. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer.rl +2533 -0
  217. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer/dedenter.rb +79 -0
  218. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer/explanation.rb +55 -0
  219. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer/literal.rb +269 -0
  220. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer/max_numparam_stack.rb +42 -0
  221. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/lexer/stack_state.rb +49 -0
  222. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/macruby.rb +6124 -0
  223. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/macruby.y +2198 -0
  224. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/messages.rb +90 -0
  225. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/meta.rb +33 -0
  226. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/rewriter.rb +105 -0
  227. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby18.rb +5661 -0
  228. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby18.y +1934 -0
  229. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby19.rb +6084 -0
  230. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby19.y +2175 -0
  231. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby20.rb +6511 -0
  232. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby20.y +2353 -0
  233. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby21.rb +6570 -0
  234. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby21.y +2357 -0
  235. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby22.rb +6605 -0
  236. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby22.y +2364 -0
  237. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby23.rb +6624 -0
  238. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby23.y +2370 -0
  239. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby24.rb +6689 -0
  240. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby24.y +2408 -0
  241. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby25.rb +6656 -0
  242. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby25.y +2405 -0
  243. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby26.rb +6670 -0
  244. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby26.y +2413 -0
  245. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby27.rb +6893 -0
  246. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/ruby27.y +2470 -0
  247. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/rubymotion.rb +6078 -0
  248. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/rubymotion.y +2182 -0
  249. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/runner.rb +253 -0
  250. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/runner/ruby_parse.rb +157 -0
  251. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/runner/ruby_rewrite.rb +101 -0
  252. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/buffer.rb +330 -0
  253. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/comment.rb +121 -0
  254. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/comment/associator.rb +210 -0
  255. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map.rb +186 -0
  256. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/collection.rb +18 -0
  257. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/condition.rb +21 -0
  258. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/constant.rb +32 -0
  259. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/definition.rb +23 -0
  260. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/for.rb +19 -0
  261. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/heredoc.rb +19 -0
  262. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/index.rb +33 -0
  263. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/keyword.rb +20 -0
  264. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/objc_kwarg.rb +19 -0
  265. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/operator.rb +17 -0
  266. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/rescue_body.rb +21 -0
  267. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/send.rb +36 -0
  268. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/ternary.rb +18 -0
  269. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/map/variable.rb +31 -0
  270. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/range.rb +310 -0
  271. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/rewriter.rb +513 -0
  272. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/rewriter/action.rb +44 -0
  273. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/tree_rewriter.rb +301 -0
  274. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/source/tree_rewriter/action.rb +133 -0
  275. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/static_environment.rb +46 -0
  276. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/syntax_error.rb +21 -0
  277. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/tree_rewriter.rb +134 -0
  278. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/lib/parser/version.rb +5 -0
  279. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/parser.gemspec +51 -0
  280. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/bug_163/fixtures/input.rb +5 -0
  281. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/bug_163/fixtures/output.rb +5 -0
  282. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/bug_163/rewriter.rb +20 -0
  283. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/helper.rb +59 -0
  284. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/parse_helper.rb +316 -0
  285. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/racc_coverage_helper.rb +133 -0
  286. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_base.rb +31 -0
  287. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_current.rb +29 -0
  288. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_diagnostic.rb +96 -0
  289. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_diagnostic_engine.rb +62 -0
  290. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_encoding.rb +99 -0
  291. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_lexer.rb +3667 -0
  292. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_lexer_stack_state.rb +78 -0
  293. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_parse_helper.rb +80 -0
  294. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_parser.rb +7644 -0
  295. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_runner_parse.rb +35 -0
  296. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_runner_rewrite.rb +47 -0
  297. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_buffer.rb +162 -0
  298. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_comment.rb +36 -0
  299. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_comment_associator.rb +367 -0
  300. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_map.rb +15 -0
  301. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_range.rb +172 -0
  302. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_rewriter.rb +541 -0
  303. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_rewriter_action.rb +46 -0
  304. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_source_tree_rewriter.rb +173 -0
  305. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/test_static_environment.rb +45 -0
  306. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/using_tree_rewriter/fixtures/input.rb +3 -0
  307. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/using_tree_rewriter/fixtures/output.rb +3 -0
  308. data/vendor/ruby/2.6.0/gems/parser-2.6.5.0/test/using_tree_rewriter/using_tree_rewriter.rb +9 -0
  309. data/vendor/ruby/2.6.0/gems/peek-1.1.0/CHANGELOG.md +97 -0
  310. data/vendor/ruby/2.6.0/gems/peek-1.1.0/Gemfile +30 -0
  311. data/vendor/ruby/2.6.0/gems/peek-1.1.0/Gemfile-rails42 +27 -0
  312. data/vendor/ruby/2.6.0/gems/peek-1.1.0/LICENSE.txt +22 -0
  313. data/vendor/ruby/2.6.0/gems/peek-1.1.0/README.md +243 -0
  314. data/vendor/ruby/2.6.0/gems/peek-1.1.0/Rakefile +13 -0
  315. data/vendor/ruby/2.6.0/gems/peek-1.1.0/app/assets/javascripts/peek.js +86 -0
  316. data/vendor/ruby/2.6.0/gems/peek-1.1.0/app/assets/javascripts/peek/vendor/jquery.tipsy.js +258 -0
  317. data/vendor/ruby/2.6.0/gems/peek-1.1.0/app/assets/stylesheets/peek.scss +85 -0
  318. data/vendor/ruby/2.6.0/gems/peek-1.1.0/app/assets/stylesheets/peek/vendor/tipsy.scss +22 -0
  319. data/vendor/ruby/2.6.0/gems/peek-1.1.0/app/controllers/peek/results_controller.rb +25 -0
  320. data/vendor/ruby/2.6.0/gems/peek-1.1.0/app/views/peek/_bar.html.erb +11 -0
  321. data/vendor/ruby/2.6.0/gems/peek-1.1.0/config/routes.rb +3 -0
  322. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek.rb +93 -0
  323. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/base.rb +17 -0
  324. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/elasticsearch.rb +35 -0
  325. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/memcache.rb +27 -0
  326. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/memory.rb +27 -0
  327. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/redis.rb +23 -0
  328. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/controller_helpers.rb +22 -0
  329. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/railtie.rb +39 -0
  330. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/version.rb +3 -0
  331. data/vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/views/view.rb +124 -0
  332. data/vendor/ruby/2.6.0/gems/peek-1.1.0/peek.gemspec +22 -0
  333. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/controllers/requests_test.rb +33 -0
  334. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/README.rdoc +28 -0
  335. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/Rakefile +6 -0
  336. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/assets/javascripts/application.js +16 -0
  337. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/assets/stylesheets/application.css +14 -0
  338. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/controllers/application_controller.rb +13 -0
  339. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/controllers/home_controller.rb +11 -0
  340. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/helpers/application_helper.rb +2 -0
  341. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/views/home/show.html.erb +5 -0
  342. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/views/layouts/application.html.erb +14 -0
  343. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/app/views/peek/_test_view.html.erb +1 -0
  344. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/bin/bundle +3 -0
  345. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/bin/rails +4 -0
  346. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/bin/rake +4 -0
  347. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config.ru +4 -0
  348. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/application.rb +25 -0
  349. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/boot.rb +5 -0
  350. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/environment.rb +5 -0
  351. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/environments/development.rb +23 -0
  352. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/environments/test.rb +36 -0
  353. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  354. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  355. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/inflections.rb +16 -0
  356. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/mime_types.rb +5 -0
  357. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/peek.rb +3 -0
  358. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/secret_token.rb +12 -0
  359. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/session_store.rb +3 -0
  360. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  361. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/locales/en.yml +23 -0
  362. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/config/routes.rb +8 -0
  363. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/lib/test_view.rb +18 -0
  364. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/public/404.html +58 -0
  365. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/public/422.html +58 -0
  366. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/public/500.html +57 -0
  367. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/dummy/public/favicon.ico +0 -0
  368. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/peek/views/view_test.rb +37 -0
  369. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/peek_test.rb +69 -0
  370. data/vendor/ruby/2.6.0/gems/peek-1.1.0/test/test_helper.rb +22 -0
  371. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/CHANGELOG.md +44 -0
  372. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/MIT-LICENSE +23 -0
  373. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/README.md +140 -0
  374. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/lib/rails-html-sanitizer.rb +77 -0
  375. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/lib/rails/html/sanitizer.rb +155 -0
  376. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/lib/rails/html/sanitizer/version.rb +7 -0
  377. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/lib/rails/html/scrubbers.rb +201 -0
  378. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/test/sanitizer_test.rb +568 -0
  379. data/vendor/ruby/2.6.0/gems/rails-html-sanitizer-1.3.0/test/scrubbers_test.rb +174 -0
  380. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/Changelog.md +1156 -0
  381. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/LICENSE.md +25 -0
  382. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/README.md +305 -0
  383. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations.rb +82 -0
  384. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  385. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/configuration.rb +215 -0
  386. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/expectation_target.rb +127 -0
  387. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/fail_with.rb +39 -0
  388. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/failure_aggregator.rb +194 -0
  389. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/handler.rb +170 -0
  390. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/minitest_integration.rb +58 -0
  391. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/syntax.rb +132 -0
  392. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/expectations/version.rb +8 -0
  393. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers.rb +1034 -0
  394. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/aliased_matcher.rb +116 -0
  395. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in.rb +52 -0
  396. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/all.rb +86 -0
  397. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/base_matcher.rb +193 -0
  398. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/be.rb +288 -0
  399. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/be_between.rb +77 -0
  400. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/be_instance_of.rb +26 -0
  401. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/be_kind_of.rb +20 -0
  402. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/be_within.rb +72 -0
  403. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/change.rb +428 -0
  404. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/compound.rb +271 -0
  405. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  406. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/cover.rb +24 -0
  407. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/eq.rb +40 -0
  408. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/eql.rb +34 -0
  409. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/equal.rb +81 -0
  410. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/exist.rb +90 -0
  411. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/has.rb +103 -0
  412. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  413. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/include.rb +149 -0
  414. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/match.rb +106 -0
  415. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/operators.rb +128 -0
  416. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/output.rb +200 -0
  417. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/raise_error.rb +230 -0
  418. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/respond_to.rb +165 -0
  419. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/satisfy.rb +60 -0
  420. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  421. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/throw_symbol.rb +132 -0
  422. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/built_in/yield.rb +432 -0
  423. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/composable.rb +171 -0
  424. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/dsl.rb +527 -0
  425. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/english_phrasing.rb +58 -0
  426. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +73 -0
  427. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/fail_matchers.rb +42 -0
  428. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/generated_descriptions.rb +41 -0
  429. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/matcher_delegator.rb +35 -0
  430. data/vendor/ruby/2.6.0/gems/rspec-expectations-3.8.6/lib/rspec/matchers/matcher_protocol.rb +99 -0
  431. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/Changelog.md +1114 -0
  432. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/LICENSE.md +25 -0
  433. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/README.md +460 -0
  434. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks.rb +130 -0
  435. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance.rb +11 -0
  436. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/chain.rb +110 -0
  437. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/error_generator.rb +31 -0
  438. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/expect_chain_chain.rb +31 -0
  439. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/expectation_chain.rb +50 -0
  440. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/message_chains.rb +83 -0
  441. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/proxy.rb +116 -0
  442. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/recorder.rb +289 -0
  443. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/stub_chain.rb +51 -0
  444. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
  445. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/argument_list_matcher.rb +100 -0
  446. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/argument_matchers.rb +322 -0
  447. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/configuration.rb +212 -0
  448. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/error_generator.rb +369 -0
  449. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/example_methods.rb +434 -0
  450. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/instance_method_stasher.rb +146 -0
  451. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/marshal_extension.rb +41 -0
  452. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/matchers/expectation_customization.rb +20 -0
  453. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/matchers/have_received.rb +134 -0
  454. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/matchers/receive.rb +132 -0
  455. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/matchers/receive_message_chain.rb +82 -0
  456. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/matchers/receive_messages.rb +77 -0
  457. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/message_chain.rb +87 -0
  458. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/message_expectation.rb +741 -0
  459. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/method_double.rb +287 -0
  460. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/method_reference.rb +202 -0
  461. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/minitest_integration.rb +68 -0
  462. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/mutate_const.rb +339 -0
  463. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/object_reference.rb +149 -0
  464. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/order_group.rb +81 -0
  465. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/proxy.rb +485 -0
  466. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/space.rb +238 -0
  467. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/standalone.rb +3 -0
  468. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/syntax.rb +325 -0
  469. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/targets.rb +124 -0
  470. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/test_double.rb +171 -0
  471. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/verifying_double.rb +129 -0
  472. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/verifying_message_expectation.rb +54 -0
  473. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/verifying_proxy.rb +220 -0
  474. data/vendor/ruby/2.6.0/gems/rspec-mocks-3.8.2/lib/rspec/mocks/version.rb +9 -0
  475. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/Changelog.md +269 -0
  476. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/LICENSE.md +23 -0
  477. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/README.md +40 -0
  478. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support.rb +149 -0
  479. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/caller_filter.rb +83 -0
  480. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/comparable_version.rb +46 -0
  481. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/differ.rb +215 -0
  482. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/directory_maker.rb +63 -0
  483. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/encoded_string.rb +165 -0
  484. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/fuzzy_matcher.rb +48 -0
  485. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/hunk_generator.rb +47 -0
  486. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/matcher_definition.rb +42 -0
  487. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/method_signature_verifier.rb +438 -0
  488. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/mutex.rb +73 -0
  489. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/object_formatter.rb +275 -0
  490. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/recursive_const_methods.rb +76 -0
  491. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/reentrant_mutex.rb +53 -0
  492. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/ruby_features.rb +176 -0
  493. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/source.rb +75 -0
  494. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/source/location.rb +21 -0
  495. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/source/node.rb +110 -0
  496. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/source/token.rb +87 -0
  497. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec.rb +81 -0
  498. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/deprecation_helpers.rb +64 -0
  499. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/formatting_support.rb +9 -0
  500. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/in_sub_process.rb +69 -0
  501. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/library_wide_checks.rb +150 -0
  502. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/shell_out.rb +89 -0
  503. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/stderr_splitter.rb +63 -0
  504. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/string_matcher.rb +46 -0
  505. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/with_isolated_directory.rb +13 -0
  506. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/spec/with_isolated_stderr.rb +13 -0
  507. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/version.rb +7 -0
  508. data/vendor/ruby/2.6.0/gems/rspec-support-3.8.3/lib/rspec/support/warnings.rb +39 -0
  509. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/LICENSE.txt +20 -0
  510. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/README.md +217 -0
  511. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/assets/logo.png +0 -0
  512. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/assets/output.html.erb +261 -0
  513. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/bin/console +10 -0
  514. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/bin/setup +7 -0
  515. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/config/default.yml +3939 -0
  516. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/exe/rubocop +17 -0
  517. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop.rb +608 -0
  518. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/builder.rb +81 -0
  519. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node.rb +640 -0
  520. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/alias_node.rb +24 -0
  521. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/and_node.rb +29 -0
  522. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/args_node.rb +29 -0
  523. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/array_node.rb +57 -0
  524. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/block_node.rb +115 -0
  525. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/break_node.rb +17 -0
  526. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/case_node.rb +56 -0
  527. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/class_node.rb +31 -0
  528. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/def_node.rb +71 -0
  529. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/defined_node.rb +17 -0
  530. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/ensure_node.rb +17 -0
  531. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/float_node.rb +12 -0
  532. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/for_node.rb +53 -0
  533. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/hash_node.rb +109 -0
  534. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/if_node.rb +175 -0
  535. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/int_node.rb +12 -0
  536. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/keyword_splat_node.rb +45 -0
  537. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/basic_literal_node.rb +16 -0
  538. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/binary_operator_node.rb +43 -0
  539. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/collection_node.rb +15 -0
  540. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/conditional_node.rb +45 -0
  541. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/hash_element_node.rb +125 -0
  542. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/method_dispatch_node.rb +261 -0
  543. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/method_identifier_predicates.rb +114 -0
  544. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/modifier_node.rb +17 -0
  545. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/numeric_node.rb +21 -0
  546. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/parameterized_node.rb +61 -0
  547. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/predicate_operator_node.rb +35 -0
  548. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/module_node.rb +24 -0
  549. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/or_node.rb +29 -0
  550. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/pair_node.rb +63 -0
  551. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/range_node.rb +18 -0
  552. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/regexp_node.rb +35 -0
  553. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/resbody_node.rb +24 -0
  554. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/retry_node.rb +17 -0
  555. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/self_class_node.rb +24 -0
  556. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/send_node.rb +13 -0
  557. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/str_node.rb +16 -0
  558. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/super_node.rb +21 -0
  559. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/symbol_node.rb +12 -0
  560. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/until_node.rb +35 -0
  561. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/when_node.rb +53 -0
  562. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/while_node.rb +35 -0
  563. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/yield_node.rb +21 -0
  564. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/sexp.rb +16 -0
  565. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/traversal.rb +183 -0
  566. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cached_data.rb +58 -0
  567. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cli.rb +343 -0
  568. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/comment_config.rb +201 -0
  569. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/config.rb +244 -0
  570. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/config_loader.rb +273 -0
  571. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/config_loader_resolver.rb +194 -0
  572. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/config_obsoletion.rb +213 -0
  573. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/config_store.rb +48 -0
  574. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/config_validator.rb +239 -0
  575. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/autocorrect_logic.rb +103 -0
  576. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/badge.rb +73 -0
  577. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/bundler/duplicated_gem.rb +73 -0
  578. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/bundler/gem_comment.rb +64 -0
  579. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/bundler/insecure_protocol_source.rb +69 -0
  580. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/bundler/ordered_gems.rb +73 -0
  581. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/commissioner.rb +137 -0
  582. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/cop.rb +271 -0
  583. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/corrector.rb +171 -0
  584. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/alignment_corrector.rb +146 -0
  585. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/condition_corrector.rb +28 -0
  586. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/each_to_for_corrector.rb +53 -0
  587. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/empty_line_corrector.rb +26 -0
  588. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/for_to_each_corrector.rb +73 -0
  589. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +136 -0
  590. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/line_break_corrector.rb +61 -0
  591. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +68 -0
  592. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +44 -0
  593. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/parentheses_corrector.rb +31 -0
  594. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/percent_literal_corrector.rb +117 -0
  595. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/punctuation_corrector.rb +29 -0
  596. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/space_corrector.rb +49 -0
  597. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/string_literal_corrector.rb +25 -0
  598. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/correctors/unused_arg_corrector.rb +43 -0
  599. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/force.rb +42 -0
  600. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/gemspec/duplicated_assignment.rb +104 -0
  601. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/gemspec/ordered_dependencies.rb +106 -0
  602. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/gemspec/required_ruby_version.rb +85 -0
  603. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +55 -0
  604. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/generator.rb +223 -0
  605. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/generator/configuration_injector.rb +66 -0
  606. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/generator/require_file_injector.rb +78 -0
  607. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/ignored_node.rb +38 -0
  608. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs.rb +8 -0
  609. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs/node_destructuring.rb +44 -0
  610. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +44 -0
  611. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +54 -0
  612. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +48 -0
  613. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +73 -0
  614. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +52 -0
  615. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/access_modifier_indentation.rb +98 -0
  616. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/align_arguments.rb +93 -0
  617. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/align_array.rb +39 -0
  618. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/align_hash.rb +358 -0
  619. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/align_parameters.rb +118 -0
  620. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/block_alignment.rb +244 -0
  621. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/block_end_newline.rb +62 -0
  622. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/case_indentation.rb +161 -0
  623. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/class_structure.rb +340 -0
  624. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +126 -0
  625. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +203 -0
  626. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/comment_indentation.rb +144 -0
  627. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/condition_position.rb +56 -0
  628. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/def_end_alignment.rb +74 -0
  629. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/dot_position.rb +105 -0
  630. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/else_alignment.rb +134 -0
  631. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_comment.rb +160 -0
  632. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +142 -0
  633. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +64 -0
  634. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_line_between_defs.rb +151 -0
  635. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines.rb +76 -0
  636. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +215 -0
  637. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +99 -0
  638. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb +45 -0
  639. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +41 -0
  640. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +88 -0
  641. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +136 -0
  642. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +45 -0
  643. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +62 -0
  644. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/end_alignment.rb +189 -0
  645. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/end_of_line.rb +87 -0
  646. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/extra_spacing.rb +201 -0
  647. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/first_array_element_line_break.rb +45 -0
  648. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/first_hash_element_line_break.rb +37 -0
  649. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/first_method_argument_line_break.rb +55 -0
  650. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +46 -0
  651. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +289 -0
  652. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indent_assignment.rb +54 -0
  653. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indent_first_argument.rb +247 -0
  654. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indent_first_array_element.rb +167 -0
  655. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indent_first_hash_element.rb +184 -0
  656. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indent_first_parameter.rb +100 -0
  657. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indent_heredoc.rb +256 -0
  658. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indentation_consistency.rb +202 -0
  659. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/indentation_width.rb +364 -0
  660. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/initial_indentation.rb +59 -0
  661. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/leading_blank_lines.rb +53 -0
  662. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/leading_comment_space.rb +88 -0
  663. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +118 -0
  664. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_array_line_breaks.rb +39 -0
  665. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_assignment_layout.rb +95 -0
  666. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_block_layout.rb +146 -0
  667. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +122 -0
  668. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +50 -0
  669. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +54 -0
  670. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +134 -0
  671. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +220 -0
  672. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +131 -0
  673. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/multiline_operation_indentation.rb +114 -0
  674. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +189 -0
  675. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_after_colon.rb +47 -0
  676. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_after_comma.rb +35 -0
  677. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_after_method_name.rb +42 -0
  678. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_after_not.rb +40 -0
  679. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_after_semicolon.rb +32 -0
  680. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_around_block_parameters.rb +169 -0
  681. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +92 -0
  682. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_around_keyword.rb +232 -0
  683. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_around_operators.rb +182 -0
  684. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_before_block_braces.rb +119 -0
  685. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_before_comma.rb +31 -0
  686. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_before_comment.rb +35 -0
  687. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_before_first_arg.rb +67 -0
  688. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_before_semicolon.rb +27 -0
  689. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_in_lambda_literal.rb +80 -0
  690. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +228 -0
  691. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +53 -0
  692. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_block_braces.rb +248 -0
  693. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +207 -0
  694. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_parens.rb +113 -0
  695. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +65 -0
  696. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_range_literal.rb +63 -0
  697. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +150 -0
  698. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +65 -0
  699. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/tab.rb +75 -0
  700. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/trailing_blank_lines.rb +113 -0
  701. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/layout/trailing_whitespace.rb +61 -0
  702. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/ambiguous_block_association.rb +62 -0
  703. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/ambiguous_operator.rb +55 -0
  704. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +43 -0
  705. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/assignment_in_condition.rb +97 -0
  706. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/big_decimal_new.rb +44 -0
  707. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/boolean_symbol.rb +38 -0
  708. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/circular_argument_reference.rb +72 -0
  709. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/debugger.rb +77 -0
  710. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/deprecated_class_methods.rb +111 -0
  711. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +81 -0
  712. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/duplicate_case_condition.rb +53 -0
  713. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/duplicate_methods.rb +239 -0
  714. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/duplicated_key.rb +38 -0
  715. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/each_with_object_argument.rb +42 -0
  716. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/else_layout.rb +66 -0
  717. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/empty_ensure.rb +60 -0
  718. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/empty_expression.rb +42 -0
  719. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/empty_interpolation.rb +36 -0
  720. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/empty_when.rb +38 -0
  721. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/end_in_method.rb +40 -0
  722. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/ensure_return.rb +46 -0
  723. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/erb_new_arguments.rb +163 -0
  724. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/flip_flop.rb +32 -0
  725. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/float_out_of_range.rb +35 -0
  726. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/format_parameter_mismatch.rb +159 -0
  727. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/handle_exceptions.rb +95 -0
  728. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/heredoc_method_call_position.rb +156 -0
  729. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/implicit_string_concatenation.rb +101 -0
  730. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/ineffective_access_modifier.rb +127 -0
  731. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/inherit_exception.rb +100 -0
  732. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/interpolation_check.rb +40 -0
  733. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/literal_as_condition.rb +138 -0
  734. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/literal_in_interpolation.rb +98 -0
  735. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/loop.rb +63 -0
  736. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +84 -0
  737. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/multiple_compare.rb +48 -0
  738. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/nested_method_definition.rb +104 -0
  739. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/nested_percent_literal.rb +51 -0
  740. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/next_without_accumulator.rb +50 -0
  741. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +83 -0
  742. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/number_conversion.rb +81 -0
  743. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/ordered_magic_comments.rb +86 -0
  744. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +64 -0
  745. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/percent_string_array.rb +73 -0
  746. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/percent_symbol_array.rb +69 -0
  747. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/rand_one.rb +45 -0
  748. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/redundant_with_index.rb +82 -0
  749. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/redundant_with_object.rb +83 -0
  750. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/regexp_as_condition.rb +29 -0
  751. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/require_parentheses.rb +66 -0
  752. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/rescue_exception.rb +46 -0
  753. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/rescue_type.rb +94 -0
  754. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/return_in_void_context.rb +74 -0
  755. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/safe_navigation_chain.rb +66 -0
  756. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/safe_navigation_consistency.rb +94 -0
  757. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +38 -0
  758. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/script_permission.rb +70 -0
  759. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/send_with_mixin_argument.rb +91 -0
  760. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/shadowed_argument.rb +182 -0
  761. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/shadowed_exception.rb +178 -0
  762. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +53 -0
  763. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/string_conversion_in_interpolation.rb +59 -0
  764. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/syntax.rb +59 -0
  765. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/to_json.rb +41 -0
  766. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +82 -0
  767. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unified_integer.rb +45 -0
  768. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unneeded_cop_disable_directive.rb +263 -0
  769. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unneeded_cop_enable_directive.rb +116 -0
  770. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unneeded_require_statement.rb +50 -0
  771. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unneeded_splat_expansion.rb +172 -0
  772. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unreachable_code.rb +99 -0
  773. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unused_block_argument.rb +149 -0
  774. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/unused_method_argument.rb +68 -0
  775. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/uri_escape_unescape.rb +76 -0
  776. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/uri_regexp.rb +73 -0
  777. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/useless_access_modifier.rb +240 -0
  778. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/useless_assignment.rb +129 -0
  779. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/useless_comparison.rb +28 -0
  780. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/useless_else_without_rescue.rb +49 -0
  781. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/useless_setter_call.rb +164 -0
  782. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/lint/void.rb +170 -0
  783. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/message_annotator.rb +129 -0
  784. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/abc_size.rb +24 -0
  785. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/block_length.rb +50 -0
  786. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/block_nesting.rb +65 -0
  787. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/class_length.rb +36 -0
  788. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +32 -0
  789. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/line_length.rb +321 -0
  790. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/method_length.rb +36 -0
  791. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/module_length.rb +36 -0
  792. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/parameter_lists.rb +54 -0
  793. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/perceived_complexity.rb +61 -0
  794. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +67 -0
  795. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/migration/department_name.rb +44 -0
  796. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/alignment.rb +74 -0
  797. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/annotation_comment.rb +37 -0
  798. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/array_min_size.rb +59 -0
  799. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/array_syntax.rb +17 -0
  800. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/check_assignment.rb +44 -0
  801. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/check_line_breakable.rb +190 -0
  802. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/classish_length.rb +37 -0
  803. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/code_length.rb +38 -0
  804. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/configurable_enforced_style.rb +98 -0
  805. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/configurable_formatting.rb +47 -0
  806. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/configurable_max.rb +23 -0
  807. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/configurable_naming.rb +16 -0
  808. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/configurable_numbering.rb +17 -0
  809. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/def_node.rb +33 -0
  810. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/documentation_comment.rb +52 -0
  811. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/duplication.rb +46 -0
  812. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/empty_lines_around_body.rb +172 -0
  813. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/empty_parameter.rb +24 -0
  814. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/end_keyword_alignment.rb +67 -0
  815. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/enforce_superclass.rb +30 -0
  816. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/first_element_line_break.rb +46 -0
  817. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/frozen_string_literal.rb +53 -0
  818. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/hash_alignment.rb +147 -0
  819. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/heredoc.rb +32 -0
  820. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/ignored_methods.rb +19 -0
  821. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/ignored_pattern.rb +29 -0
  822. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/integer_node.rb +14 -0
  823. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/interpolation.rb +27 -0
  824. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/match_range.rb +26 -0
  825. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/method_complexity.rb +56 -0
  826. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/method_preference.rb +31 -0
  827. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/min_body_length.rb +21 -0
  828. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/multiline_element_indentation.rb +86 -0
  829. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb +33 -0
  830. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +255 -0
  831. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +141 -0
  832. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/negative_conditional.rb +32 -0
  833. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/nil_methods.rb +25 -0
  834. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/on_normal_if_unless.rb +14 -0
  835. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/ordered_gem_node.rb +56 -0
  836. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/parentheses.rb +17 -0
  837. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/parser_diagnostic.rb +37 -0
  838. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/percent_array.rb +52 -0
  839. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/percent_literal.rb +38 -0
  840. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/preceding_following_alignment.rb +181 -0
  841. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/preferred_delimiters.rb +53 -0
  842. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/range_help.rb +117 -0
  843. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/rescue_node.rb +22 -0
  844. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/safe_assignment.rb +23 -0
  845. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/safe_mode.rb +24 -0
  846. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/space_after_punctuation.rb +55 -0
  847. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/space_before_punctuation.rb +49 -0
  848. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/statement_modifier.rb +68 -0
  849. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/string_help.rb +35 -0
  850. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/string_literals_help.rb +23 -0
  851. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/surrounding_space.rb +146 -0
  852. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/target_ruby_version.rb +16 -0
  853. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/too_many_lines.rb +35 -0
  854. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/trailing_body.rb +26 -0
  855. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/trailing_comma.rb +216 -0
  856. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/uncommunicative_name.rb +111 -0
  857. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/mixin/unused_argument.rb +33 -0
  858. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/accessor_method_name.rb +55 -0
  859. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/ascii_identifiers.rb +72 -0
  860. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +43 -0
  861. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/class_and_module_camel_case.rb +33 -0
  862. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/constant_name.rb +81 -0
  863. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/file_name.rb +205 -0
  864. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +62 -0
  865. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +55 -0
  866. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +171 -0
  867. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/method_name.rb +53 -0
  868. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/predicate_name.rb +108 -0
  869. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +112 -0
  870. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/uncommunicative_block_param_name.rb +49 -0
  871. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/uncommunicative_method_param_name.rb +58 -0
  872. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/variable_name.rb +52 -0
  873. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/naming/variable_number.rb +61 -0
  874. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/offense.rb +205 -0
  875. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/registry.rb +211 -0
  876. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/security/eval.rb +31 -0
  877. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/security/json_load.rb +46 -0
  878. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/security/marshal_load.rb +39 -0
  879. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/security/open.rb +71 -0
  880. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/security/yaml_load.rb +37 -0
  881. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/severity.rb +77 -0
  882. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/access_modifier_declarations.rb +112 -0
  883. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/alias.rb +147 -0
  884. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/and_or.rb +146 -0
  885. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/array_join.rb +39 -0
  886. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/ascii_comments.rb +61 -0
  887. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/attr.rb +62 -0
  888. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/auto_resource_cleanup.rb +51 -0
  889. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/bare_percent_literals.rb +78 -0
  890. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/begin_block.rb +22 -0
  891. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/block_comments.rb +70 -0
  892. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/block_delimiters.rb +331 -0
  893. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/braces_around_hash_parameters.rb +209 -0
  894. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/case_equality.rb +30 -0
  895. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/character_literal.rb +53 -0
  896. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/class_and_module_children.rb +151 -0
  897. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/class_check.rb +59 -0
  898. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/class_methods.rb +60 -0
  899. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/class_vars.rb +48 -0
  900. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/collection_methods.rb +77 -0
  901. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/colon_method_call.rb +48 -0
  902. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/colon_method_definition.rb +37 -0
  903. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/command_literal.rb +187 -0
  904. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/comment_annotation.rb +97 -0
  905. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/commented_keyword.rb +73 -0
  906. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/conditional_assignment.rb +668 -0
  907. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/constant_visibility.rb +77 -0
  908. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/copyright.rb +95 -0
  909. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/date_time.rb +77 -0
  910. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/def_with_parentheses.rb +57 -0
  911. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/dir.rb +48 -0
  912. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/documentation.rb +97 -0
  913. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/documentation_method.rb +81 -0
  914. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/double_cop_disable_directive.rb +55 -0
  915. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/double_negation.rb +35 -0
  916. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/each_for_simple_loop.rb +58 -0
  917. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/each_with_object.rb +110 -0
  918. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/empty_block_parameter.rb +48 -0
  919. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/empty_case_condition.rb +107 -0
  920. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/empty_else.rb +175 -0
  921. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/empty_lambda_parameter.rb +45 -0
  922. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/empty_literal.rb +123 -0
  923. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/empty_method.rb +115 -0
  924. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/encoding.rb +56 -0
  925. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/end_block.rb +25 -0
  926. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/eval_with_location.rb +148 -0
  927. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/even_odd.rb +58 -0
  928. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/expand_path_arguments.rb +194 -0
  929. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/float_division.rb +94 -0
  930. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/for.rb +88 -0
  931. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/format_string.rb +124 -0
  932. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/format_string_token.rb +140 -0
  933. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/frozen_string_literal_comment.rb +149 -0
  934. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/global_vars.rb +80 -0
  935. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/guard_clause.rb +121 -0
  936. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/hash_syntax.rb +214 -0
  937. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/identical_conditional_branches.rb +130 -0
  938. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/if_inside_else.rb +87 -0
  939. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/if_unless_modifier.rb +127 -0
  940. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +39 -0
  941. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/if_with_semicolon.rb +30 -0
  942. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/implicit_runtime_error.rb +32 -0
  943. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/infinite_loop.rb +127 -0
  944. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/inline_comment.rb +34 -0
  945. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/inverse_methods.rb +187 -0
  946. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/ip_addresses.rb +76 -0
  947. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/lambda.rb +131 -0
  948. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/lambda_call.rb +93 -0
  949. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/line_end_concatenation.rb +121 -0
  950. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +388 -0
  951. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +77 -0
  952. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/method_called_on_do_end_block.rb +46 -0
  953. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/method_def_parentheses.rb +158 -0
  954. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/method_missing_super.rb +34 -0
  955. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/min_max.rb +68 -0
  956. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/missing_else.rb +180 -0
  957. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/missing_respond_to_missing.rb +46 -0
  958. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/mixin_grouping.rb +148 -0
  959. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/mixin_usage.rb +90 -0
  960. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/module_function.rb +104 -0
  961. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_block_chain.rb +40 -0
  962. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_if_modifier.rb +67 -0
  963. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_if_then.rb +50 -0
  964. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_memoization.rb +94 -0
  965. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_method_signature.rb +61 -0
  966. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_ternary_operator.rb +38 -0
  967. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiline_when_then.rb +55 -0
  968. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/multiple_comparison.rb +92 -0
  969. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/mutable_constant.rb +174 -0
  970. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/negated_if.rb +99 -0
  971. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/negated_unless.rb +89 -0
  972. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/negated_while.rb +48 -0
  973. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/nested_modifier.rb +105 -0
  974. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/nested_parenthesized_calls.rb +67 -0
  975. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/nested_ternary_operator.rb +32 -0
  976. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/next.rb +244 -0
  977. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/nil_comparison.rb +75 -0
  978. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/non_nil_check.rb +124 -0
  979. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/not.rb +82 -0
  980. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/numeric_literal_prefix.rb +124 -0
  981. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/numeric_literals.rb +110 -0
  982. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/numeric_predicate.rb +137 -0
  983. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/one_line_conditional.rb +101 -0
  984. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/option_hash.rb +55 -0
  985. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/optional_arguments.rb +58 -0
  986. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/or_assignment.rb +95 -0
  987. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/parallel_assignment.rb +287 -0
  988. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/parentheses_around_condition.rb +117 -0
  989. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/percent_literal_delimiters.rb +127 -0
  990. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/percent_q_literals.rb +73 -0
  991. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/perl_backrefs.rb +38 -0
  992. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/preferred_hash_methods.rb +75 -0
  993. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/proc.rb +34 -0
  994. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/raise_args.rb +145 -0
  995. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/random_with_offset.rb +158 -0
  996. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_begin.rb +91 -0
  997. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_conditional.rb +97 -0
  998. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_exception.rb +60 -0
  999. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_freeze.rb +67 -0
  1000. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_parentheses.rb +231 -0
  1001. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_return.rb +161 -0
  1002. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_self.rb +171 -0
  1003. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/redundant_sort_by.rb +50 -0
  1004. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/regexp_literal.rb +228 -0
  1005. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/rescue_modifier.rb +73 -0
  1006. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/rescue_standard_error.rb +124 -0
  1007. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/return_nil.rb +89 -0
  1008. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/safe_navigation.rb +264 -0
  1009. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/sample.rb +144 -0
  1010. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/self_assignment.rb +97 -0
  1011. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/semicolon.rb +90 -0
  1012. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/send.rb +31 -0
  1013. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/signal_exception.rb +211 -0
  1014. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/single_line_block_params.rb +95 -0
  1015. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/single_line_methods.rb +83 -0
  1016. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/special_global_vars.rb +213 -0
  1017. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +86 -0
  1018. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/stderr_puts.rb +61 -0
  1019. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/string_hash_keys.rb +50 -0
  1020. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/string_literals.rb +129 -0
  1021. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/string_literals_in_interpolation.rb +49 -0
  1022. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/string_methods.rb +46 -0
  1023. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/strip.rb +46 -0
  1024. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/struct_inheritance.rb +39 -0
  1025. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/symbol_array.rb +119 -0
  1026. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/symbol_literal.rb +32 -0
  1027. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/symbol_proc.rb +110 -0
  1028. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/ternary_parentheses.rb +223 -0
  1029. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_body_on_class.rb +43 -0
  1030. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +54 -0
  1031. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_body_on_module.rb +43 -0
  1032. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +96 -0
  1033. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +58 -0
  1034. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +56 -0
  1035. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_method_end_statement.rb +91 -0
  1036. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trailing_underscore_variable.rb +161 -0
  1037. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/trivial_accessors.rb +191 -0
  1038. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unless_else.rb +55 -0
  1039. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unneeded_capital_w.rb +51 -0
  1040. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unneeded_condition.rb +112 -0
  1041. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unneeded_interpolation.rb +98 -0
  1042. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unneeded_percent_q.rb +112 -0
  1043. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unneeded_sort.rb +165 -0
  1044. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/unpack_first.rb +65 -0
  1045. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/variable_interpolation.rb +48 -0
  1046. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/when_then.rb +37 -0
  1047. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/while_until_do.rb +59 -0
  1048. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/while_until_modifier.rb +61 -0
  1049. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/word_array.rb +102 -0
  1050. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/yoda_condition.rb +141 -0
  1051. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/style/zero_length_predicate.rb +117 -0
  1052. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/team.rb +191 -0
  1053. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/util.rb +127 -0
  1054. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/utils/format_string.rb +128 -0
  1055. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force.rb +464 -0
  1056. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/assignment.rb +96 -0
  1057. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/branch.rb +322 -0
  1058. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/branchable.rb +23 -0
  1059. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/reference.rb +49 -0
  1060. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/scope.rb +109 -0
  1061. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/variable.rb +117 -0
  1062. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/cop/variable_force/variable_table.rb +129 -0
  1063. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/core_ext/string.rb +23 -0
  1064. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/error.rb +34 -0
  1065. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/file_finder.rb +42 -0
  1066. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/auto_gen_config_formatter.rb +16 -0
  1067. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/base_formatter.rb +123 -0
  1068. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/clang_style_formatter.rb +54 -0
  1069. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/colorizable.rb +41 -0
  1070. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/disabled_config_formatter.rb +224 -0
  1071. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/disabled_lines_formatter.rb +57 -0
  1072. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/emacs_style_formatter.rb +27 -0
  1073. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/file_list_formatter.rb +20 -0
  1074. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/formatter_set.rb +106 -0
  1075. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/fuubar_style_formatter.rb +80 -0
  1076. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/html_formatter.rb +141 -0
  1077. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/json_formatter.rb +80 -0
  1078. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/offense_count_formatter.rb +74 -0
  1079. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/pacman_formatter.rb +80 -0
  1080. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/progress_formatter.rb +63 -0
  1081. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/quiet_formatter.rb +13 -0
  1082. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/simple_text_formatter.rb +134 -0
  1083. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/tap_formatter.rb +79 -0
  1084. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/text_util.rb +20 -0
  1085. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/formatter/worst_offenders_formatter.rb +62 -0
  1086. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/magic_comment.rb +214 -0
  1087. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/name_similarity.rb +21 -0
  1088. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/node_pattern.rb +799 -0
  1089. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/options.rb +466 -0
  1090. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/path_util.rb +85 -0
  1091. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/platform.rb +11 -0
  1092. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/processed_source.rb +216 -0
  1093. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/rake_task.rb +79 -0
  1094. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/remote_config.rb +106 -0
  1095. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/result_cache.rb +191 -0
  1096. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/rspec/cop_helper.rb +94 -0
  1097. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/rspec/expect_offense.rb +240 -0
  1098. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/rspec/host_environment_simulation_helper.rb +28 -0
  1099. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/rspec/shared_contexts.rb +90 -0
  1100. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/rspec/support.rb +13 -0
  1101. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/runner.rb +358 -0
  1102. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/string_interpreter.rb +57 -0
  1103. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/string_util.rb +14 -0
  1104. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/target_finder.rb +190 -0
  1105. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/token.rb +114 -0
  1106. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/version.rb +21 -0
  1107. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/warning.rb +11 -0
  1108. data/vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/yaml_duplication_checker.rb +39 -0
  1109. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/CHANGELOG.md +79 -0
  1110. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/CODE_OF_CONDUCT.md +10 -0
  1111. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/Gemfile +2 -0
  1112. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/LICENSE.txt +22 -0
  1113. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/README.md +68 -0
  1114. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/Rakefile +53 -0
  1115. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/Makefile +271 -0
  1116. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/SharedPtr.o +0 -0
  1117. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast.o +0 -0
  1118. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast2c.o +0 -0
  1119. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast_fwd_decl.o +0 -0
  1120. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast_sel_cmp.o +0 -0
  1121. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast_sel_unify.o +0 -0
  1122. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast_selectors.o +0 -0
  1123. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast_supports.o +0 -0
  1124. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/ast_values.o +0 -0
  1125. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/backtrace.o +0 -0
  1126. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/base64vlq.o +0 -0
  1127. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/bind.o +0 -0
  1128. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/c2ast.o +0 -0
  1129. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/c99func.o +0 -0
  1130. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/cencode.o +0 -0
  1131. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/check_nesting.o +0 -0
  1132. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/color_maps.o +0 -0
  1133. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/constants.o +0 -0
  1134. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/context.o +0 -0
  1135. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/cssize.o +0 -0
  1136. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/depend +4 -0
  1137. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/emitter.o +0 -0
  1138. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/environment.o +0 -0
  1139. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/error_handling.o +0 -0
  1140. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/eval.o +0 -0
  1141. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/expand.o +0 -0
  1142. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/extconf.rb +84 -0
  1143. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/extend.o +0 -0
  1144. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/file.o +0 -0
  1145. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_colors.o +0 -0
  1146. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_lists.o +0 -0
  1147. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_maps.o +0 -0
  1148. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_miscs.o +0 -0
  1149. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_numbers.o +0 -0
  1150. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_selectors.o +0 -0
  1151. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_strings.o +0 -0
  1152. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/fn_utils.o +0 -0
  1153. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/inspect.o +0 -0
  1154. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/json.o +0 -0
  1155. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/lexer.o +0 -0
  1156. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass.so +0 -0
  1157. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/VERSION +1 -0
  1158. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/contrib/plugin.cpp +60 -0
  1159. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass.h +15 -0
  1160. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass/base.h +96 -0
  1161. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass/context.h +170 -0
  1162. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass/functions.h +139 -0
  1163. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass/values.h +145 -0
  1164. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass/version.h +12 -0
  1165. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/include/sass2scss.h +120 -0
  1166. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast.cpp +963 -0
  1167. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast.hpp +905 -0
  1168. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast2c.cpp +80 -0
  1169. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast2c.hpp +39 -0
  1170. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_def_macros.hpp +132 -0
  1171. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_fwd_decl.cpp +30 -0
  1172. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_fwd_decl.hpp +341 -0
  1173. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_sel_cmp.cpp +909 -0
  1174. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_sel_unify.cpp +280 -0
  1175. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_selectors.cpp +1475 -0
  1176. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_selectors.hpp +568 -0
  1177. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_supports.cpp +130 -0
  1178. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_supports.hpp +121 -0
  1179. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_values.cpp +967 -0
  1180. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/ast_values.hpp +489 -0
  1181. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/b64/cencode.h +32 -0
  1182. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/b64/encode.h +79 -0
  1183. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/backtrace.cpp +50 -0
  1184. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/backtrace.hpp +29 -0
  1185. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/base64vlq.cpp +47 -0
  1186. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/base64vlq.hpp +30 -0
  1187. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/bind.cpp +312 -0
  1188. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/bind.hpp +15 -0
  1189. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/c2ast.cpp +64 -0
  1190. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/c2ast.hpp +14 -0
  1191. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/c99func.c +54 -0
  1192. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/cencode.c +108 -0
  1193. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/check_nesting.cpp +394 -0
  1194. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/check_nesting.hpp +66 -0
  1195. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/color_maps.cpp +651 -0
  1196. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/color_maps.hpp +331 -0
  1197. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/constants.cpp +194 -0
  1198. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/constants.hpp +194 -0
  1199. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/context.cpp +890 -0
  1200. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/context.hpp +152 -0
  1201. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/cssize.cpp +604 -0
  1202. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/cssize.hpp +77 -0
  1203. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/debug.hpp +43 -0
  1204. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/debugger.hpp +807 -0
  1205. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/emitter.cpp +298 -0
  1206. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/emitter.hpp +103 -0
  1207. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/environment.cpp +260 -0
  1208. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/environment.hpp +119 -0
  1209. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/error_handling.cpp +212 -0
  1210. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/error_handling.hpp +229 -0
  1211. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/eval.cpp +1657 -0
  1212. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/eval.hpp +112 -0
  1213. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/expand.cpp +822 -0
  1214. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/expand.hpp +78 -0
  1215. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/extend.cpp +2132 -0
  1216. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/extend.hpp +86 -0
  1217. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/file.cpp +522 -0
  1218. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/file.hpp +133 -0
  1219. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_colors.cpp +594 -0
  1220. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_colors.hpp +85 -0
  1221. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_lists.cpp +284 -0
  1222. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_lists.hpp +34 -0
  1223. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_maps.cpp +94 -0
  1224. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_maps.hpp +30 -0
  1225. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_miscs.cpp +256 -0
  1226. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_miscs.hpp +40 -0
  1227. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_numbers.cpp +220 -0
  1228. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_numbers.hpp +45 -0
  1229. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_selectors.cpp +235 -0
  1230. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_selectors.hpp +35 -0
  1231. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_strings.cpp +254 -0
  1232. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_strings.hpp +34 -0
  1233. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_utils.cpp +156 -0
  1234. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/fn_utils.hpp +56 -0
  1235. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/inspect.cpp +1087 -0
  1236. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/inspect.hpp +99 -0
  1237. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/json.cpp +1436 -0
  1238. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/json.hpp +117 -0
  1239. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/kwd_arg_macros.hpp +28 -0
  1240. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/lexer.cpp +184 -0
  1241. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/lexer.hpp +315 -0
  1242. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/listize.cpp +84 -0
  1243. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/listize.hpp +38 -0
  1244. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/mapping.hpp +18 -0
  1245. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/memory/SharedPtr.cpp +33 -0
  1246. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/memory/SharedPtr.hpp +286 -0
  1247. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/node.cpp +322 -0
  1248. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/node.hpp +118 -0
  1249. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/operation.hpp +213 -0
  1250. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/operators.cpp +266 -0
  1251. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/operators.hpp +30 -0
  1252. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/output.cpp +339 -0
  1253. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/output.hpp +47 -0
  1254. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/parser.cpp +3153 -0
  1255. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/parser.hpp +402 -0
  1256. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/paths.hpp +71 -0
  1257. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/plugins.cpp +188 -0
  1258. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/plugins.hpp +57 -0
  1259. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/position.cpp +184 -0
  1260. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/position.hpp +124 -0
  1261. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/prelexer.cpp +1780 -0
  1262. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/prelexer.hpp +484 -0
  1263. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/remove_placeholders.cpp +87 -0
  1264. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/remove_placeholders.hpp +34 -0
  1265. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass.cpp +155 -0
  1266. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass.hpp +142 -0
  1267. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass2scss.cpp +895 -0
  1268. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_context.cpp +772 -0
  1269. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_context.hpp +129 -0
  1270. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_functions.cpp +210 -0
  1271. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_functions.hpp +50 -0
  1272. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_util.cpp +152 -0
  1273. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_util.hpp +256 -0
  1274. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_values.cpp +365 -0
  1275. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/sass_values.hpp +82 -0
  1276. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/source_map.cpp +198 -0
  1277. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/source_map.hpp +62 -0
  1278. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/subset_map.cpp +58 -0
  1279. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/subset_map.hpp +76 -0
  1280. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/to_value.cpp +114 -0
  1281. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/to_value.hpp +46 -0
  1282. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/units.cpp +505 -0
  1283. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/units.hpp +110 -0
  1284. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/utf8.h +34 -0
  1285. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/utf8/checked.h +336 -0
  1286. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/utf8/core.h +332 -0
  1287. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/utf8/unchecked.h +235 -0
  1288. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/utf8_string.cpp +105 -0
  1289. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/utf8_string.hpp +37 -0
  1290. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/util.cpp +725 -0
  1291. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/util.hpp +106 -0
  1292. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/util_string.cpp +75 -0
  1293. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/util_string.hpp +19 -0
  1294. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/values.cpp +140 -0
  1295. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass/src/values.hpp +12 -0
  1296. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/listize.o +0 -0
  1297. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/node.o +0 -0
  1298. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/operators.o +0 -0
  1299. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/output.o +0 -0
  1300. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/parser.o +0 -0
  1301. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/plugins.o +0 -0
  1302. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/position.o +0 -0
  1303. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/prelexer.o +0 -0
  1304. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/remove_placeholders.o +0 -0
  1305. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/sass.o +0 -0
  1306. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/sass2scss.o +0 -0
  1307. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/sass_context.o +0 -0
  1308. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/sass_functions.o +0 -0
  1309. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/sass_util.o +0 -0
  1310. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/sass_values.o +0 -0
  1311. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/source_map.o +0 -0
  1312. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/subset_map.o +0 -0
  1313. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/to_value.o +0 -0
  1314. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/units.o +0 -0
  1315. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/utf8_string.o +0 -0
  1316. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/util.o +0 -0
  1317. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/util_string.o +0 -0
  1318. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/ext/values.o +0 -0
  1319. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc.rb +57 -0
  1320. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/dependency.rb +17 -0
  1321. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/engine.rb +139 -0
  1322. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/error.rb +37 -0
  1323. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/functions_handler.rb +73 -0
  1324. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/import_handler.rb +50 -0
  1325. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/importer.rb +31 -0
  1326. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/libsass.so +0 -0
  1327. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native.rb +66 -0
  1328. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/lib_c.rb +21 -0
  1329. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/native_context_api.rb +147 -0
  1330. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/native_functions_api.rb +159 -0
  1331. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/sass2scss_api.rb +10 -0
  1332. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/sass_input_style.rb +13 -0
  1333. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/sass_output_style.rb +12 -0
  1334. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/sass_value.rb +97 -0
  1335. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/native/string_list.rb +10 -0
  1336. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/sass_2_scss.rb +9 -0
  1337. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script.rb +17 -0
  1338. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/functions.rb +8 -0
  1339. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value.rb +137 -0
  1340. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value/bool.rb +32 -0
  1341. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value/color.rb +95 -0
  1342. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value/list.rb +136 -0
  1343. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value/map.rb +69 -0
  1344. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value/number.rb +389 -0
  1345. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value/string.rb +96 -0
  1346. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion.rb +69 -0
  1347. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/base.rb +13 -0
  1348. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/bool.rb +13 -0
  1349. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/color.rb +18 -0
  1350. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/list.rb +25 -0
  1351. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/map.rb +21 -0
  1352. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/number.rb +13 -0
  1353. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/script/value_conversion/string.rb +17 -0
  1354. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/util.rb +231 -0
  1355. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/util/normalized_map.rb +117 -0
  1356. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/lib/sassc/version.rb +5 -0
  1357. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/sassc.gemspec +69 -0
  1358. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/custom_importer_test.rb +127 -0
  1359. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/engine_test.rb +314 -0
  1360. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/error_test.rb +29 -0
  1361. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/fixtures/paths.scss +10 -0
  1362. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/functions_test.rb +323 -0
  1363. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/native_test.rb +213 -0
  1364. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/output_style_test.rb +107 -0
  1365. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/sass_2_scss_test.rb +14 -0
  1366. data/vendor/ruby/2.6.0/gems/sassc-2.2.1/test/test_helper.rb +45 -0
  1367. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/COPYING +18 -0
  1368. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/bin/tilt +122 -0
  1369. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt.rb +166 -0
  1370. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +27 -0
  1371. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/babel.rb +16 -0
  1372. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +24 -0
  1373. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/builder.rb +37 -0
  1374. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +58 -0
  1375. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +78 -0
  1376. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/creole.rb +25 -0
  1377. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/csv.rb +65 -0
  1378. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +3 -0
  1379. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/erb.rb +63 -0
  1380. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +32 -0
  1381. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +43 -0
  1382. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/etanni.rb +27 -0
  1383. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/haml.rb +86 -0
  1384. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +25 -0
  1385. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/less.rb +30 -0
  1386. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/liquid.rb +44 -0
  1387. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +23 -0
  1388. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/mapping.rb +293 -0
  1389. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/markaby.rb +45 -0
  1390. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +22 -0
  1391. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +36 -0
  1392. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +49 -0
  1393. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/plain.rb +16 -0
  1394. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +43 -0
  1395. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/radius.rb +48 -0
  1396. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +39 -0
  1397. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +40 -0
  1398. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +83 -0
  1399. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +23 -0
  1400. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +18 -0
  1401. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/sass.rb +52 -0
  1402. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +34 -0
  1403. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/string.rb +21 -0
  1404. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/template.rb +297 -0
  1405. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +26 -0
  1406. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +22 -0
  1407. data/vendor/ruby/2.6.0/gems/tilt-2.0.10/lib/tilt/yajl.rb +87 -0
  1408. data/vendor/ruby/2.6.0/specifications/autoprefixer-rails-9.6.4.gemspec +47 -0
  1409. data/vendor/ruby/2.6.0/specifications/erubi-1.9.0.gemspec +38 -0
  1410. data/vendor/ruby/2.6.0/specifications/i18n-1.7.0.gemspec +35 -0
  1411. data/vendor/ruby/2.6.0/specifications/loofah-2.3.0.gemspec +71 -0
  1412. data/vendor/ruby/2.6.0/specifications/minitest-5.12.2.gemspec +40 -0
  1413. data/vendor/ruby/2.6.0/specifications/parallel-1.18.0.gemspec +20 -0
  1414. data/vendor/ruby/2.6.0/specifications/parser-2.6.5.0.gemspec +62 -0
  1415. data/vendor/ruby/2.6.0/specifications/peek-1.1.0.gemspec +32 -0
  1416. data/vendor/ruby/2.6.0/specifications/rails-html-sanitizer-1.3.0.gemspec +44 -0
  1417. data/vendor/ruby/2.6.0/specifications/rspec-expectations-3.8.6.gemspec +48 -0
  1418. data/vendor/ruby/2.6.0/specifications/rspec-mocks-3.8.2.gemspec +51 -0
  1419. data/vendor/ruby/2.6.0/specifications/rspec-support-3.8.3.gemspec +39 -0
  1420. data/vendor/ruby/2.6.0/specifications/rubocop-0.75.0.gemspec +56 -0
  1421. data/vendor/ruby/2.6.0/specifications/sassc-2.2.1.gemspec +60 -0
  1422. data/vendor/ruby/2.6.0/specifications/tilt-2.0.10.gemspec +23 -0
  1423. metadata +1415 -2
@@ -0,0 +1,3667 @@
1
+ # encoding: ascii-8bit
2
+ # frozen_string_literal: true
3
+
4
+ require 'helper'
5
+ require 'complex'
6
+
7
+ class TestLexer < Minitest::Test
8
+ def setup_lexer(version)
9
+ @lex = Parser::Lexer.new(version)
10
+
11
+ @lex.comments = []
12
+ @lex.diagnostics = Parser::Diagnostic::Engine.new
13
+ @lex.diagnostics.all_errors_are_fatal = true
14
+ # @lex.diagnostics.consumer = lambda { |diag| $stderr.puts "", diag.render }
15
+ end
16
+
17
+ def setup
18
+ setup_lexer 18
19
+ end
20
+
21
+ #
22
+ # Tools
23
+ #
24
+
25
+ def utf(str)
26
+ str.dup.force_encoding(Encoding::UTF_8)
27
+ end
28
+
29
+ #
30
+ # Additional matchers
31
+ #
32
+
33
+ def refute_scanned(s, *args)
34
+ assert_raises Parser::SyntaxError do
35
+ assert_scanned(s, *args)
36
+ end
37
+ end
38
+
39
+ def assert_escape(expected, input)
40
+ source_buffer = Parser::Source::Buffer.new('(assert_escape)')
41
+
42
+ source_buffer.source = "\"\\#{input}\"".encode(input.encoding)
43
+
44
+ @lex.reset
45
+ @lex.source_buffer = source_buffer
46
+
47
+ lex_token, (lex_value, *) = @lex.advance
48
+
49
+ lex_value.force_encoding(Encoding::BINARY)
50
+
51
+ assert_equal [:tSTRING, expected],
52
+ [lex_token, lex_value],
53
+ source_buffer.source
54
+ end
55
+
56
+ def refute_escape(input)
57
+ err = assert_raises Parser::SyntaxError do
58
+ @lex.state = :expr_beg
59
+ assert_scanned "%Q[\\#{input}]"
60
+ end
61
+ assert_equal :fatal, err.diagnostic.level
62
+ end
63
+
64
+ def assert_lex_fname(name, type, range)
65
+ begin_pos, end_pos = range
66
+ assert_scanned("def #{name} ",
67
+ :kDEF, 'def', [0, 3],
68
+ type, name, [begin_pos + 4, end_pos + 4])
69
+
70
+ assert_equal :expr_endfn, @lex.state
71
+ end
72
+
73
+ def assert_scanned(input, *args)
74
+ source_buffer = Parser::Source::Buffer.new('(assert_scanned)')
75
+ source_buffer.source = input
76
+
77
+ @lex.reset(false)
78
+ @lex.source_buffer = source_buffer
79
+
80
+ until args.empty? do
81
+ token, value, (begin_pos, end_pos) = args.shift(3)
82
+
83
+ lex_token, (lex_value, lex_range) = @lex.advance
84
+ assert lex_token, 'no more tokens'
85
+ assert_operator [lex_token, lex_value], :eql?, [token, value], input
86
+ assert_equal begin_pos, lex_range.begin_pos
87
+ assert_equal end_pos, lex_range.end_pos
88
+ end
89
+
90
+ lex_token, (lex_value, *) = @lex.advance
91
+ refute lex_token, "must be empty, but had #{[lex_token, lex_value].inspect}"
92
+ end
93
+
94
+ #
95
+ # Tests
96
+ #
97
+
98
+ def test_read_escape
99
+ assert_escape "\\", "\\"
100
+ assert_escape "\n", "n"
101
+ assert_escape "\t", "t"
102
+ assert_escape "\r", "r"
103
+ assert_escape "\f", "f"
104
+ assert_escape "\13", "v"
105
+ assert_escape "\0", "0"
106
+ assert_escape "\07", "a"
107
+ assert_escape "\007", "a"
108
+ assert_escape "\033", "e"
109
+ assert_escape "\377", "377"
110
+ assert_escape "\377", "xff"
111
+ assert_escape "\010", "b"
112
+ assert_escape " ", "s"
113
+ assert_escape "q", "q" # plain vanilla escape
114
+ end
115
+
116
+ def test_read_escape_c
117
+ assert_escape "\030", "C-x"
118
+ assert_escape "\030", "cx"
119
+ assert_escape "\230", 'C-\M-x'
120
+ assert_escape "\230", 'c\M-x'
121
+
122
+ assert_escape "\177", "C-?"
123
+ assert_escape "\177", "c?"
124
+ assert_escape "\r", "cM"
125
+ end
126
+
127
+ def test_read_escape_m
128
+ assert_escape "\370", "M-x"
129
+ assert_escape "\230", 'M-\C-x'
130
+ assert_escape "\230", 'M-\cx'
131
+ end
132
+
133
+ def test_read_escape_errors
134
+ refute_escape ""
135
+
136
+ refute_escape "M"
137
+ refute_escape "M-"
138
+ refute_escape "Mx"
139
+
140
+ refute_escape "Cx"
141
+ refute_escape "C"
142
+ refute_escape "C-"
143
+
144
+ refute_escape "c"
145
+
146
+ refute_escape "x"
147
+ end
148
+
149
+ def test_read_escape_unicode__19
150
+ assert_escape "\x09", 'u{9}'
151
+ assert_escape "\x31", 'u{31}'
152
+ assert_escape "\x09\x01", 'u{9 1}'
153
+
154
+ assert_escape "\xc4\xa3", utf('u0123')
155
+ assert_escape "\xc4\xa3\xc3\xb0\xeb\x84\xa3", utf('u{123 f0 B123}')
156
+ end
157
+
158
+ def test_read_escape_unicode_bad__19
159
+ refute_escape 'u123'
160
+ refute_escape 'u{}'
161
+ refute_escape 'u{123 f0h}'
162
+ refute_escape 'u{123 f0'
163
+ end
164
+
165
+ def test_read_escape_whitespaces__27
166
+ setup_lexer 27
167
+
168
+ [ *(0..8), *(14..31) ].each do |code|
169
+ @lex.reset
170
+ refute_scanned "\"\\C-" + code.chr + "\""
171
+
172
+ @lex.reset
173
+ refute_scanned "\"\\M-" + code.chr + "\""
174
+
175
+ @lex.reset
176
+ refute_scanned "\"\\C-\\M-" + code.chr + "\""
177
+
178
+ @lex.reset
179
+ refute_scanned "\"\\M-\\C-" + code.chr + "\""
180
+ end
181
+ end
182
+
183
+ def test_ambiguous_uminus
184
+ assert_scanned("m -3",
185
+ :tIDENTIFIER, "m", [0, 1],
186
+ :tUNARY_NUM, "-", [2, 3],
187
+ :tINTEGER, 3, [3, 4])
188
+ end
189
+
190
+ def test_ambiguous_uplus
191
+ assert_scanned("m +3",
192
+ :tIDENTIFIER, "m", [0, 1],
193
+ :tUNARY_NUM, "+", [2, 3],
194
+ :tINTEGER, 3, [3, 4])
195
+ end
196
+
197
+ def test_and
198
+ assert_scanned "&", :tAMPER, "&", [0, 1]
199
+ end
200
+
201
+ def test_and2
202
+ @lex.state = :expr_end
203
+
204
+ assert_scanned "&&", :tANDOP, "&&", [0, 2]
205
+ end
206
+
207
+ def test_and2_equals
208
+ @lex.state = :expr_end
209
+
210
+ assert_scanned "&&=", :tOP_ASGN, "&&", [0, 3]
211
+ end
212
+
213
+ def test_and_arg
214
+ @lex.state = :expr_arg
215
+
216
+ assert_scanned(" &y",
217
+ :tAMPER, "&", [1, 2],
218
+ :tIDENTIFIER, "y", [2, 3])
219
+ end
220
+
221
+ def test_and_equals
222
+ @lex.state = :expr_end
223
+
224
+ assert_scanned "&=", :tOP_ASGN, "&", [0, 2]
225
+ end
226
+
227
+ def test_and_expr
228
+ @lex.state = :expr_arg
229
+
230
+ assert_scanned("x & y",
231
+ :tIDENTIFIER, "x", [0, 1],
232
+ :tAMPER2, "&", [2, 3],
233
+ :tIDENTIFIER, "y", [4, 5])
234
+ end
235
+
236
+ def test_and_meth
237
+ assert_lex_fname "&", :tAMPER2, [0, 1]
238
+ end
239
+
240
+ def test_and_dot_arg
241
+ @lex.state = :expr_arg
242
+
243
+ assert_scanned "&.", :tANDDOT, "&.", [0, 2]
244
+ end
245
+
246
+ def test_and_dot_cmdarg
247
+ @lex.state = :expr_cmdarg
248
+
249
+ assert_scanned "&.", :tANDDOT, "&.", [0, 2]
250
+ end
251
+
252
+ def test_assoc
253
+ assert_scanned "=>", :tASSOC, "=>", [0, 2]
254
+ end
255
+
256
+ def test_label__18
257
+ assert_scanned("{a:b",
258
+ :tLBRACE, "{", [0, 1],
259
+ :tIDENTIFIER, "a", [1, 2],
260
+ :tSYMBOL, "b", [2, 4])
261
+ end
262
+
263
+ def test_label_in_params__18
264
+ assert_scanned("foo(a:b",
265
+ :tIDENTIFIER, "foo", [0, 3],
266
+ :tLPAREN2, "(", [3, 4],
267
+ :tIDENTIFIER, "a", [4, 5],
268
+ :tSYMBOL, "b", [5, 7])
269
+ end
270
+
271
+ def test_label__19
272
+ setup_lexer 19
273
+
274
+ assert_scanned("{a:b",
275
+ :tLBRACE, "{", [0, 1],
276
+ :tLABEL, "a", [1, 3],
277
+ :tIDENTIFIER, "b", [3, 4])
278
+ end
279
+
280
+ def test_label_in_params__19
281
+ setup_lexer 19
282
+
283
+ assert_scanned("foo(a:b",
284
+ :tIDENTIFIER, "foo", [0, 3],
285
+ :tLPAREN2, "(", [3, 4],
286
+ :tLABEL, "a", [4, 6],
287
+ :tIDENTIFIER, "b", [6, 7])
288
+ end
289
+
290
+ def test_label_fid__19
291
+ setup_lexer 19
292
+
293
+ assert_scanned("{a?:true",
294
+ :tLBRACE, '{', [0, 1],
295
+ :tLABEL, 'a?', [1, 4],
296
+ :kTRUE, 'true', [4, 8])
297
+ end
298
+
299
+ def test_label__22
300
+ setup_lexer 22
301
+
302
+ assert_scanned("{'a':",
303
+ :tLBRACE, '{', [0, 1],
304
+ :tSTRING_BEG, "'", [1, 2],
305
+ :tSTRING_CONTENT, 'a', [2, 3],
306
+ :tLABEL_END, "'", [3, 5])
307
+ end
308
+
309
+ def test_label_nested__22
310
+ setup_lexer 22
311
+
312
+ assert_scanned("{'a\":':",
313
+ :tLBRACE, '{', [0, 1],
314
+ :tSTRING_BEG, "'", [1, 2],
315
+ :tSTRING_CONTENT, 'a":', [2, 5],
316
+ :tLABEL_END, "'", [5, 7])
317
+ end
318
+
319
+ def test_label_colon2__22
320
+ setup_lexer 22
321
+
322
+ assert_scanned("{'a'::",
323
+ :tLBRACE, '{', [0, 1],
324
+ :tSTRING, "a", [1, 4],
325
+ :tCOLON2, '::', [4, 6])
326
+ end
327
+
328
+ def test_pct_string_colon__22
329
+ setup_lexer 22
330
+
331
+ assert_scanned("{%'a':",
332
+ :tLBRACE, '{', [0, 1],
333
+ :tSTRING_BEG, "%'", [1, 3],
334
+ :tSTRING_CONTENT, 'a', [3, 4],
335
+ :tSTRING_END, "'", [4, 5],
336
+ :tCOLON, ':', [5, 6])
337
+ end
338
+
339
+ def test_command_start__19
340
+ setup_lexer 19
341
+
342
+ %w[case elsif for in until when while
343
+ if unless and or].each do |keyword|
344
+ token = "k#{keyword.upcase}".to_sym
345
+
346
+ @lex.reset
347
+ assert_scanned("#{keyword} a:b",
348
+ token, keyword, [0, keyword.length],
349
+ :tIDENTIFIER, "a", [keyword.length + 1, keyword.length + 2],
350
+ :tSYMBOL, "b", [keyword.length + 2, keyword.length + 4])
351
+ end
352
+ end
353
+
354
+ def test_mod_not_command_start__19
355
+ setup_lexer 19
356
+
357
+ %w[if unless while until rescue].each do |keyword|
358
+ token = "k#{keyword.upcase}_MOD".to_sym
359
+
360
+ @lex.state = :expr_end
361
+ assert_scanned("#{keyword} a:b",
362
+ token, keyword, [0, keyword.length],
363
+ :tLABEL, "a", [keyword.length + 1, keyword.length + 3],
364
+ :tIDENTIFIER, "b", [keyword.length + 3, keyword.length + 4])
365
+ end
366
+ end
367
+
368
+ def test_back_ref
369
+ assert_scanned("[$&, $`, $', $+]",
370
+ :tLBRACK, "[", [0, 1],
371
+ :tBACK_REF, "$&", [1, 3], :tCOMMA, ",", [3, 4],
372
+ :tBACK_REF, "$`", [5, 7], :tCOMMA, ",", [7, 8],
373
+ :tBACK_REF, "$'", [9, 11], :tCOMMA, ",", [11, 12],
374
+ :tBACK_REF, "$+", [13, 15],
375
+ :tRBRACK, "]", [15, 16])
376
+ end
377
+
378
+ def test_backslash
379
+ assert_scanned("1 \\\n+ 2",
380
+ :tINTEGER, 1, [0, 1],
381
+ :tPLUS, "+", [4, 5],
382
+ :tINTEGER, 2, [6, 7])
383
+ end
384
+
385
+ def test_backslash_bad
386
+ refute_scanned("1 \\ + 2",
387
+ :tINTEGER, 1, [0, 1])
388
+ end
389
+
390
+ def test_backtick
391
+ assert_scanned("`ls`",
392
+ :tXSTRING_BEG, "`", [0, 1],
393
+ :tSTRING_CONTENT, "ls", [1, 3],
394
+ :tSTRING_END, "`", [3, 4])
395
+ end
396
+
397
+ def test_backtick_cmdarg
398
+ @lex.state = :expr_dot
399
+ assert_scanned("\n`", :tBACK_REF2, "`", [1, 2]) # \n ensures expr_cmd
400
+
401
+ assert_equal :expr_arg, @lex.state
402
+ end
403
+
404
+ def test_backtick_dot
405
+ @lex.state = :expr_dot
406
+ assert_scanned("a.`(3)",
407
+ :tIDENTIFIER, "a", [0, 1],
408
+ :tDOT, ".", [1, 2],
409
+ :tBACK_REF2, "`", [2, 3],
410
+ :tLPAREN2, "(", [3, 4],
411
+ :tINTEGER, 3, [4, 5],
412
+ :tRPAREN, ")", [5, 6])
413
+ end
414
+
415
+ def test_backtick_method
416
+ @lex.state = :expr_fname
417
+ assert_scanned("`", :tBACK_REF2, "`", [0, 1])
418
+ assert_equal :expr_endfn, @lex.state
419
+ end
420
+
421
+ def test_bad_char
422
+ refute_scanned(" \010 ")
423
+ end
424
+
425
+ def test_bang
426
+ assert_scanned "!", :tBANG, "!", [0, 1]
427
+ end
428
+
429
+ def test_bang_equals
430
+ assert_scanned "!=", :tNEQ, "!=", [0, 2]
431
+ end
432
+
433
+ def test_bang_tilde
434
+ assert_scanned "!~", :tNMATCH, "!~", [0, 2]
435
+ end
436
+
437
+ def test_def_ubang
438
+ setup_lexer(20)
439
+
440
+ @lex.state = :expr_fname
441
+ assert_scanned '!@', :tBANG, '!@', [0, 2]
442
+ end
443
+
444
+ def test_carat
445
+ assert_scanned "^", :tCARET, "^", [0, 1]
446
+ end
447
+
448
+ def test_carat_equals
449
+ assert_scanned "^=", :tOP_ASGN, "^", [0, 2]
450
+ end
451
+
452
+ def test_colon2
453
+ assert_scanned("A::B",
454
+ :tCONSTANT, "A", [0, 1],
455
+ :tCOLON2, "::", [1, 3],
456
+ :tCONSTANT, "B", [3, 4])
457
+
458
+ @lex.state = :expr_arg
459
+ assert_scanned("::Array",
460
+ :tCOLON2, "::", [0, 2],
461
+ :tCONSTANT, "Array", [2, 7])
462
+ end
463
+
464
+ def test_colon3
465
+ assert_scanned("::Array",
466
+ :tCOLON3, "::", [0, 2],
467
+ :tCONSTANT, "Array", [2, 7])
468
+
469
+ @lex.state = :expr_arg
470
+ assert_scanned(" ::Array",
471
+ :tCOLON3, "::", [1, 3],
472
+ :tCONSTANT, "Array", [3, 8])
473
+ end
474
+
475
+ def test_comma
476
+ assert_scanned ",", :tCOMMA, ",", [0, 1]
477
+ end
478
+
479
+ def test_comment
480
+ [26, 27].each do |version|
481
+ setup_lexer(version)
482
+
483
+ assert_scanned("1 # one\n# two\n2",
484
+ :tINTEGER, 1, [0, 1],
485
+ :tNL, nil, [7, 8],
486
+ :tINTEGER, 2, [14, 15])
487
+
488
+ assert_equal 2, @lex.comments.length
489
+ assert_equal '# one', @lex.comments[0].text
490
+ assert_equal '# two', @lex.comments[1].text
491
+ end
492
+ end
493
+
494
+ def test_comment_expr_beg
495
+ assert_scanned("{#1\n}",
496
+ :tLBRACE, "{", [0, 1],
497
+ :tRCURLY, "}", [4, 5])
498
+ end
499
+
500
+ def test_comment_begin
501
+ assert_scanned("=begin\nblah\nblah\n=end\n42",
502
+ :tINTEGER, 42, [22, 24])
503
+ assert_equal 1, @lex.comments.length
504
+ assert_equal "=begin\nblah\nblah\n=end\n", @lex.comments[0].text
505
+ end
506
+
507
+ def test_comment_begin_bad
508
+ refute_scanned("=begin\nblah\nblah\n")
509
+ end
510
+
511
+ def test_comment_begin_not_comment
512
+ assert_scanned("beginfoo = 5\np x \\\n=beginfoo",
513
+ :tIDENTIFIER, "beginfoo", [0, 8],
514
+ :tEQL, "=", [9, 10],
515
+ :tINTEGER, 5, [11, 12],
516
+ :tNL, nil, [12, 13],
517
+ :tIDENTIFIER, "p", [13, 14],
518
+ :tIDENTIFIER, "x", [15, 16],
519
+ :tEQL, "=", [19, 20],
520
+ :tIDENTIFIER, "beginfoo", [20, 28])
521
+ end
522
+
523
+ def test_comment_begin_space
524
+ assert_scanned("=begin blah\nblah\n=end\n")
525
+
526
+ assert_equal 1, @lex.comments.length
527
+ assert_equal "=begin blah\nblah\n=end\n", @lex.comments[0].text
528
+ end
529
+
530
+ def test_comment_end_space_and_text
531
+ assert_scanned("=begin blah\nblah\n=end blab\n")
532
+
533
+ assert_equal 1, @lex.comments.length
534
+ assert_equal "=begin blah\nblah\n=end blab\n", @lex.comments[0].text
535
+ end
536
+
537
+ def test_comment_eos
538
+ assert_scanned("# comment")
539
+ end
540
+
541
+ def test_constant
542
+ assert_scanned("ArgumentError",
543
+ :tCONSTANT, "ArgumentError", [0, 13])
544
+ end
545
+
546
+ def test_constant_semi
547
+ assert_scanned("ArgumentError;",
548
+ :tCONSTANT, "ArgumentError", [0, 13],
549
+ :tSEMI, ";", [13, 14])
550
+ end
551
+
552
+ def test_cvar
553
+ assert_scanned "@@blah", :tCVAR, "@@blah", [0, 6]
554
+ end
555
+
556
+ def test_cvar_bad
557
+ refute_scanned "@@1"
558
+ end
559
+
560
+ def test_div
561
+ assert_scanned("a / 2",
562
+ :tIDENTIFIER, "a", [0, 1],
563
+ :tDIVIDE, "/", [2, 3],
564
+ :tINTEGER, 2, [4, 5])
565
+ end
566
+
567
+ def test_div_equals
568
+ assert_scanned("a /= 2",
569
+ :tIDENTIFIER, "a", [0, 1],
570
+ :tOP_ASGN, "/", [2, 4],
571
+ :tINTEGER, 2, [5, 6])
572
+ end
573
+
574
+ def test_do
575
+ assert_scanned("x do 42 end",
576
+ :tIDENTIFIER, "x", [0, 1],
577
+ :kDO, "do", [2, 4],
578
+ :tINTEGER, 42, [5, 7],
579
+ :kEND, "end", [8, 11])
580
+ end
581
+
582
+ def test_do_block
583
+ @lex.state = :expr_endarg
584
+
585
+ assert_scanned("do 42 end",
586
+ :kDO_BLOCK, "do", [0, 2],
587
+ :tINTEGER, 42, [3, 5],
588
+ :kEND, "end", [6, 9])
589
+ end
590
+
591
+ def test_do_cond
592
+ @lex.cond.push true
593
+
594
+ assert_scanned("x do 42 end",
595
+ :tIDENTIFIER, "x", [0, 1],
596
+ :kDO_COND, "do", [2, 4],
597
+ :tINTEGER, 42, [5, 7],
598
+ :kEND, "end", [8, 11])
599
+ end
600
+
601
+ def test_dot
602
+ assert_scanned ".", :tDOT, ".", [0, 1]
603
+ end
604
+
605
+ def test_dot2
606
+ assert_scanned "..", :tDOT2, "..", [0, 2]
607
+ end
608
+
609
+ def test_dot3
610
+ assert_scanned "...", :tDOT3, "...", [0, 3]
611
+ end
612
+
613
+ def test_equals
614
+ assert_scanned "=", :tEQL, "=", [0, 1]
615
+ end
616
+
617
+ def test_equals2
618
+ assert_scanned "==", :tEQ, "==", [0, 2]
619
+ end
620
+
621
+ def test_equals3
622
+ assert_scanned "===", :tEQQ, "===", [0, 3]
623
+ end
624
+
625
+ def test_equals_tilde
626
+ assert_scanned "=~", :tMATCH, "=~", [0, 2]
627
+ end
628
+
629
+ def test_float
630
+ assert_scanned "1.0", :tFLOAT, 1.0, [0, 3]
631
+ end
632
+
633
+ def test_float_bad_no_underscores
634
+ refute_scanned "1__0.0"
635
+ end
636
+
637
+ def test_float_bad_no_zero_leading
638
+ refute_scanned ".0"
639
+ end
640
+
641
+ def test_float_bad_trailing_underscore
642
+ refute_scanned "123_.0"
643
+ end
644
+
645
+ def test_float_call
646
+ assert_scanned("1.0.to_s",
647
+ :tFLOAT, 1.0, [0, 3],
648
+ :tDOT, ".", [3, 4],
649
+ :tIDENTIFIER, "to_s", [4, 8])
650
+ end
651
+
652
+ def test_float_dot_E
653
+ assert_scanned "1.0E10", :tFLOAT, 1.0e10, [0, 6]
654
+ end
655
+
656
+ def test_float_dot_E_neg
657
+ assert_scanned("-1.0E10",
658
+ :tUNARY_NUM, "-", [0, 1],
659
+ :tFLOAT, 1.0e10, [1, 7])
660
+ end
661
+
662
+ def test_float_dot_E_pos
663
+ assert_scanned("+1.0E10",
664
+ :tUNARY_NUM, "+", [0, 1],
665
+ :tFLOAT, 1.0e10, [1, 7])
666
+ end
667
+
668
+ def test_float_dot_e
669
+ assert_scanned "1.0e10", :tFLOAT, 1.0e10, [0, 6]
670
+ end
671
+
672
+ def test_float_dot_e_neg
673
+ assert_scanned("-1.0e10",
674
+ :tUNARY_NUM, "-", [0, 1],
675
+ :tFLOAT, 1.0e10, [1, 7])
676
+ end
677
+
678
+ def test_float_dot_e_pos
679
+ assert_scanned("+1.0e10",
680
+ :tUNARY_NUM, "+", [0, 1],
681
+ :tFLOAT, 1.0e10, [1, 7])
682
+ end
683
+
684
+ def test_float_e
685
+ assert_scanned "1e10", :tFLOAT, 1e10, [0, 4]
686
+ end
687
+
688
+ def test_float_e_bad_trailing_underscore
689
+ refute_scanned "123_e10"
690
+ end
691
+
692
+ def test_float_e_minus
693
+ assert_scanned "1e-10", :tFLOAT, 1e-10, [0, 5]
694
+ end
695
+
696
+ def test_float_e_neg
697
+ assert_scanned("-1e10",
698
+ :tUNARY_NUM, "-", [0, 1],
699
+ :tFLOAT, 1e10, [1, 5])
700
+ end
701
+
702
+ def test_float_e_neg_minus
703
+ assert_scanned("-1e-10",
704
+ :tUNARY_NUM, "-", [0, 1],
705
+ :tFLOAT, 1e-10, [1, 6])
706
+ end
707
+
708
+ def test_float_e_neg_plus
709
+ assert_scanned("-1e+10",
710
+ :tUNARY_NUM, "-", [0, 1],
711
+ :tFLOAT, 1e10, [1, 6])
712
+ end
713
+
714
+ def test_float_e_pos
715
+ assert_scanned("+1e10",
716
+ :tUNARY_NUM, "+", [0, 1],
717
+ :tFLOAT, 1e10, [1, 5])
718
+ end
719
+
720
+ def test_float_e_pos_minus
721
+ assert_scanned("+1e-10",
722
+ :tUNARY_NUM, "+", [0, 1],
723
+ :tFLOAT, 1e-10, [1, 6])
724
+ end
725
+
726
+ def test_float_e_pos_plus
727
+ assert_scanned("+1e+10",
728
+ :tUNARY_NUM, "+", [0, 1],
729
+ :tFLOAT, 1e10, [1, 6])
730
+ end
731
+
732
+ def test_float_e_plus
733
+ assert_scanned "1e+10", :tFLOAT, 1e10, [0, 5]
734
+ end
735
+
736
+ def test_float_e_zero
737
+ assert_scanned "0e0", :tFLOAT, 0e0, [0, 3]
738
+ end
739
+
740
+ def test_float_e_nothing
741
+ [18, 19, 20].each do |version|
742
+ setup_lexer version
743
+
744
+ refute_scanned "1end"
745
+ refute_scanned "1.1end"
746
+ end
747
+
748
+ setup_lexer 21
749
+
750
+ assert_scanned("1end",
751
+ :tINTEGER, 1, [0, 1],
752
+ :kEND, 'end', [1, 4])
753
+ assert_scanned("1.1end",
754
+ :tFLOAT, 1.1, [0, 3],
755
+ :kEND, 'end', [3, 6])
756
+ end
757
+
758
+ def test_float_neg
759
+ assert_scanned("-1.0",
760
+ :tUNARY_NUM, "-", [0, 1],
761
+ :tFLOAT, 1.0, [1, 4])
762
+ end
763
+
764
+ def test_float_pos
765
+ assert_scanned("+1.0",
766
+ :tUNARY_NUM, "+", [0, 1],
767
+ :tFLOAT, 1.0, [1, 4])
768
+ end
769
+
770
+ def test_ge
771
+ assert_scanned("a >= 2",
772
+ :tIDENTIFIER, "a", [0, 1],
773
+ :tGEQ, ">=", [2, 4],
774
+ :tINTEGER, 2, [5, 6])
775
+ end
776
+
777
+ def test_global
778
+ assert_scanned("$blah", :tGVAR, "$blah", [0, 5])
779
+ end
780
+
781
+ def test_global_backref
782
+ assert_scanned("$`", :tBACK_REF, "$`", [0, 2])
783
+ end
784
+
785
+ # This was removed in 2.1.
786
+ # def test_global_dash_nothing
787
+ # assert_scanned("$- ", :tGVAR, "$-")
788
+ # end
789
+
790
+ def test_global_dash_something
791
+ assert_scanned("$-x", :tGVAR, "$-x", [0, 3])
792
+ end
793
+
794
+ def test_global_number
795
+ assert_scanned("$10", :tNTH_REF, 10, [0, 3])
796
+ end
797
+
798
+ def test_global_other
799
+ assert_scanned("[$~, $*, $$, $?, $!, $@, $/, $\\, $;, $,, $., $=, $:, $<, $>, $\"]",
800
+ :tLBRACK, "[", [0, 1],
801
+ :tGVAR, "$~", [1, 3], :tCOMMA, ",", [3, 4],
802
+ :tGVAR, "$*", [5, 7], :tCOMMA, ",", [7, 8],
803
+ :tGVAR, "$$", [9, 11], :tCOMMA, ",", [11, 12],
804
+ :tGVAR, "$\?", [13, 15], :tCOMMA, ",", [15, 16],
805
+ :tGVAR, "$!", [17, 19], :tCOMMA, ",", [19, 20],
806
+ :tGVAR, "$@", [21, 23], :tCOMMA, ",", [23, 24],
807
+ :tGVAR, "$/", [25, 27], :tCOMMA, ",", [27, 28],
808
+ :tGVAR, "$\\", [29, 31], :tCOMMA, ",", [31, 32],
809
+ :tGVAR, "$;", [33, 35], :tCOMMA, ",", [35, 36],
810
+ :tGVAR, "$,", [37, 39], :tCOMMA, ",", [39, 40],
811
+ :tGVAR, "$.", [41, 43], :tCOMMA, ",", [43, 44],
812
+ :tGVAR, "$=", [45, 47], :tCOMMA, ",", [47, 48],
813
+ :tGVAR, "$:", [49, 51], :tCOMMA, ",", [51, 52],
814
+ :tGVAR, "$<", [53, 55], :tCOMMA, ",", [55, 56],
815
+ :tGVAR, "$>", [57, 59], :tCOMMA, ",", [59, 60],
816
+ :tGVAR, "$\"", [61, 63],
817
+ :tRBRACK, "]", [63, 64])
818
+ end
819
+
820
+ def test_global_underscore
821
+ assert_scanned("$_",
822
+ :tGVAR, "$_", [0, 2])
823
+ end
824
+
825
+ def test_global_weird
826
+ assert_scanned("$__blah",
827
+ :tGVAR, "$__blah", [0, 7])
828
+ end
829
+
830
+ def test_global_zero
831
+ assert_scanned("$0", :tGVAR, "$0", [0, 2])
832
+ end
833
+
834
+ def test_gt
835
+ assert_scanned("a > 2",
836
+ :tIDENTIFIER, "a", [0, 1],
837
+ :tGT, ">", [2, 3],
838
+ :tINTEGER, 2, [4, 5])
839
+ end
840
+
841
+ def test_heredoc_backtick
842
+ assert_scanned("a = <<`EOF`\n blah blah\nEOF\n",
843
+ :tIDENTIFIER, "a", [0, 1],
844
+ :tEQL, "=", [2, 3],
845
+ :tXSTRING_BEG, "<<`", [4, 11],
846
+ :tSTRING_CONTENT, " blah blah\n", [12, 24],
847
+ :tSTRING_END, "EOF", [24, 27],
848
+ :tNL, nil, [11, 12])
849
+ end
850
+
851
+ def test_heredoc_double
852
+ assert_scanned("a = <<\"EOF\"\n blah blah\nEOF\n",
853
+ :tIDENTIFIER, "a", [0, 1],
854
+ :tEQL, "=", [2, 3],
855
+ :tSTRING_BEG, "<<\"", [4, 11],
856
+ :tSTRING_CONTENT, " blah blah\n", [12, 24],
857
+ :tSTRING_END, "EOF", [24, 27],
858
+ :tNL, nil, [11, 12])
859
+ end
860
+
861
+ def test_heredoc_double_dash
862
+ assert_scanned("a = <<-\"EOF\"\n blah blah\n EOF\n",
863
+ :tIDENTIFIER, "a", [0, 1],
864
+ :tEQL, "=", [2, 3],
865
+ :tSTRING_BEG, "<<\"", [4, 12],
866
+ :tSTRING_CONTENT, " blah blah\n", [13, 25],
867
+ :tSTRING_END, "EOF", [25, 30],
868
+ :tNL, nil, [12, 13])
869
+ end
870
+
871
+ def test_heredoc_double_eos
872
+ refute_scanned("a = <<\"EOF\"\nblah",
873
+ :tIDENTIFIER, "a", [0, 1],
874
+ :tEQL, "=", [2, 3],
875
+ :tSTRING_BEG, "<<\"", [4, 7])
876
+ end
877
+
878
+ def test_heredoc_double_eos_nl
879
+ refute_scanned("a = <<\"EOF\"\nblah\n",
880
+ :tIDENTIFIER, "a", [0, 1],
881
+ :tEQL, "=", [2, 3],
882
+ :tSTRING_BEG, "<<\"", [4, 7])
883
+ end
884
+
885
+ def test_heredoc_double_interp
886
+ assert_scanned("a = <<\"EOF\"\n#x a \#@a b \#$b c \#{3} \nEOF\n",
887
+ :tIDENTIFIER, "a", [0, 1],
888
+ :tEQL, "=", [2, 3],
889
+ :tSTRING_BEG, "<<\"", [4, 11],
890
+ :tSTRING_CONTENT, "#x a ", [12, 17],
891
+ :tSTRING_DVAR, nil, [17, 18],
892
+ :tIVAR, "@a", [18, 20],
893
+ :tSTRING_CONTENT, " b ", [20, 23],
894
+ :tSTRING_DVAR, nil, [23, 24],
895
+ :tGVAR, "$b", [24, 26],
896
+ :tSTRING_CONTENT, " c ", [26, 29],
897
+ :tSTRING_DBEG, '#{', [29, 31],
898
+ :tINTEGER, 3, [31, 32],
899
+ :tRCURLY, "}", [32, 33],
900
+ :tSTRING_CONTENT, " \n", [33, 35],
901
+ :tSTRING_END, "EOF", [35, 38],
902
+ :tNL, nil, [11, 12])
903
+ end
904
+
905
+ def test_heredoc_empty
906
+ assert_scanned("<<\"\"\n\#{x}\nblah2\n\n",
907
+ :tSTRING_BEG, "<<\"", [0, 4],
908
+ :tSTRING_DBEG, "\#{", [5, 7],
909
+ :tIDENTIFIER, "x", [7, 8],
910
+ :tRCURLY, "}", [8, 9],
911
+ :tSTRING_CONTENT, "\n", [9, 10],
912
+ :tSTRING_CONTENT, "blah2\n", [10, 16],
913
+ :tSTRING_END, "", [16, 16],
914
+ :tNL, nil, [4, 5])
915
+ end
916
+
917
+ def test_heredoc_none
918
+ assert_scanned("a = <<EOF\nblah\nblah\nEOF",
919
+ :tIDENTIFIER, "a", [0, 1],
920
+ :tEQL, "=", [2, 3],
921
+ :tSTRING_BEG, "<<\"", [4, 9],
922
+ :tSTRING_CONTENT, "blah\n", [10, 15],
923
+ :tSTRING_CONTENT, "blah\n", [15, 20],
924
+ :tSTRING_END, "EOF", [20, 23],
925
+ :tNL, nil, [9, 10])
926
+ end
927
+
928
+ def test_heredoc_none_dash
929
+ assert_scanned("a = <<-EOF\nblah\nblah\n EOF",
930
+ :tIDENTIFIER, "a", [0, 1],
931
+ :tEQL, "=", [2, 3],
932
+ :tSTRING_BEG, "<<\"", [4, 10],
933
+ :tSTRING_CONTENT, "blah\n", [11, 16],
934
+ :tSTRING_CONTENT, "blah\n", [16, 21],
935
+ :tSTRING_END, "EOF", [21, 26],
936
+ :tNL, nil, [10, 11])
937
+ end
938
+
939
+ def test_heredoc_single
940
+ assert_scanned("a = <<'EOF'\n blah blah\nEOF\n",
941
+ :tIDENTIFIER, "a", [0, 1],
942
+ :tEQL, "=", [2, 3],
943
+ :tSTRING_BEG, "<<'", [4, 11],
944
+ :tSTRING_CONTENT, " blah blah\n", [12, 24],
945
+ :tSTRING_END, "EOF", [24, 27],
946
+ :tNL, nil, [11, 12])
947
+ end
948
+
949
+ def test_heredoc_single_bad_eos_body
950
+ refute_scanned("a = <<'EOF'\nblah",
951
+ :tIDENTIFIER, "a", [0, 1],
952
+ :tEQL, "=", [2, 3],
953
+ :tSTRING_BEG, "'", [6, 7])
954
+ end
955
+
956
+ def test_heredoc_single_dash
957
+ assert_scanned("a = <<-'EOF'\n blah blah\n EOF\n",
958
+ :tIDENTIFIER, "a", [0, 1],
959
+ :tEQL, "=", [2, 3],
960
+ :tSTRING_BEG, "<<'", [4, 12],
961
+ :tSTRING_CONTENT, " blah blah\n", [13, 25],
962
+ :tSTRING_END, "EOF", [25, 30],
963
+ :tNL, nil, [12, 13])
964
+ end
965
+
966
+ def test_heredoc_one_character
967
+ assert_scanned("a = <<E\nABCDEF\nE\n",
968
+ :tIDENTIFIER, "a", [0, 1],
969
+ :tEQL, "=", [2, 3],
970
+ :tSTRING_BEG, "<<\"", [4, 7],
971
+ :tSTRING_CONTENT, "ABCDEF\n", [8, 15],
972
+ :tSTRING_END, "E", [15, 16],
973
+ :tNL, nil, [7, 8])
974
+ end
975
+
976
+ def test_heredoc_cr
977
+ assert_scanned("a = <<E\r\r\nABCDEF\r\r\nE\r\r\r\n",
978
+ :tIDENTIFIER, "a", [0, 1],
979
+ :tEQL, "=", [2, 3],
980
+ :tSTRING_BEG, "<<\"", [4, 7],
981
+ :tSTRING_CONTENT, "ABCDEF\r\n", [9, 17],
982
+ :tSTRING_END, "E", [17, 20],
983
+ :tNL, nil, [8, 9])
984
+ end
985
+
986
+ def test_heredoc_with_identifier_ending_newline__19
987
+ setup_lexer 19
988
+ refute_scanned "<<\"EOS\n\"\n123\nEOS\n"
989
+ end
990
+
991
+ def test_heredoc_with_identifier_ending_newline__24
992
+ setup_lexer 24
993
+
994
+ assert_scanned("a = <<\"EOS\n\"\nABCDEF\nEOS\n",
995
+ :tIDENTIFIER, "a", [0, 1],
996
+ :tEQL, "=", [2, 3],
997
+ :tSTRING_BEG, "<<\"", [4, 12],
998
+ :tSTRING_CONTENT, "ABCDEF\n", [13, 20],
999
+ :tSTRING_END, "EOS", [20, 23],
1000
+ :tNL, nil, [12, 13])
1001
+ end
1002
+
1003
+ def test_heredoc_with_identifier_containing_newline_inside__19
1004
+ setup_lexer 19
1005
+ refute_scanned "<<\"EOS\nEOS\"\n123\nEOS\n"
1006
+ end
1007
+
1008
+ def test_heredoc_with_identifier_containing_newline_inside__24
1009
+ setup_lexer 24
1010
+
1011
+ refute_scanned "<<\"EOS\nEOS\"\n123\nEOS\n"
1012
+ end
1013
+
1014
+ def test_identifier
1015
+ assert_scanned("identifier",
1016
+ :tIDENTIFIER, "identifier", [0, 10])
1017
+ end
1018
+
1019
+ def test_identifier_bang
1020
+ assert_scanned("identifier!",
1021
+ :tFID, "identifier!", [0, 11])
1022
+
1023
+ assert_scanned("identifier!=",
1024
+ :tIDENTIFIER, "identifier", [0, 10],
1025
+ :tNEQ, "!=", [10, 12])
1026
+ end
1027
+
1028
+ def test_identifier_eh
1029
+ setup_lexer 19
1030
+
1031
+ assert_scanned("identifier?",
1032
+ :tFID, "identifier?", [0, 11])
1033
+
1034
+ assert_scanned("identifier?=",
1035
+ :tIDENTIFIER, "identifier", [0, 10],
1036
+ :tCHARACTER, "=", [10, 12])
1037
+ end
1038
+
1039
+ def test_identifier_cmp
1040
+ assert_lex_fname "<=>", :tCMP, [0, 3]
1041
+ end
1042
+
1043
+ def test_identifier_def
1044
+ assert_lex_fname "identifier", :tIDENTIFIER, [0, 10]
1045
+ end
1046
+
1047
+ def test_identifier_equals_arrow
1048
+ assert_scanned(":blah==>",
1049
+ :tSYMBOL, "blah=", [0, 6],
1050
+ :tASSOC, "=>", [6, 8])
1051
+ end
1052
+
1053
+ def test_identifier_equals3
1054
+ assert_scanned(":a===b",
1055
+ :tSYMBOL, "a", [0, 2],
1056
+ :tEQQ, "===", [2, 5],
1057
+ :tIDENTIFIER, "b", [5, 6])
1058
+ end
1059
+
1060
+ def test_identifier_equals_equals_arrow
1061
+ assert_scanned(":a==>b",
1062
+ :tSYMBOL, "a=", [0, 3],
1063
+ :tASSOC, "=>", [3, 5],
1064
+ :tIDENTIFIER, "b", [5, 6])
1065
+ end
1066
+
1067
+ def test_identifier_equals_caret
1068
+ assert_lex_fname "^", :tCARET, [0, 1]
1069
+ end
1070
+
1071
+ def test_identifier_equals_def
1072
+ assert_lex_fname "identifier=", :tIDENTIFIER, [0, 11]
1073
+ end
1074
+
1075
+ def test_identifier_equals_def2
1076
+ assert_lex_fname "==", :tEQ, [0, 2]
1077
+ end
1078
+
1079
+ def test_identifier_equals_expr
1080
+ @lex.state = :expr_dot
1081
+ assert_scanned("y = arg",
1082
+ :tIDENTIFIER, "y", [0, 1],
1083
+ :tEQL, "=", [2, 3],
1084
+ :tIDENTIFIER, "arg", [4, 7])
1085
+
1086
+ assert_equal :expr_arg, @lex.state
1087
+ end
1088
+
1089
+ def test_identifier_equals_or
1090
+ assert_lex_fname "|", :tPIPE, [0, 1]
1091
+ end
1092
+
1093
+ def test_identifier_equals_slash
1094
+ assert_lex_fname "/", :tDIVIDE, [0, 1]
1095
+ end
1096
+
1097
+ def test_identifier_equals_tilde
1098
+ @lex.state = :expr_fname
1099
+ assert_scanned("identifier=~",
1100
+ :tIDENTIFIER, "identifier=", [0, 11],
1101
+ :tTILDE, "~", [11, 12])
1102
+ end
1103
+
1104
+ def test_identifier_gt
1105
+ assert_lex_fname ">", :tGT, [0, 1]
1106
+ end
1107
+
1108
+ def test_identifier_le
1109
+ assert_lex_fname "<=", :tLEQ, [0, 2]
1110
+ end
1111
+
1112
+ def test_identifier_lt
1113
+ assert_lex_fname "<", :tLT, [0, 1]
1114
+ end
1115
+
1116
+ def test_identifier_tilde
1117
+ assert_lex_fname "~", :tTILDE, [0, 1]
1118
+ end
1119
+
1120
+ def test_identifier_defined?
1121
+ assert_lex_fname "defined?", :kDEFINED, [0, 8]
1122
+ end
1123
+
1124
+ def test_index
1125
+ assert_lex_fname "[]", :tAREF, [0, 2]
1126
+ end
1127
+
1128
+ def test_index_equals
1129
+ assert_lex_fname "[]=", :tASET, [0, 3]
1130
+ end
1131
+
1132
+ def test_integer
1133
+ assert_scanned "42", :tINTEGER, 42, [0, 2]
1134
+ end
1135
+
1136
+ def test_integer_bin
1137
+ assert_scanned "0b101010", :tINTEGER, 42, [0, 8]
1138
+ end
1139
+
1140
+ def test_integer_bin_bad_none
1141
+ refute_scanned "0b "
1142
+ end
1143
+
1144
+ def test_integer_bin_bad_underscores
1145
+ refute_scanned "0b10__01"
1146
+ end
1147
+
1148
+ def test_integer_dec
1149
+ assert_scanned "42", :tINTEGER, 42, [0, 2]
1150
+ end
1151
+
1152
+ def test_integer_dec_bad_underscores
1153
+ refute_scanned "42__24"
1154
+ end
1155
+
1156
+ def test_integer_dec_d
1157
+ assert_scanned "0d42", :tINTEGER, 42, [0, 4]
1158
+ end
1159
+
1160
+ def test_integer_dec_d_bad_none
1161
+ refute_scanned "0d"
1162
+ end
1163
+
1164
+ def test_integer_dec_d_bad_underscores
1165
+ refute_scanned "0d42__24"
1166
+ end
1167
+
1168
+ def test_question_eh_a__18
1169
+ setup_lexer 18
1170
+
1171
+ assert_scanned "?a", :tINTEGER, 97, [0, 2]
1172
+ end
1173
+
1174
+ def test_question_eh_a__19
1175
+ setup_lexer 19
1176
+
1177
+ assert_scanned '?a', :tCHARACTER, "a", [0, 2]
1178
+ end
1179
+
1180
+ def test_question_eh_escape_M_escape_C__18
1181
+ setup_lexer 18
1182
+
1183
+ assert_scanned '?\M-\C-a', :tINTEGER, 129, [0, 8]
1184
+ end
1185
+
1186
+ def test_question_eh_escape_M_escape_C__19
1187
+ setup_lexer 19
1188
+
1189
+ assert_scanned '?\M-\C-a', :tCHARACTER, "\M-\C-a", [0, 8]
1190
+ end
1191
+
1192
+ def test_question_eh_escape_u_1_digit
1193
+ setup_lexer 19
1194
+
1195
+ refute_scanned '?\\u1'
1196
+ end
1197
+
1198
+ def test_question_eh_escape_u_2_digits
1199
+ setup_lexer 19
1200
+
1201
+ refute_scanned '?\\u12'
1202
+ end
1203
+
1204
+ def test_question_eh_escape_u_3_digits
1205
+ setup_lexer 19
1206
+
1207
+ refute_scanned '?\\u123'
1208
+ end
1209
+
1210
+ def test_question_eh_escape_u_4_digits
1211
+ setup_lexer 19
1212
+ assert_scanned '?\\u0001', :tCHARACTER, "\u0001", [0, 7]
1213
+ end
1214
+
1215
+ def test_question_eh_single_unicode_point
1216
+ setup_lexer 19
1217
+ assert_scanned '?\\u{123}', :tCHARACTER, "\u0123", [0, 8]
1218
+
1219
+ setup_lexer 19
1220
+ assert_scanned '?\\u{a}', :tCHARACTER, "\n", [0, 6]
1221
+ end
1222
+
1223
+ def test_question_eh_multiple_unicode_points
1224
+ setup_lexer 19
1225
+ refute_scanned '?\\u{1 2 3}'
1226
+
1227
+ setup_lexer 19
1228
+ refute_scanned '?\\u{a b}'
1229
+ end
1230
+
1231
+ def test_question_eh_escape_u_unclosed_bracket
1232
+ setup_lexer 19
1233
+
1234
+ refute_scanned '?\\u{123'
1235
+ end
1236
+
1237
+ def test_question_eh_escape_space_around_unicode_point__19
1238
+ setup_lexer 19
1239
+ refute_scanned '"\\u{1 }"'
1240
+
1241
+ setup_lexer 19
1242
+ refute_scanned '"\\u{ 1}"'
1243
+
1244
+ setup_lexer 19
1245
+ refute_scanned '"\\u{ 1 }"'
1246
+
1247
+ setup_lexer 19
1248
+ refute_scanned '"\\u{1 2 }"'
1249
+
1250
+ setup_lexer 19
1251
+ refute_scanned '"\\u{ 1 2}"'
1252
+
1253
+ setup_lexer 19
1254
+ refute_scanned '"\\u{1 2}"'
1255
+ end
1256
+
1257
+ def test_question_eh_escape_space_around_unicode_point__24
1258
+ setup_lexer 24
1259
+ assert_scanned '"\\u{ 1}"', :tSTRING, "\u0001", [0, 8]
1260
+
1261
+ setup_lexer 24
1262
+ assert_scanned '"\\u{1 }"', :tSTRING, "\u0001", [0, 8]
1263
+
1264
+ setup_lexer 24
1265
+ assert_scanned '"\\u{ 1 }"', :tSTRING, "\u0001", [0, 9]
1266
+
1267
+ setup_lexer 24
1268
+ assert_scanned '"\\u{1 2 }"', :tSTRING, "\u0001\u0002", [0, 10]
1269
+
1270
+ setup_lexer 24
1271
+ assert_scanned '"\\u{ 1 2}"', :tSTRING, "\u0001\u0002", [0, 10]
1272
+
1273
+ setup_lexer 24
1274
+ assert_scanned '"\\u{1 2}"', :tSTRING, "\u0001\u0002", [0, 10]
1275
+ end
1276
+
1277
+ def test_integer_hex
1278
+ assert_scanned "0x2a", :tINTEGER, 42, [0, 4]
1279
+ end
1280
+
1281
+ def test_integer_hex_bad_none
1282
+ refute_scanned "0x "
1283
+ end
1284
+
1285
+ def test_integer_hex_bad_underscores
1286
+ refute_scanned "0xab__cd"
1287
+ end
1288
+
1289
+ def test_integer_oct
1290
+ assert_scanned "052", :tINTEGER, 42, [0, 3]
1291
+ end
1292
+
1293
+ def test_integer_oct_bad_range
1294
+ refute_scanned "08"
1295
+ end
1296
+
1297
+ def test_integer_oct_bad_underscores
1298
+ refute_scanned "01__23"
1299
+ end
1300
+
1301
+ def test_integer_oct_O
1302
+ assert_scanned "0O52", :tINTEGER, 42, [0, 4]
1303
+ end
1304
+
1305
+ def test_integer_oct_O_bad_range
1306
+ refute_scanned "0O1238"
1307
+ end
1308
+
1309
+ def test_integer_oct_O_bad_underscores
1310
+ refute_scanned "0O1__23"
1311
+ end
1312
+
1313
+ def test_integer_oct_O_not_bad_none
1314
+ assert_scanned "0O ", :tINTEGER, 0, [0, 2]
1315
+ end
1316
+
1317
+ def test_integer_oct_o
1318
+ assert_scanned "0o52", :tINTEGER, 42, [0, 4]
1319
+ end
1320
+
1321
+ def test_integer_oct_o_bad_range
1322
+ refute_scanned "0o1283"
1323
+ end
1324
+
1325
+ def test_integer_oct_o_bad_underscores
1326
+ refute_scanned "0o1__23"
1327
+ end
1328
+
1329
+ def test_integer_oct_o_not_bad_none
1330
+ assert_scanned "0o ", :tINTEGER, 0, [0, 2]
1331
+ end
1332
+
1333
+ def test_integer_trailing
1334
+ assert_scanned("1.to_s",
1335
+ :tINTEGER, 1, [0, 1],
1336
+ :tDOT, '.', [1, 2],
1337
+ :tIDENTIFIER, 'to_s', [2, 6])
1338
+ end
1339
+
1340
+ def test_integer_underscore
1341
+ assert_scanned "4_2", :tINTEGER, 42, [0, 3]
1342
+ end
1343
+
1344
+ def test_integer_underscore_bad
1345
+ refute_scanned "4__2"
1346
+ end
1347
+
1348
+ def test_integer_zero
1349
+ assert_scanned "0", :tINTEGER, 0, [0, 1]
1350
+ end
1351
+
1352
+ def test_ivar
1353
+ assert_scanned "@blah", :tIVAR, "@blah", [0, 5]
1354
+ end
1355
+
1356
+ def test_ivar_bad
1357
+ refute_scanned "@1"
1358
+ end
1359
+
1360
+ def test_ivar_bad_0_length
1361
+ refute_scanned "1+@\n", :tINTEGER, 1, [0, 1], :tPLUS, "+", [1, 2]
1362
+ end
1363
+
1364
+ def test_keyword_expr
1365
+ @lex.state = :expr_endarg
1366
+
1367
+ assert_scanned "if", :kIF_MOD, "if", [0, 2]
1368
+
1369
+ assert_equal :expr_beg, @lex.state
1370
+ end
1371
+
1372
+ def test_lt
1373
+ assert_scanned "<", :tLT, "<", [0, 1]
1374
+ end
1375
+
1376
+ def test_lt2
1377
+ assert_scanned("a <\< b",
1378
+ :tIDENTIFIER, "a", [0, 1],
1379
+ :tLSHFT, "<\<", [2, 4],
1380
+ :tIDENTIFIER, "b", [5, 6])
1381
+
1382
+ end
1383
+
1384
+ def test_lt2_equals
1385
+ assert_scanned("a <\<= b",
1386
+ :tIDENTIFIER, "a", [0, 1],
1387
+ :tOP_ASGN, "<\<", [2, 5],
1388
+ :tIDENTIFIER, "b", [6, 7])
1389
+ end
1390
+
1391
+ def test_lt_equals
1392
+ assert_scanned "<=", :tLEQ, "<=", [0, 2]
1393
+ end
1394
+
1395
+ def test_minus
1396
+ assert_scanned("1 - 2",
1397
+ :tINTEGER, 1, [0, 1],
1398
+ :tMINUS, "-", [2, 3],
1399
+ :tINTEGER, 2, [4, 5])
1400
+ end
1401
+
1402
+ def test_minus_equals
1403
+ @lex.state = :expr_end
1404
+
1405
+ assert_scanned "-=", :tOP_ASGN, "-", [0, 2]
1406
+ end
1407
+
1408
+ def test_minus_method
1409
+ @lex.state = :expr_fname
1410
+ assert_scanned "-", :tMINUS, "-", [0, 1]
1411
+ end
1412
+
1413
+ def test_minus_unary_method
1414
+ @lex.state = :expr_fname
1415
+ assert_scanned "-@", :tUMINUS, "-@", [0, 2]
1416
+ end
1417
+
1418
+ def test_minus_unary_number
1419
+ assert_scanned("-42",
1420
+ :tUNARY_NUM, "-", [0, 1],
1421
+ :tINTEGER, 42, [1, 3])
1422
+ end
1423
+
1424
+ def test_minus_unary_whitespace_number
1425
+ assert_scanned("- 42",
1426
+ :tUNARY_NUM, "-", [0, 1],
1427
+ :tINTEGER, 42, [2, 4])
1428
+ end
1429
+
1430
+ def test_nth_ref
1431
+ assert_scanned('[$1, $2, $3]',
1432
+ :tLBRACK, "[", [0, 1],
1433
+ :tNTH_REF, 1, [1, 3], :tCOMMA, ",", [3, 4],
1434
+ :tNTH_REF, 2, [5, 7], :tCOMMA, ",", [7, 8],
1435
+ :tNTH_REF, 3, [9, 11],
1436
+ :tRBRACK, "]", [11, 12])
1437
+ end
1438
+
1439
+ def test_open_bracket
1440
+ assert_scanned("(", :tLPAREN, "(", [0, 1])
1441
+ end
1442
+
1443
+ def test_open_bracket_cmdarg
1444
+ assert_scanned("m (", :tIDENTIFIER, "m", [0, 1],
1445
+ :tLPAREN_ARG, "(", [2, 3])
1446
+ end
1447
+
1448
+ def test_open_bracket_exprarg
1449
+ assert_scanned("m(", :tIDENTIFIER, "m", [0, 1],
1450
+ :tLPAREN2, "(", [1, 2])
1451
+ end
1452
+
1453
+ def test_open_curly_bracket
1454
+ assert_scanned("{",
1455
+ :tLBRACE, "{", [0, 1])
1456
+ end
1457
+
1458
+ def test_open_curly_bracket_arg
1459
+ assert_scanned("m { 3 }",
1460
+ :tIDENTIFIER, "m", [0, 1],
1461
+ :tLCURLY, "{", [2, 3],
1462
+ :tINTEGER, 3, [4, 5],
1463
+ :tRCURLY, "}", [6, 7])
1464
+ end
1465
+
1466
+ def test_open_curly_bracket_block
1467
+ @lex.state = :expr_endarg # seen m(3)
1468
+
1469
+ assert_scanned("{ 4 }",
1470
+ :tLBRACE_ARG, "{", [0, 1],
1471
+ :tINTEGER, 4, [2, 3],
1472
+ :tRCURLY, "}", [4, 5])
1473
+ end
1474
+
1475
+ def test_open_square_bracket_arg
1476
+ assert_scanned("m [ 3 ]",
1477
+ :tIDENTIFIER, "m", [0, 1],
1478
+ :tLBRACK, "[", [2, 3],
1479
+ :tINTEGER, 3, [4, 5],
1480
+ :tRBRACK, "]", [6, 7])
1481
+ end
1482
+
1483
+ def test_open_square_bracket_ary
1484
+ assert_scanned("[1, 2, 3]",
1485
+ :tLBRACK, "[", [0, 1],
1486
+ :tINTEGER, 1, [1, 2],
1487
+ :tCOMMA, ",", [2, 3],
1488
+ :tINTEGER, 2, [4, 5],
1489
+ :tCOMMA, ",", [5, 6],
1490
+ :tINTEGER, 3, [7, 8],
1491
+ :tRBRACK, "]", [8, 9])
1492
+ end
1493
+
1494
+ def test_open_square_bracket_meth
1495
+ assert_scanned("m[3]",
1496
+ :tIDENTIFIER, "m", [0, 1],
1497
+ :tLBRACK2, "[", [1, 2],
1498
+ :tINTEGER, 3, [2, 3],
1499
+ :tRBRACK, "]", [3, 4])
1500
+ end
1501
+
1502
+ def test_or
1503
+ assert_scanned "|", :tPIPE, "|", [0, 1]
1504
+ end
1505
+
1506
+ def test_or2
1507
+ assert_scanned "||", :tOROP, "||", [0, 2]
1508
+ end
1509
+
1510
+ def test_or2_equals
1511
+ assert_scanned "||=", :tOP_ASGN, "||", [0, 3]
1512
+ end
1513
+
1514
+ def test_or_equals
1515
+ assert_scanned "|=", :tOP_ASGN, "|", [0, 2]
1516
+ end
1517
+
1518
+ def test_percent
1519
+ assert_scanned("a % 2",
1520
+ :tIDENTIFIER, "a", [0, 1],
1521
+ :tPERCENT, "%", [2, 3],
1522
+ :tINTEGER, 2, [4, 5])
1523
+ end
1524
+
1525
+ def test_percent_equals
1526
+ assert_scanned("a %= 2",
1527
+ :tIDENTIFIER, "a", [0, 1],
1528
+ :tOP_ASGN, "%", [2, 4],
1529
+ :tINTEGER, 2, [5, 6])
1530
+ end
1531
+
1532
+ def test_plus
1533
+ assert_scanned("1 + 1",
1534
+ :tINTEGER, 1, [0, 1],
1535
+ :tPLUS, "+", [2, 3],
1536
+ :tINTEGER, 1, [4, 5])
1537
+ end
1538
+
1539
+ def test_plus_equals
1540
+ @lex.state = :expr_end
1541
+
1542
+ assert_scanned "+=", :tOP_ASGN, "+", [0, 2]
1543
+ end
1544
+
1545
+ def test_plus_method
1546
+ @lex.state = :expr_fname
1547
+ assert_scanned "+", :tPLUS, "+", [0, 1]
1548
+ end
1549
+
1550
+ def test_plus_unary_method
1551
+ @lex.state = :expr_fname
1552
+ assert_scanned "+@", :tUPLUS, "+@", [0, 2]
1553
+ end
1554
+
1555
+ def test_plus_unary_number
1556
+ assert_scanned("+42",
1557
+ :tUNARY_NUM, "+", [0, 1],
1558
+ :tINTEGER, 42, [1, 3])
1559
+ end
1560
+
1561
+ def test_plus_unary_whitespace_number
1562
+ assert_scanned("+ 42",
1563
+ :tUNARY_NUM, "+", [0, 1],
1564
+ :tINTEGER, 42, [2, 4])
1565
+ end
1566
+
1567
+ def test_numbers
1568
+ assert_scanned "0b10", :tINTEGER, 2, [0, 4]
1569
+ assert_scanned "0B10", :tINTEGER, 2, [0, 4]
1570
+
1571
+ assert_scanned "0d10", :tINTEGER, 10, [0, 4]
1572
+ assert_scanned "0D10", :tINTEGER, 10, [0, 4]
1573
+
1574
+ assert_scanned "0x10", :tINTEGER, 16, [0, 4]
1575
+ assert_scanned "0X10", :tINTEGER, 16, [0, 4]
1576
+
1577
+ assert_scanned "0o10", :tINTEGER, 8, [0, 4]
1578
+ assert_scanned "0O10", :tINTEGER, 8, [0, 4]
1579
+ assert_scanned "0o", :tINTEGER, 0, [0, 2]
1580
+ assert_scanned "0O", :tINTEGER, 0, [0, 2]
1581
+
1582
+ assert_scanned "0o", :tINTEGER, 0, [0, 2]
1583
+ assert_scanned "0O", :tINTEGER, 0, [0, 2]
1584
+
1585
+ assert_scanned "0777_333", :tINTEGER, 261851, [0, 8]
1586
+
1587
+ assert_scanned "0", :tINTEGER, 0, [0, 1]
1588
+
1589
+ refute_scanned "0x"
1590
+ refute_scanned "0X"
1591
+ refute_scanned "0b"
1592
+ refute_scanned "0B"
1593
+ refute_scanned "0d"
1594
+ refute_scanned "0D"
1595
+
1596
+ refute_scanned "08"
1597
+ refute_scanned "09"
1598
+ refute_scanned "0o8"
1599
+ refute_scanned "0o9"
1600
+ refute_scanned "0O8"
1601
+ refute_scanned "0O9"
1602
+
1603
+ refute_scanned "1_e1"
1604
+ refute_scanned "1_.1"
1605
+ refute_scanned "1__1"
1606
+
1607
+ refute_scanned "1end"
1608
+ refute_scanned "1.1end"
1609
+ end
1610
+
1611
+ def test_question__18
1612
+ setup_lexer 18
1613
+
1614
+ assert_scanned "?*", :tINTEGER, 42, [0, 2]
1615
+ end
1616
+
1617
+ def test_question__19
1618
+ setup_lexer 19
1619
+
1620
+ assert_scanned "?*", :tCHARACTER, "*", [0, 2]
1621
+ end
1622
+
1623
+ def test_question_bad_eos
1624
+ refute_scanned "?"
1625
+ end
1626
+
1627
+ def test_question_bad_ws
1628
+ assert_scanned "? ", :tEH, "?", [0, 1]
1629
+ assert_scanned "?\n", :tEH, "?", [0, 1]
1630
+ assert_scanned "?\t", :tEH, "?", [0, 1]
1631
+ assert_scanned "?\v", :tEH, "?", [0, 1]
1632
+ assert_scanned "?\r", :tEH, "?", [0, 1]
1633
+ assert_scanned "?\f", :tEH, "?", [0, 1]
1634
+ end
1635
+
1636
+ def test_question_ws_backslashed__18
1637
+ setup_lexer 18
1638
+
1639
+ @lex.state = :expr_beg
1640
+ assert_scanned "?\\ ", :tINTEGER, 32, [0, 3]
1641
+ @lex.state = :expr_beg
1642
+ assert_scanned "?\\n", :tINTEGER, 10, [0, 3]
1643
+ @lex.state = :expr_beg
1644
+ assert_scanned "?\\t", :tINTEGER, 9, [0, 3]
1645
+ @lex.state = :expr_beg
1646
+ assert_scanned "?\\v", :tINTEGER, 11, [0, 3]
1647
+ @lex.state = :expr_beg
1648
+ assert_scanned "?\\r", :tINTEGER, 13, [0, 3]
1649
+ @lex.state = :expr_beg
1650
+ assert_scanned "?\\f", :tINTEGER, 12, [0, 3]
1651
+ end
1652
+
1653
+ def test_question_ws_backslashed__19
1654
+ setup_lexer 19
1655
+
1656
+ @lex.state = :expr_beg
1657
+ assert_scanned "?\\ ", :tCHARACTER, " ", [0, 3]
1658
+ @lex.state = :expr_beg
1659
+ assert_scanned "?\\n", :tCHARACTER, "\n", [0, 3]
1660
+ @lex.state = :expr_beg
1661
+ assert_scanned "?\\t", :tCHARACTER, "\t", [0, 3]
1662
+ @lex.state = :expr_beg
1663
+ assert_scanned "?\\v", :tCHARACTER, "\v", [0, 3]
1664
+ @lex.state = :expr_beg
1665
+ assert_scanned "?\\r", :tCHARACTER, "\r", [0, 3]
1666
+ @lex.state = :expr_beg
1667
+ assert_scanned "?\\f", :tCHARACTER, "\f", [0, 3]
1668
+ end
1669
+
1670
+ def test_rbracket
1671
+ assert_scanned "]", :tRBRACK, "]", [0, 1]
1672
+ end
1673
+
1674
+ def test_rcurly
1675
+ assert_scanned "}", :tRCURLY, "}", [0, 1]
1676
+ end
1677
+
1678
+ def test_regexp
1679
+ assert_scanned("/regexp/",
1680
+ :tREGEXP_BEG, "/", [0, 1],
1681
+ :tSTRING_CONTENT, "regexp", [1, 7],
1682
+ :tSTRING_END, "/", [7, 8],
1683
+ :tREGEXP_OPT, "", [8, 8])
1684
+ end
1685
+
1686
+ def test_regexp_ambiguous
1687
+ assert_scanned("method /regexp/",
1688
+ :tIDENTIFIER, "method", [0, 6],
1689
+ :tREGEXP_BEG, "/", [7, 8],
1690
+ :tSTRING_CONTENT, "regexp", [8, 14],
1691
+ :tSTRING_END, "/", [14, 15],
1692
+ :tREGEXP_OPT, "", [15, 15])
1693
+ end
1694
+
1695
+ def test_regexp_bad
1696
+ refute_scanned("/.*/xyz",
1697
+ :tREGEXP_BEG, "/", [0, 1],
1698
+ :tSTRING_CONTENT, ".*", [1, 3],
1699
+ :tSTRING_END, "/", [3, 4])
1700
+ end
1701
+
1702
+ def test_regexp_escape_C
1703
+ assert_scanned('/regex\\C-x/',
1704
+ :tREGEXP_BEG, "/", [0, 1],
1705
+ :tSTRING_CONTENT, "regex\\C-x", [1, 10],
1706
+ :tSTRING_END, "/", [10, 11],
1707
+ :tREGEXP_OPT, "", [11, 11])
1708
+ end
1709
+
1710
+ def test_regexp_escape_C_M
1711
+ assert_scanned('/regex\\C-\\M-x/',
1712
+ :tREGEXP_BEG, "/", [0, 1],
1713
+ :tSTRING_CONTENT, "regex\\C-\\M-x", [1, 13],
1714
+ :tSTRING_END, "/", [13, 14],
1715
+ :tREGEXP_OPT, "", [14, 14])
1716
+ end
1717
+
1718
+ def test_regexp_escape_C_M_craaaazy
1719
+ assert_scanned("/regex\\C-\\\n\\M-x/",
1720
+ :tREGEXP_BEG, "/", [0, 1],
1721
+ :tSTRING_CONTENT, "regex\\C-\\M-x", [1, 15],
1722
+ :tSTRING_END, "/", [15, 16],
1723
+ :tREGEXP_OPT, "", [16, 16])
1724
+ end
1725
+
1726
+ def test_regexp_escape_C_bad_dash
1727
+ refute_scanned '/regex\\Cx/', :tREGEXP_BEG, "/", [0, 1]
1728
+ end
1729
+
1730
+ def test_regexp_escape_C_bad_dash_eos
1731
+ refute_scanned '/regex\\C-/', :tREGEXP_BEG, "/", [0, 1]
1732
+ end
1733
+
1734
+ def test_regexp_escape_C_bad_dash_eos2
1735
+ refute_scanned '/regex\\C-', :tREGEXP_BEG, "/", [0, 1]
1736
+ end
1737
+
1738
+ def test_regexp_escape_C_bad_eos
1739
+ refute_scanned '/regex\\C/', :tREGEXP_BEG, "/", [0, 1]
1740
+ end
1741
+
1742
+ def test_regexp_escape_C_bad_eos2
1743
+ refute_scanned '/regex\\c', :tREGEXP_BEG, "/", [0, 1]
1744
+ end
1745
+
1746
+ def test_regexp_escape_M
1747
+ assert_scanned('/regex\\M-x/',
1748
+ :tREGEXP_BEG, "/", [0, 1],
1749
+ :tSTRING_CONTENT, "regex\\M-x", [1, 10],
1750
+ :tSTRING_END, "/", [10, 11],
1751
+ :tREGEXP_OPT, "", [11, 11])
1752
+ end
1753
+
1754
+ def test_regexp_escape_M_C
1755
+ assert_scanned('/regex\\M-\\C-x/',
1756
+ :tREGEXP_BEG, "/", [0, 1],
1757
+ :tSTRING_CONTENT, "regex\\M-\\C-x", [1, 13],
1758
+ :tSTRING_END, "/", [13, 14],
1759
+ :tREGEXP_OPT, "", [14, 14])
1760
+ end
1761
+
1762
+ def test_regexp_escape_M_bad_dash
1763
+ refute_scanned '/regex\\Mx/', :tREGEXP_BEG, "/", [0, 1]
1764
+ end
1765
+
1766
+ def test_regexp_escape_M_bad_dash_eos
1767
+ refute_scanned '/regex\\M-/', :tREGEXP_BEG, "/", [0, 1]
1768
+ end
1769
+
1770
+ def test_regexp_escape_M_bad_dash_eos2
1771
+ refute_scanned '/regex\\M-', :tREGEXP_BEG, "/", [0, 1]
1772
+ end
1773
+
1774
+ def test_regexp_escape_M_bad_eos
1775
+ refute_scanned '/regex\\M/', :tREGEXP_BEG, "/", [0, 1]
1776
+ end
1777
+
1778
+ def test_regexp_escape_backslash_slash
1779
+ assert_scanned('/\\//',
1780
+ :tREGEXP_BEG, "/", [0, 1],
1781
+ :tSTRING_CONTENT, '/', [1, 3],
1782
+ :tSTRING_END, "/", [3, 4],
1783
+ :tREGEXP_OPT, "", [4, 4])
1784
+ end
1785
+
1786
+ def test_regexp_escape_backslash_terminator
1787
+ assert_scanned('%r%blah\\%blah%',
1788
+ :tREGEXP_BEG, "%r%", [0, 3],
1789
+ :tSTRING_CONTENT, "blah%blah", [3, 13],
1790
+ :tSTRING_END, "%", [13, 14],
1791
+ :tREGEXP_OPT, "", [14, 14])
1792
+ end
1793
+
1794
+ def test_regexp_escape_backslash_terminator_meta1
1795
+ assert_scanned('%r{blah\\}blah}',
1796
+ :tREGEXP_BEG, "%r{", [0, 3],
1797
+ :tSTRING_CONTENT, "blah\\}blah", [3, 13],
1798
+ :tSTRING_END, "}", [13, 14],
1799
+ :tREGEXP_OPT, "", [14, 14])
1800
+ end
1801
+
1802
+ def test_regexp_escape_backslash_terminator_meta2
1803
+ assert_scanned('%r/blah\\/blah/',
1804
+ :tREGEXP_BEG, "%r/", [0, 3],
1805
+ :tSTRING_CONTENT, "blah/blah", [3, 13],
1806
+ :tSTRING_END, "/", [13, 14],
1807
+ :tREGEXP_OPT, "", [14, 14])
1808
+ end
1809
+
1810
+ def test_regexp_escape_backslash_terminator_meta3
1811
+ assert_scanned('%r/blah\\%blah/',
1812
+ :tREGEXP_BEG, "%r/", [0, 3],
1813
+ :tSTRING_CONTENT, "blah\\%blah", [3, 13],
1814
+ :tSTRING_END, "/", [13, 14],
1815
+ :tREGEXP_OPT, "", [14, 14])
1816
+ end
1817
+
1818
+ def test_regexp_escape_bad_eos
1819
+ refute_scanned '/regex\\', :tREGEXP_BEG, "/", [0, 1]
1820
+ end
1821
+
1822
+ def test_regexp_escape_bs
1823
+ assert_scanned('/regex\\\\regex/',
1824
+ :tREGEXP_BEG, "/", [0, 1],
1825
+ :tSTRING_CONTENT, "regex\\\\regex", [1, 13],
1826
+ :tSTRING_END, "/", [13, 14],
1827
+ :tREGEXP_OPT, "", [14, 14])
1828
+ end
1829
+
1830
+ def test_regexp_escape_c
1831
+ assert_scanned('/regex\\cxxx/',
1832
+ :tREGEXP_BEG, "/", [0, 1],
1833
+ :tSTRING_CONTENT, "regex\\cxxx", [1, 11],
1834
+ :tSTRING_END, "/", [11, 12],
1835
+ :tREGEXP_OPT, "", [12, 12])
1836
+ end
1837
+
1838
+ def test_regexp_escape_c_backslash
1839
+ assert_scanned('/regex\\c\\n/',
1840
+ :tREGEXP_BEG, "/", [0, 1],
1841
+ :tSTRING_CONTENT, "regex\\c\\n", [1, 10],
1842
+ :tSTRING_END, "/", [10, 11],
1843
+ :tREGEXP_OPT, "", [11, 11])
1844
+ end
1845
+
1846
+ def test_regexp_escape_chars
1847
+ assert_scanned('/re\\tge\\nxp/',
1848
+ :tREGEXP_BEG, "/", [0, 1],
1849
+ :tSTRING_CONTENT, "re\\tge\\nxp", [1, 11],
1850
+ :tSTRING_END, "/", [11, 12],
1851
+ :tREGEXP_OPT, "", [12, 12])
1852
+ end
1853
+
1854
+ def test_regexp_escape_double_backslash
1855
+ assert_scanned('/[\\/\\\\]$/',
1856
+ :tREGEXP_BEG, "/", [0, 1],
1857
+ :tSTRING_CONTENT,'[/\\\\]$', [1, 8],
1858
+ :tSTRING_END, "/", [8, 9],
1859
+ :tREGEXP_OPT, "", [9, 9])
1860
+ end
1861
+
1862
+ def test_regexp_escape_hex
1863
+ assert_scanned('/regex\\x61xp/',
1864
+ :tREGEXP_BEG, "/", [0, 1],
1865
+ :tSTRING_CONTENT, "regex\\x61xp", [1, 12],
1866
+ :tSTRING_END, "/", [12, 13],
1867
+ :tREGEXP_OPT, "", [13, 13])
1868
+ end
1869
+
1870
+ def test_regexp_escape_hex_bad
1871
+ refute_scanned '/regex\\xzxp/', :tREGEXP_BEG, "/", [0, 1]
1872
+ end
1873
+
1874
+ def test_regexp_escape_hex_one
1875
+ assert_scanned('/^[\\xd\\xa]{2}/on',
1876
+ :tREGEXP_BEG, '/', [0, 1],
1877
+ :tSTRING_CONTENT, '^[\\xd\\xa]{2}', [1, 13],
1878
+ :tSTRING_END, "/", [13, 14],
1879
+ :tREGEXP_OPT, 'on', [14, 16])
1880
+ end
1881
+
1882
+ def test_regexp_escape_oct1
1883
+ assert_scanned('/regex\\0xp/',
1884
+ :tREGEXP_BEG, "/", [0, 1],
1885
+ :tSTRING_CONTENT, "regex\\0xp", [1, 10],
1886
+ :tSTRING_END, "/", [10, 11],
1887
+ :tREGEXP_OPT, "", [11, 11])
1888
+ end
1889
+
1890
+ def test_regexp_escape_oct2
1891
+ assert_scanned('/regex\\07xp/',
1892
+ :tREGEXP_BEG, "/", [0, 1],
1893
+ :tSTRING_CONTENT, "regex\\07xp", [1, 11],
1894
+ :tSTRING_END, "/", [11, 12],
1895
+ :tREGEXP_OPT, "", [12, 12])
1896
+ end
1897
+
1898
+ def test_regexp_escape_oct3
1899
+ assert_scanned('/regex\\10142/',
1900
+ :tREGEXP_BEG, "/", [0, 1],
1901
+ :tSTRING_CONTENT, "regex\\10142", [1, 12],
1902
+ :tSTRING_END, "/", [12, 13],
1903
+ :tREGEXP_OPT, "", [13, 13])
1904
+ end
1905
+
1906
+ def test_regexp_escape_return
1907
+ assert_scanned("/regex\\\nregex/",
1908
+ :tREGEXP_BEG, "/", [0, 1],
1909
+ :tSTRING_CONTENT, "regexregex", [1, 13],
1910
+ :tSTRING_END, "/", [13, 14],
1911
+ :tREGEXP_OPT, "", [14, 14])
1912
+ end
1913
+
1914
+ def test_regexp_escape_delimiter_meta
1915
+ assert_scanned("%r(\\))",
1916
+ :tREGEXP_BEG, "%r(", [0, 3],
1917
+ :tSTRING_CONTENT, "\\)", [3, 5],
1918
+ :tSTRING_END, ")", [5, 6],
1919
+ :tREGEXP_OPT, "", [6, 6])
1920
+ end
1921
+
1922
+ def test_regexp_escape_delimiter_nonmeta
1923
+ assert_scanned("%r'\\''",
1924
+ :tREGEXP_BEG, "%r'", [0, 3],
1925
+ :tSTRING_CONTENT, "'", [3, 5],
1926
+ :tSTRING_END, "'", [5, 6],
1927
+ :tREGEXP_OPT, "", [6, 6])
1928
+ end
1929
+
1930
+ def test_regexp_escape_other_meta
1931
+ assert_scanned("/\\.\\$\\*\\+\\.\\?\\|/",
1932
+ :tREGEXP_BEG, "/", [0, 1],
1933
+ :tSTRING_CONTENT, "\\.\\$\\*\\+\\.\\?\\|", [1, 15],
1934
+ :tSTRING_END, "/", [15, 16],
1935
+ :tREGEXP_OPT, "", [16, 16])
1936
+ end
1937
+
1938
+ def test_regexp_nm
1939
+ assert_scanned("/.*/nm",
1940
+ :tREGEXP_BEG, "/", [0, 1],
1941
+ :tSTRING_CONTENT, ".*", [1, 3],
1942
+ :tSTRING_END, "/", [3, 4],
1943
+ :tREGEXP_OPT, "nm", [4, 6])
1944
+ end
1945
+
1946
+ def test_rparen
1947
+ assert_scanned ")", :tRPAREN, ")", [0, 1]
1948
+ end
1949
+
1950
+ def test_rshft
1951
+ assert_scanned("a >> 2",
1952
+ :tIDENTIFIER, "a", [0, 1],
1953
+ :tRSHFT, ">>", [2, 4],
1954
+ :tINTEGER, 2, [5, 6])
1955
+ end
1956
+
1957
+ def test_rshft_equals
1958
+ assert_scanned("a >>= 2",
1959
+ :tIDENTIFIER, "a", [0, 1],
1960
+ :tOP_ASGN, ">>", [2, 5],
1961
+ :tINTEGER, 2, [6, 7])
1962
+ end
1963
+
1964
+ def test_star
1965
+ assert_scanned("a * ",
1966
+ :tIDENTIFIER, "a", [0, 1],
1967
+ :tSTAR2, "*", [2, 3])
1968
+
1969
+ assert_equal :expr_value, @lex.state
1970
+ end
1971
+
1972
+ def test_star2
1973
+ assert_scanned("a ** ",
1974
+ :tIDENTIFIER, "a", [0, 1],
1975
+ :tPOW, "**", [2, 4])
1976
+
1977
+ assert_equal :expr_value, @lex.state
1978
+ end
1979
+
1980
+ def test_star2_equals
1981
+ assert_scanned("a **= ",
1982
+ :tIDENTIFIER, "a", [0, 1],
1983
+ :tOP_ASGN, "**", [2, 5])
1984
+
1985
+ assert_equal :expr_beg, @lex.state
1986
+ end
1987
+
1988
+ def test_star2_beg
1989
+ assert_scanned("** ",
1990
+ :tDSTAR, "**", [0, 2])
1991
+
1992
+ assert_equal :expr_beg, @lex.state
1993
+ end
1994
+
1995
+ def test_star_arg
1996
+ @lex.state = :expr_arg
1997
+
1998
+ assert_scanned(" *a",
1999
+ :tSTAR, "*", [1, 2],
2000
+ :tIDENTIFIER, "a", [2, 3])
2001
+
2002
+ assert_equal :expr_arg, @lex.state
2003
+ end
2004
+
2005
+ def test_star_arg_beg
2006
+ @lex.state = :expr_beg
2007
+
2008
+ assert_scanned("*a",
2009
+ :tSTAR, "*", [0, 1],
2010
+ :tIDENTIFIER, "a", [1, 2])
2011
+
2012
+ assert_equal :expr_arg, @lex.state
2013
+ end
2014
+
2015
+ def test_star_arg_beg_fname
2016
+ @lex.state = :expr_fname
2017
+
2018
+ assert_scanned("*a",
2019
+ :tSTAR2, "*", [0, 1],
2020
+ :tIDENTIFIER, "a", [1, 2])
2021
+
2022
+ assert_equal :expr_arg, @lex.state
2023
+ end
2024
+
2025
+ def test_star_equals
2026
+ assert_scanned("a *= ",
2027
+ :tIDENTIFIER, "a", [0, 1],
2028
+ :tOP_ASGN, "*", [2, 4])
2029
+
2030
+ assert_equal :expr_beg, @lex.state
2031
+ end
2032
+
2033
+ def test_string_bad_eos
2034
+ refute_scanned('%',
2035
+ :tSTRING_BEG, '%', [0, 1])
2036
+ end
2037
+
2038
+ def test_string_bad_eos_quote
2039
+ refute_scanned('%{nest',
2040
+ :tSTRING_BEG, '%}', [0, 2])
2041
+ end
2042
+
2043
+ def test_string_double
2044
+ assert_scanned('"string"',
2045
+ :tSTRING, "string", [0, 8])
2046
+ end
2047
+
2048
+ def test_string_double_escape_C
2049
+ assert_scanned('"\\C-a"',
2050
+ :tSTRING, "\001", [0, 6])
2051
+ end
2052
+
2053
+ def test_string_double_escape_C_backslash
2054
+ assert_scanned('"\\C-\\\\"',
2055
+ :tSTRING, "\034", [0, 7])
2056
+ end
2057
+
2058
+ def test_string_double_escape_C_escape
2059
+ assert_scanned('"\\C-\\M-a"',
2060
+ :tSTRING, "\201", [0, 9])
2061
+ end
2062
+
2063
+ def test_string_double_escape_C_question
2064
+ assert_scanned('"\\C-?"',
2065
+ :tSTRING, "\177", [0, 6])
2066
+ end
2067
+
2068
+ def test_string_double_escape_M
2069
+ assert_scanned('"\\M-a"',
2070
+ :tSTRING, "\341", [0, 6])
2071
+ end
2072
+
2073
+ def test_string_double_escape_M_backslash
2074
+ assert_scanned('"\\M-\\\\"',
2075
+ :tSTRING, "\334", [0, 7])
2076
+ end
2077
+
2078
+ def test_string_double_escape_M_escape
2079
+ assert_scanned('"\\M-\\C-a"',
2080
+ :tSTRING, "\201", [0, 9])
2081
+ end
2082
+
2083
+ def test_string_double_escape_bs1
2084
+ assert_scanned('"a\\a\\a"',
2085
+ :tSTRING, "a\a\a", [0, 7])
2086
+ end
2087
+
2088
+ def test_string_double_escape_bs2
2089
+ assert_scanned('"a\\\\a"',
2090
+ :tSTRING, "a\\a", [0, 6])
2091
+ end
2092
+
2093
+ def test_string_double_escape_c
2094
+ assert_scanned('"\\ca"',
2095
+ :tSTRING, "\001", [0, 5])
2096
+ end
2097
+
2098
+ def test_string_double_escape_c_escape
2099
+ assert_scanned('"\\c\\M-a"',
2100
+ :tSTRING, "\201", [0, 8])
2101
+ end
2102
+
2103
+ def test_string_double_escape_c_question
2104
+ assert_scanned('"\\c?"',
2105
+ :tSTRING, "\177", [0, 5])
2106
+ end
2107
+
2108
+ def test_string_double_escape_chars
2109
+ assert_scanned('"s\\tri\\ng"',
2110
+ :tSTRING, "s\tri\ng", [0, 10])
2111
+ end
2112
+
2113
+ def test_string_double_escape_hex
2114
+ assert_scanned('"n = \\x61\\x62\\x63"',
2115
+ :tSTRING, "n = abc", [0, 18])
2116
+ end
2117
+
2118
+ def test_string_double_escape_octal
2119
+ assert_scanned('"n = \\101\\102\\103"',
2120
+ :tSTRING, "n = ABC", [0, 18])
2121
+ end
2122
+
2123
+ def test_string_double_escape_octal_wrap
2124
+ assert_scanned('"\\753"',
2125
+ :tSTRING, "\xEB", [0, 6])
2126
+ end
2127
+
2128
+ def test_string_double_interp
2129
+ assert_scanned("\"blah #x a \#@a b \#$b c \#{3} # \"",
2130
+ :tSTRING_BEG, "\"", [0, 1],
2131
+ :tSTRING_CONTENT, "blah #x a ", [1, 11],
2132
+ :tSTRING_DVAR, nil, [11, 12],
2133
+ :tIVAR, "@a", [12, 14],
2134
+ :tSTRING_CONTENT, " b ", [14, 17],
2135
+ :tSTRING_DVAR, nil, [17, 18],
2136
+ :tGVAR, "$b", [18, 20],
2137
+ :tSTRING_CONTENT, " c ", [20, 23],
2138
+ :tSTRING_DBEG, '#{', [23, 25],
2139
+ :tINTEGER, 3, [25, 26],
2140
+ :tRCURLY, "}", [26, 27],
2141
+ :tSTRING_CONTENT, " # ", [27, 30],
2142
+ :tSTRING_END, "\"", [30, 31])
2143
+ end
2144
+
2145
+ def test_string_double_interp_label
2146
+ assert_scanned('"#{foo:bar}"',
2147
+ :tSTRING_BEG, '"', [0, 1],
2148
+ :tSTRING_DBEG, '#{', [1, 3],
2149
+ :tIDENTIFIER, 'foo', [3, 6],
2150
+ :tSYMBOL, 'bar', [6, 10],
2151
+ :tRCURLY, '}', [10, 11],
2152
+ :tSTRING_END, '"', [11, 12])
2153
+ end
2154
+
2155
+ def test_string_double_nested_curlies
2156
+ assert_scanned('%{nest{one{two}one}nest}',
2157
+ :tSTRING_BEG, '%{', [0, 2],
2158
+ :tSTRING_CONTENT, "nest{one{two}one}nest", [2, 23],
2159
+ :tSTRING_END, '}', [23, 24])
2160
+ end
2161
+
2162
+ def test_string_double_no_interp
2163
+ assert_scanned("\"# blah\"", # pound first
2164
+ :tSTRING, "# blah", [0, 8])
2165
+
2166
+ assert_scanned("\"blah # blah\"", # pound not first
2167
+ :tSTRING, "blah # blah", [0, 13])
2168
+ end
2169
+
2170
+ def test_string_escape_x_single
2171
+ assert_scanned('"\\x0"',
2172
+ :tSTRING, "\000", [0, 5])
2173
+ end
2174
+
2175
+ def test_string_pct_Q
2176
+ assert_scanned("%Q[s1 s2]",
2177
+ :tSTRING_BEG, '%Q[', [0, 3],
2178
+ :tSTRING_CONTENT, "s1 s2", [3, 8],
2179
+ :tSTRING_END, ']', [8, 9])
2180
+ end
2181
+
2182
+ def test_string_pct_W
2183
+ assert_scanned("%W[s1 s2\ns3]",
2184
+ :tWORDS_BEG, "%W[", [0, 3],
2185
+ :tSTRING_CONTENT, "s1", [3, 5],
2186
+ :tSPACE, nil, [5, 6],
2187
+ :tSTRING_CONTENT, "s2", [6, 8],
2188
+ :tSPACE, nil, [8, 9],
2189
+ :tSTRING_CONTENT, "s3", [9, 11],
2190
+ :tSPACE, nil, [11, 11],
2191
+ :tSTRING_END, ']', [11, 12])
2192
+ end
2193
+
2194
+ def test_string_pct_W_bs_nl
2195
+ assert_scanned("%W[s1 \\\ns2]",
2196
+ :tWORDS_BEG, "%W[", [0, 3],
2197
+ :tSTRING_CONTENT, "s1", [3, 5],
2198
+ :tSPACE, nil, [5, 6],
2199
+ :tSTRING_CONTENT, "\ns2", [6, 10],
2200
+ :tSPACE, nil, [10, 10],
2201
+ :tSTRING_END, ']', [10, 11])
2202
+ end
2203
+
2204
+ def test_string_pct_W_interp
2205
+ assert_scanned('%W[#{1}#{2} #@a]',
2206
+ :tWORDS_BEG, '%W[', [0, 3],
2207
+ :tSTRING_DBEG, '#{', [3, 5],
2208
+ :tINTEGER, 1, [5, 6],
2209
+ :tRCURLY, '}', [6, 7],
2210
+ :tSTRING_DBEG, '#{', [7, 9],
2211
+ :tINTEGER, 2, [9, 10],
2212
+ :tRCURLY, '}', [10, 11],
2213
+ :tSPACE, nil, [11, 12],
2214
+ :tSTRING_DVAR, nil, [12, 13],
2215
+ :tIVAR, '@a', [13, 15],
2216
+ :tSPACE, nil, [15, 15],
2217
+ :tSTRING_END, ']', [15, 16])
2218
+ end
2219
+
2220
+ def test_string_pct_I
2221
+ assert_scanned("%I(s1 s2)",
2222
+ :tSYMBOLS_BEG, "%I(", [0, 3],
2223
+ :tSTRING_CONTENT, "s1", [3, 5],
2224
+ :tSPACE, nil, [5, 6],
2225
+ :tSTRING_CONTENT, "s2", [6, 8],
2226
+ :tSPACE, nil, [8, 8],
2227
+ :tSTRING_END, ')', [8, 9])
2228
+ end
2229
+
2230
+ def test_string_pct_angle
2231
+ assert_scanned("%<blah>",
2232
+ :tSTRING_BEG, '%<', [0, 2],
2233
+ :tSTRING_CONTENT, "blah", [2, 6],
2234
+ :tSTRING_END, '>', [6, 7])
2235
+ end
2236
+
2237
+ def test_string_pct_pct
2238
+ assert_scanned("%%blah%",
2239
+ :tSTRING_BEG, '%%', [0, 2],
2240
+ :tSTRING_CONTENT, "blah", [2, 6],
2241
+ :tSTRING_END, '%', [6, 7])
2242
+ end
2243
+
2244
+ def test_string_pct_w
2245
+ assert_scanned("%w[s1 s2 ]",
2246
+ :tQWORDS_BEG, "%w[", [0, 3],
2247
+ :tSTRING_CONTENT, "s1", [3, 5],
2248
+ :tSPACE, nil, [5, 6],
2249
+ :tSTRING_CONTENT, "s2", [6, 8],
2250
+ :tSPACE, nil, [8, 9],
2251
+ :tSTRING_END, "]", [9, 10])
2252
+ end
2253
+
2254
+ def test_string_pct_w_incomplete
2255
+ refute_scanned("%w[s1 ",
2256
+ :tQWORDS_BEG, "%w[", [0, 3],
2257
+ :tSTRING_CONTENT, "s1", [3, 5],
2258
+ :tSPACE, nil, [5, 6])
2259
+ end
2260
+
2261
+ def test_string_pct_w_bs_nl
2262
+ assert_scanned("%w[s1 \\\ns2]",
2263
+ :tQWORDS_BEG, "%w[", [0, 3],
2264
+ :tSTRING_CONTENT, "s1", [3, 5],
2265
+ :tSPACE, nil, [5, 6],
2266
+ :tSTRING_CONTENT, "\ns2", [6, 10],
2267
+ :tSPACE, nil, [10, 10],
2268
+ :tSTRING_END, ']', [10, 11])
2269
+ end
2270
+
2271
+ def test_string_pct_w_bs_sp
2272
+ assert_scanned("%w[s\\ 1 s\\ 2]",
2273
+ :tQWORDS_BEG, "%w[", [0, 3],
2274
+ :tSTRING_CONTENT, "s 1", [3, 7],
2275
+ :tSPACE, nil, [7, 8],
2276
+ :tSTRING_CONTENT, "s 2", [8, 12],
2277
+ :tSPACE, nil, [12, 12],
2278
+ :tSTRING_END, ']', [12, 13])
2279
+ end
2280
+
2281
+ def test_string_pct_w_tab
2282
+ assert_scanned("%w[abc\tdef]",
2283
+ :tQWORDS_BEG, "%w[", [0, 3],
2284
+ :tSTRING_CONTENT, "abc", [3, 6],
2285
+ :tSPACE, nil, [6, 7],
2286
+ :tSTRING_CONTENT, "def", [7, 10],
2287
+ :tSPACE, nil, [10, 10],
2288
+ :tSTRING_END, ']', [10, 11])
2289
+ end
2290
+
2291
+ def test_string_pct_i
2292
+ assert_scanned("%i(s1 s2)",
2293
+ :tQSYMBOLS_BEG, "%i(", [0, 3],
2294
+ :tSTRING_CONTENT, "s1", [3, 5],
2295
+ :tSPACE, nil, [5, 6],
2296
+ :tSTRING_CONTENT, "s2", [6, 8],
2297
+ :tSPACE, nil, [8, 8],
2298
+ :tSTRING_END, ')', [8, 9])
2299
+ end
2300
+
2301
+ def test_string_pct_backslash
2302
+ assert_scanned("%\\a\\",
2303
+ :tSTRING_BEG, "%\\", [0, 2],
2304
+ :tSTRING_CONTENT, "a", [2, 3],
2305
+ :tSTRING_END, "\\", [3, 4])
2306
+ end
2307
+
2308
+ def test_string_pct_w_backslash
2309
+ assert_scanned("%w\\s1 s2 \\",
2310
+ :tQWORDS_BEG, "%w\\", [0, 3],
2311
+ :tSTRING_CONTENT, "s1", [3, 5],
2312
+ :tSPACE, nil, [5, 6],
2313
+ :tSTRING_CONTENT, "s2", [6, 8],
2314
+ :tSPACE, nil, [8, 9],
2315
+ :tSTRING_END, "\\", [9, 10])
2316
+ end
2317
+
2318
+ def test_string_pct_w_backslash_nl
2319
+ assert_scanned("%w\\s1 s2 \\\n",
2320
+ :tQWORDS_BEG, "%w\\", [0, 3],
2321
+ :tSTRING_CONTENT, "s1", [3, 5],
2322
+ :tSPACE, nil, [5, 6],
2323
+ :tSTRING_CONTENT, "s2", [6, 8],
2324
+ :tSPACE, nil, [8, 9],
2325
+ :tSTRING_END, "\\", [9, 10],
2326
+ :tNL, nil, [10, 11])
2327
+ end
2328
+
2329
+ def test_string_pct_w_backslash_interp_nl
2330
+ assert_scanned("%W\\blah #x a \#@a b \#$b c \#{3} # \\",
2331
+ :tWORDS_BEG, "%W\\", [0, 3],
2332
+ :tSTRING_CONTENT, "blah", [3, 7],
2333
+ :tSPACE, nil, [7, 8],
2334
+ :tSTRING_CONTENT, "#x", [8, 10],
2335
+ :tSPACE, nil, [10, 11],
2336
+ :tSTRING_CONTENT, "a", [11, 12],
2337
+ :tSPACE, nil, [12, 13],
2338
+ :tSTRING_DVAR, nil, [13, 14],
2339
+ :tIVAR, "@a", [14, 16],
2340
+ :tSPACE, nil, [16, 17],
2341
+ :tSTRING_CONTENT, "b", [17, 18],
2342
+ :tSPACE, nil, [18, 19],
2343
+ :tSTRING_DVAR, nil, [19, 20],
2344
+ :tGVAR, "$b", [20, 22],
2345
+ :tSPACE, nil, [22, 23],
2346
+ :tSTRING_CONTENT, "c", [23, 24],
2347
+ :tSPACE, nil, [24, 25],
2348
+ :tSTRING_DBEG, '#{', [25, 27],
2349
+ :tINTEGER, 3, [27, 28],
2350
+ :tRCURLY, "}", [28, 29],
2351
+ :tSPACE, nil, [29, 30],
2352
+ :tSTRING_CONTENT, "#", [30, 31],
2353
+ :tSPACE, nil, [31, 32],
2354
+ :tSTRING_END, "\\", [32, 33])
2355
+ end
2356
+
2357
+ def test_string_pct_backslash_with_bad_escape
2358
+ # No escapes are allowed in a backslash-delimited string
2359
+ refute_scanned("%\\a\\n\\",
2360
+ :tSTRING_BEG, "%\\", [0, 2],
2361
+ :tSTRING_CONTENT, "a", [2, 3],
2362
+ :tSTRING_END, "\\", [3, 4],
2363
+ :tIDENTIFIER, "n", [4, 5])
2364
+ end
2365
+
2366
+ def test_string_pct_intertwined_with_heredoc
2367
+ assert_scanned("<<-foo + %\\a\nbar\nfoo\nb\\",
2368
+ :tSTRING_BEG, "<<\"", [0, 6],
2369
+ :tSTRING_CONTENT, "bar\n", [13, 17],
2370
+ :tSTRING_END, "foo", [17, 20],
2371
+ :tPLUS, "+", [7, 8],
2372
+ :tSTRING_BEG, "%\\", [9, 11],
2373
+ :tSTRING_CONTENT, "a\n", [11, 13],
2374
+ :tSTRING_CONTENT, "b", [21, 22],
2375
+ :tSTRING_END, "\\", [22, 23])
2376
+ end
2377
+
2378
+ def test_string_pct_q_backslash
2379
+ assert_scanned("%q\\a\\",
2380
+ :tSTRING_BEG, "%q\\", [0, 3],
2381
+ :tSTRING_CONTENT, "a", [3, 4],
2382
+ :tSTRING_END, "\\", [4, 5])
2383
+ end
2384
+
2385
+ def test_string_pct_Q_backslash
2386
+ assert_scanned("%Q\\a\\",
2387
+ :tSTRING_BEG, "%Q\\", [0, 3],
2388
+ :tSTRING_CONTENT, "a", [3, 4],
2389
+ :tSTRING_END, "\\", [4, 5])
2390
+ end
2391
+
2392
+ def test_string_single
2393
+ assert_scanned("'string'",
2394
+ :tSTRING, "string", [0, 8])
2395
+ end
2396
+
2397
+ def test_string_single_escape_chars
2398
+ assert_scanned("'s\\tri\\ng'",
2399
+ :tSTRING, "s\\tri\\ng", [0, 10])
2400
+ end
2401
+
2402
+ def test_string_single_nl
2403
+ assert_scanned("'blah\\\nblah'",
2404
+ :tSTRING_BEG, "'", [0, 1],
2405
+ :tSTRING_CONTENT, "blah\\\n", [1, 7],
2406
+ :tSTRING_CONTENT, "blah", [7, 11],
2407
+ :tSTRING_END, "'", [11, 12])
2408
+ end
2409
+
2410
+ def test_symbol
2411
+ assert_scanned(":symbol",
2412
+ :tSYMBOL, "symbol", [0, 7])
2413
+ end
2414
+
2415
+ def test_symbol_double
2416
+ assert_scanned(":\"symbol\"",
2417
+ :tSYMBEG, ":\"", [0, 2],
2418
+ :tSTRING_CONTENT, "symbol", [2, 8],
2419
+ :tSTRING_END, "\"", [8, 9])
2420
+ end
2421
+
2422
+ def test_symbol_single
2423
+ assert_scanned(":'symbol'",
2424
+ :tSYMBEG, ":'", [0, 2],
2425
+ :tSTRING_CONTENT, "symbol", [2, 8],
2426
+ :tSTRING_END, "'", [8, 9])
2427
+ end
2428
+
2429
+ def test_ternary
2430
+ assert_scanned("a ? b : c",
2431
+ :tIDENTIFIER, "a", [0, 1],
2432
+ :tEH, "?", [2, 3],
2433
+ :tIDENTIFIER, "b", [4, 5],
2434
+ :tCOLON, ":", [6, 7],
2435
+ :tIDENTIFIER, "c", [8, 9])
2436
+
2437
+ assert_scanned("a ?b : c",
2438
+ :tIDENTIFIER, "a", [0, 1],
2439
+ :tINTEGER, 98, [2, 4],
2440
+ :tCOLON, ":", [5, 6],
2441
+ :tIDENTIFIER, "c", [7, 8])
2442
+
2443
+ assert_scanned("a ?bb : c", # GAH! MATZ!!!
2444
+ :tIDENTIFIER, "a", [0, 1],
2445
+ :tEH, "?", [2, 3],
2446
+ :tIDENTIFIER, "bb", [3, 5],
2447
+ :tCOLON, ":", [6, 7],
2448
+ :tIDENTIFIER, "c", [8, 9])
2449
+
2450
+ assert_scanned("42 ?", # 42 forces expr_end
2451
+ :tINTEGER, 42, [0, 2],
2452
+ :tEH, "?", [3, 4])
2453
+ end
2454
+
2455
+ def test_tilde
2456
+ assert_scanned "~", :tTILDE, "~", [0, 1]
2457
+ end
2458
+
2459
+ def test_tilde_unary
2460
+ @lex.state = :expr_fname
2461
+ assert_scanned "~@", :tTILDE, "~@", [0, 2]
2462
+ end
2463
+
2464
+ def test_uminus
2465
+ assert_scanned("-blah",
2466
+ :tUMINUS, "-", [0, 1],
2467
+ :tIDENTIFIER, "blah", [1, 5])
2468
+ end
2469
+
2470
+ def test_underscore
2471
+ assert_scanned("_var", :tIDENTIFIER, "_var", [0, 4])
2472
+ end
2473
+
2474
+ def test_underscore_end
2475
+ assert_scanned("__END__\n")
2476
+ assert_scanned("__END__")
2477
+ assert_scanned("__END__ foo",
2478
+ :tIDENTIFIER, '__END__', [0, 7],
2479
+ :tIDENTIFIER, 'foo', [8, 11])
2480
+ assert_scanned("__END__\rfoo",
2481
+ :tIDENTIFIER, '__END__', [0, 7],
2482
+ :tIDENTIFIER, 'foo', [8, 11])
2483
+ end
2484
+
2485
+ def test_uplus
2486
+ assert_scanned("+blah",
2487
+ :tUPLUS, "+", [0, 1],
2488
+ :tIDENTIFIER, "blah", [1, 5])
2489
+ end
2490
+
2491
+ def test_if_unless_mod
2492
+ assert_scanned("return if true unless false",
2493
+ :kRETURN, "return", [0, 6],
2494
+ :kIF_MOD, "if", [7, 9],
2495
+ :kTRUE, "true", [10, 14],
2496
+ :kUNLESS_MOD, "unless", [15, 21],
2497
+ :kFALSE, "false", [22, 27])
2498
+ end
2499
+
2500
+ def test_if_stmt
2501
+ assert_scanned("if true\n return end",
2502
+ :kIF, "if", [0, 2],
2503
+ :kTRUE, "true", [3, 7],
2504
+ :tNL, nil, [7, 8],
2505
+ :kRETURN, "return", [9, 15],
2506
+ :kEND, "end", [16, 19])
2507
+ end
2508
+
2509
+ def test_sclass_label
2510
+ setup_lexer 20
2511
+ assert_scanned("class << a:b",
2512
+ :kCLASS, 'class', [0, 5],
2513
+ :tLSHFT, '<<', [6, 8],
2514
+ :tIDENTIFIER, 'a', [9, 10],
2515
+ :tSYMBOL, 'b', [10, 12])
2516
+ end
2517
+
2518
+ def test_fname_pct_s__22
2519
+ setup_lexer 22
2520
+ @lex.state = :expr_fname
2521
+ assert_scanned("%s(a)",
2522
+ :tPERCENT, '%', [0, 1],
2523
+ :tIDENTIFIER, 's', [1, 2],
2524
+ :tLPAREN2, '(', [2, 3],
2525
+ :tIDENTIFIER, 'a', [3, 4],
2526
+ :tRPAREN, ')', [4, 5])
2527
+ end
2528
+
2529
+ def test_fname_pct_s__23
2530
+ setup_lexer 23
2531
+ @lex.state = :expr_fname
2532
+ assert_scanned("%s(a)",
2533
+ :tSYMBEG, '%s(', [0, 3],
2534
+ :tSTRING_CONTENT, 'a', [3, 4],
2535
+ :tSTRING_END, ')', [4, 5])
2536
+ end
2537
+
2538
+ def test_static_env
2539
+ env = Parser::StaticEnvironment.new
2540
+ env.declare "a"
2541
+
2542
+ @lex.static_env = env
2543
+ assert_scanned("a [42]",
2544
+ :tIDENTIFIER, "a", [0, 1],
2545
+ :tLBRACK2, "[", [2, 3],
2546
+ :tINTEGER, 42, [3, 5],
2547
+ :tRBRACK, "]", [5, 6])
2548
+ end
2549
+
2550
+ def test_int_suffix
2551
+ [18, 19, 20].each do |version|
2552
+ setup_lexer version
2553
+
2554
+ assert_scanned("42r",
2555
+ :tINTEGER, 42, [0, 2],
2556
+ :tIDENTIFIER, 'r', [2, 3])
2557
+
2558
+ assert_scanned("42if",
2559
+ :tINTEGER, 42, [0, 2],
2560
+ :kIF_MOD, 'if', [2, 4])
2561
+ end
2562
+
2563
+ setup_lexer 21
2564
+
2565
+ assert_scanned("42r", :tRATIONAL, Rational(42), [0, 3])
2566
+ assert_scanned("42i", :tIMAGINARY, Complex(0, 42), [0, 3])
2567
+ assert_scanned("42ri", :tIMAGINARY, Complex(0, Rational(42)), [0, 4])
2568
+ end
2569
+
2570
+ def test_float_suffix
2571
+ [18, 19, 20].each do |version|
2572
+ setup_lexer version
2573
+
2574
+ assert_scanned("42.1r",
2575
+ :tFLOAT, 42.1, [0, 4],
2576
+ :tIDENTIFIER, 'r', [4, 5])
2577
+
2578
+ assert_scanned("42.1if",
2579
+ :tFLOAT, 42.1, [0, 4],
2580
+ :kIF_MOD, 'if', [4, 6])
2581
+
2582
+ assert_scanned("1e1r",
2583
+ :tFLOAT, 1e1, [0, 3],
2584
+ :tIDENTIFIER, 'r', [3, 4])
2585
+ end
2586
+
2587
+ begin
2588
+ # Feature-check.
2589
+ Rational("10")
2590
+
2591
+ setup_lexer 21
2592
+
2593
+ assert_scanned("42.1r", :tRATIONAL, Rational(421, 10), [0, 5])
2594
+ assert_scanned("42.1i", :tIMAGINARY, Complex(0, 42.1), [0, 5])
2595
+ assert_scanned("42.1ri", :tIMAGINARY, Complex(0, Rational(421, 10)), [0, 6])
2596
+ assert_scanned("42.1ir",
2597
+ :tIMAGINARY, Complex(0, 42.1), [0, 5],
2598
+ :tIDENTIFIER, 'r', [5, 6])
2599
+
2600
+ assert_scanned("1e1i", :tIMAGINARY, Complex(0, 1e1), [0, 4])
2601
+ assert_scanned("1e1r",
2602
+ :tFLOAT, 1e1, [0, 3],
2603
+ :tIDENTIFIER, 'r', [3, 4])
2604
+ assert_scanned("1e1ri",
2605
+ :tFLOAT, 1e1, [0, 3],
2606
+ :tIDENTIFIER, 'ri', [3, 5])
2607
+ assert_scanned("1e1ir",
2608
+ :tIMAGINARY, Complex(0, 1e1), [0, 4],
2609
+ :tIDENTIFIER, 'r', [4, 5])
2610
+ rescue NoMethodError
2611
+ # Ruby not modern enough
2612
+ end
2613
+ end
2614
+
2615
+ def test_eof
2616
+ assert_scanned("self",
2617
+ :kSELF, "self", [0, 4])
2618
+ assert_equal([false, ["$eof", Parser::Source::Range.new(@lex.source_buffer, 4, 4)]],
2619
+ @lex.advance)
2620
+ end
2621
+
2622
+ #
2623
+ # Test for 'fluent interface'
2624
+ #
2625
+
2626
+ def test_fluent_dot
2627
+ assert_scanned("x\n.y",
2628
+ :tIDENTIFIER, 'x', [0, 1],
2629
+ :tDOT, '.', [2, 3],
2630
+ :tIDENTIFIER, 'y', [3, 4])
2631
+
2632
+ assert_scanned("x\n .y",
2633
+ :tIDENTIFIER, 'x', [0, 1],
2634
+ :tDOT, '.', [4, 5],
2635
+ :tIDENTIFIER, 'y', [5, 6])
2636
+
2637
+ assert_scanned("x # comment\n .y",
2638
+ :tIDENTIFIER, 'x', [0, 1],
2639
+ :tDOT, '.', [14, 15],
2640
+ :tIDENTIFIER, 'y', [15, 16])
2641
+ end
2642
+
2643
+ def test_fluent_and_dot
2644
+ assert_scanned("x\n&.y",
2645
+ :tIDENTIFIER, 'x', [0, 1],
2646
+ :tANDDOT, '&.', [2, 4],
2647
+ :tIDENTIFIER, 'y', [4, 5])
2648
+ end
2649
+
2650
+ #
2651
+ # Tests for whitespace.
2652
+ #
2653
+
2654
+ def test_whitespace_fname
2655
+ @lex.state = :expr_fname
2656
+ assert_scanned('class',
2657
+ :kCLASS, 'class', [0, 5])
2658
+
2659
+ @lex.state = :expr_fname
2660
+ assert_scanned(' class',
2661
+ :kCLASS, 'class', [1, 6])
2662
+
2663
+ @lex.state = :expr_fname
2664
+ assert_scanned("\nclass",
2665
+ :kCLASS, 'class', [1, 6])
2666
+
2667
+ @lex.state = :expr_fname
2668
+ assert_scanned("\\\nclass",
2669
+ :kCLASS, 'class', [2, 7])
2670
+
2671
+ @lex.state = :expr_fname
2672
+ assert_scanned("#foo\nclass",
2673
+ :kCLASS, 'class', [5, 10])
2674
+ end
2675
+
2676
+ def test_whitespace_endfn
2677
+ setup_lexer(21)
2678
+
2679
+ @lex.state = :expr_endfn
2680
+ assert_scanned('foo:',
2681
+ :tLABEL, 'foo', [0, 4])
2682
+
2683
+ @lex.state = :expr_endfn
2684
+ assert_scanned(' foo:',
2685
+ :tLABEL, 'foo', [1, 5])
2686
+
2687
+ @lex.state = :expr_endfn
2688
+ assert_scanned("\nfoo:",
2689
+ :tNL, nil, [0, 1],
2690
+ :tIDENTIFIER, 'foo', [1, 4],
2691
+ :tCOLON, ':', [4, 5])
2692
+
2693
+ @lex.state = :expr_endfn
2694
+ assert_scanned("\nfoo: ",
2695
+ :tNL, nil, [0, 1],
2696
+ :tIDENTIFIER, 'foo', [1, 4],
2697
+ :tCOLON, ':', [4, 5])
2698
+
2699
+ @lex.state = :expr_endfn
2700
+ assert_scanned("\\\nfoo:",
2701
+ :tLABEL, 'foo', [2, 6])
2702
+
2703
+ @lex.state = :expr_endfn
2704
+ assert_scanned("#foo\nfoo:",
2705
+ :tNL, nil, [4, 5],
2706
+ :tIDENTIFIER, 'foo', [5, 8],
2707
+ :tCOLON, ':', [8, 9])
2708
+
2709
+ @lex.state = :expr_endfn
2710
+ assert_scanned("#foo\nfoo: ",
2711
+ :tNL, nil, [4, 5],
2712
+ :tIDENTIFIER, 'foo', [5, 8],
2713
+ :tCOLON, ':', [8, 9])
2714
+ end
2715
+
2716
+ def test_whitespace_dot
2717
+ @lex.state = :expr_dot
2718
+ assert_scanned('class',
2719
+ :tIDENTIFIER, 'class', [0, 5])
2720
+
2721
+ @lex.state = :expr_dot
2722
+ assert_scanned(' class',
2723
+ :tIDENTIFIER, 'class', [1, 6])
2724
+
2725
+ @lex.state = :expr_dot
2726
+ assert_scanned("\nclass",
2727
+ :tIDENTIFIER, 'class', [1, 6])
2728
+
2729
+ @lex.state = :expr_dot
2730
+ assert_scanned("\\\nclass",
2731
+ :tIDENTIFIER, 'class', [2, 7])
2732
+
2733
+ @lex.state = :expr_dot
2734
+ assert_scanned("#foo\nclass",
2735
+ :tIDENTIFIER, 'class', [5, 10])
2736
+ end
2737
+
2738
+ def test_whitespace_arg
2739
+ @lex.state = :expr_arg
2740
+ assert_scanned('+',
2741
+ :tPLUS, '+', [0, 1])
2742
+
2743
+ @lex.state = :expr_arg
2744
+ assert_scanned(' +',
2745
+ :tUPLUS, '+', [1, 2])
2746
+
2747
+ @lex.state = :expr_arg
2748
+ assert_scanned("\n+",
2749
+ :tNL, nil, [0, 1],
2750
+ :tUPLUS, '+', [1, 2])
2751
+
2752
+ @lex.state = :expr_arg
2753
+ assert_scanned("\\\n+",
2754
+ :tUPLUS, '+', [2, 3])
2755
+
2756
+ @lex.state = :expr_arg
2757
+ assert_scanned("\\\n +",
2758
+ :tUPLUS, '+', [3, 4])
2759
+
2760
+ @lex.state = :expr_arg
2761
+ assert_scanned("#foo\n+",
2762
+ :tNL, nil, [4, 5],
2763
+ :tUPLUS, '+', [5, 6])
2764
+ end
2765
+
2766
+ def test_whitespace_endarg
2767
+ @lex.state = :expr_endarg
2768
+ assert_scanned('{',
2769
+ :tLBRACE_ARG, '{', [0, 1])
2770
+
2771
+ @lex.state = :expr_endarg
2772
+ assert_scanned(' {',
2773
+ :tLBRACE_ARG, '{', [1, 2])
2774
+
2775
+ @lex.state = :expr_endarg
2776
+ assert_scanned("\n{",
2777
+ :tNL, nil, [0, 1],
2778
+ :tLBRACE, '{', [1, 2])
2779
+
2780
+ @lex.state = :expr_endarg
2781
+ assert_scanned("\\\n{",
2782
+ :tLBRACE_ARG, '{', [2, 3])
2783
+
2784
+ @lex.state = :expr_endarg
2785
+ assert_scanned("#foo\n{",
2786
+ :tNL, nil, [4, 5],
2787
+ :tLBRACE, '{', [5, 6])
2788
+ end
2789
+
2790
+ def test_whitespace_mid
2791
+ @lex.state = :expr_mid
2792
+ assert_scanned('+',
2793
+ :tUPLUS, '+', [0, 1])
2794
+
2795
+ @lex.state = :expr_mid
2796
+ assert_scanned(' +',
2797
+ :tUPLUS, '+', [1, 2])
2798
+
2799
+ @lex.state = :expr_mid
2800
+ assert_scanned("\n+",
2801
+ :tNL, nil, [0, 1],
2802
+ :tUPLUS, '+', [1, 2])
2803
+
2804
+ @lex.state = :expr_mid
2805
+ assert_scanned("\\\n+",
2806
+ :tUPLUS, '+', [2, 3])
2807
+
2808
+ @lex.state = :expr_mid
2809
+ assert_scanned("#foo\n+",
2810
+ :tNL, nil, [4, 5],
2811
+ :tUPLUS, '+', [5, 6])
2812
+ end
2813
+
2814
+ def test_whitespace_beg
2815
+ @lex.state = :expr_beg
2816
+ assert_scanned('+',
2817
+ :tUPLUS, '+', [0, 1])
2818
+
2819
+ @lex.state = :expr_beg
2820
+ assert_scanned(' +',
2821
+ :tUPLUS, '+', [1, 2])
2822
+
2823
+ @lex.state = :expr_beg
2824
+ assert_scanned("\n+",
2825
+ :tUPLUS, '+', [1, 2])
2826
+
2827
+ @lex.state = :expr_beg
2828
+ assert_scanned("\\\n+",
2829
+ :tUPLUS, '+', [2, 3])
2830
+
2831
+ @lex.state = :expr_beg
2832
+ assert_scanned("#foo\n+",
2833
+ :tUPLUS, '+', [5, 6])
2834
+ end
2835
+
2836
+ def test_whitespace_value
2837
+ setup_lexer(20)
2838
+
2839
+ @lex.state = :expr_value
2840
+ assert_scanned('a:b',
2841
+ :tIDENTIFIER, 'a', [0, 1],
2842
+ :tSYMBOL, 'b', [1, 3])
2843
+
2844
+ @lex.state = :expr_value
2845
+ assert_scanned(' a:b',
2846
+ :tIDENTIFIER, 'a', [1, 2],
2847
+ :tSYMBOL, 'b', [2, 4])
2848
+
2849
+ @lex.state = :expr_value
2850
+ assert_scanned("\na:b",
2851
+ :tIDENTIFIER, 'a', [1, 2],
2852
+ :tSYMBOL, 'b', [2, 4])
2853
+
2854
+ @lex.state = :expr_value
2855
+ assert_scanned("\\\na:b",
2856
+ :tIDENTIFIER, 'a', [2, 3],
2857
+ :tSYMBOL, 'b', [3, 5])
2858
+
2859
+ @lex.state = :expr_value
2860
+ assert_scanned("#foo\na:b",
2861
+ :tIDENTIFIER, 'a', [5, 6],
2862
+ :tSYMBOL, 'b', [6, 8])
2863
+ end
2864
+
2865
+ def test_whitespace_end
2866
+ @lex.state = :expr_end
2867
+ assert_scanned('+ 1',
2868
+ :tPLUS, '+', [0, 1],
2869
+ :tINTEGER, 1, [2, 3])
2870
+
2871
+ @lex.state = :expr_end
2872
+ assert_scanned(' + 1',
2873
+ :tPLUS, '+', [1, 2],
2874
+ :tINTEGER, 1, [3, 4])
2875
+
2876
+ @lex.state = :expr_end
2877
+ assert_scanned("\n+ 1",
2878
+ :tNL, nil, [0, 1],
2879
+ :tUNARY_NUM, '+', [1, 2],
2880
+ :tINTEGER, 1, [3, 4])
2881
+
2882
+ @lex.state = :expr_end
2883
+ assert_scanned("\\\n+ 1",
2884
+ :tPLUS, '+', [2, 3],
2885
+ :tINTEGER, 1, [4, 5])
2886
+
2887
+ @lex.state = :expr_end
2888
+ assert_scanned("#foo\n+ 1",
2889
+ :tNL, nil, [4, 5],
2890
+ :tUNARY_NUM, '+', [5, 6],
2891
+ :tINTEGER, 1, [7, 8])
2892
+ end
2893
+
2894
+ def test_whitespace_cr
2895
+ setup_lexer(20)
2896
+ assert_scanned("<<E\nfoo\nE\rO",
2897
+ :tSTRING_BEG, '<<"', [0, 3],
2898
+ :tSTRING_CONTENT, "foo\n", [4, 8],
2899
+ :tSTRING_END, 'E', [8, 11],
2900
+ :tNL, nil, [3, 4])
2901
+
2902
+ setup_lexer(21)
2903
+ refute_scanned("<<E\nfoo\nE\rO",
2904
+ :tSTRING_BEG, '<<"', [0, 3],
2905
+ :tSTRING_CONTENT, "foo\n", [4, 8])
2906
+ end
2907
+
2908
+ #
2909
+ # Handling of encoding-related issues.
2910
+ #
2911
+
2912
+ def test_transcoded_source_is_converted_back_to_original_encoding
2913
+ setup_lexer(19)
2914
+ @lex.force_utf32 = true
2915
+ @lex.tokens = []
2916
+ assert_scanned(utf('"a" + "b"'),
2917
+ :tSTRING, "a", [0, 3],
2918
+ :tPLUS, "+", [4, 5],
2919
+ :tSTRING, "b", [6, 9])
2920
+
2921
+ @lex.tokens.each do |_type, (str, _range)|
2922
+ assert_equal Encoding::UTF_8, str.encoding
2923
+ end
2924
+ end
2925
+
2926
+ #
2927
+ # Tests for bugs.
2928
+ #
2929
+ # These tests should be moved from nursery and properly
2930
+ # categorized when it's clear how to do that.
2931
+ #
2932
+
2933
+ def test_bug_sclass_joined
2934
+ assert_scanned("class<<self",
2935
+ :kCLASS, "class", [0, 5],
2936
+ :tLSHFT, "<<", [5, 7],
2937
+ :kSELF, "self", [7, 11])
2938
+ end
2939
+
2940
+ def test_bug_const_expr_end
2941
+ assert_scanned("Option",
2942
+ :tCONSTANT, 'Option', [0, 6])
2943
+
2944
+ assert_equal :expr_cmdarg, @lex.state
2945
+ end
2946
+
2947
+ def test_bug_expr_beg_div
2948
+ @lex.state = :expr_beg
2949
+ assert_scanned("/=/",
2950
+ :tREGEXP_BEG, "/", [0, 1],
2951
+ :tSTRING_CONTENT, "=", [1, 2],
2952
+ :tSTRING_END, "/", [2, 3],
2953
+ :tREGEXP_OPT, "", [3, 3])
2954
+
2955
+ @lex.state = :expr_beg
2956
+ assert_scanned("/ = /",
2957
+ :tREGEXP_BEG, "/", [0, 1],
2958
+ :tSTRING_CONTENT, " = ", [1, 4],
2959
+ :tSTRING_END, "/", [4, 5],
2960
+ :tREGEXP_OPT, "", [5, 5])
2961
+ end
2962
+
2963
+ def test_bug_expr_beg_percent
2964
+ @lex.state = :expr_beg
2965
+ assert_scanned("%=foo=",
2966
+ :tSTRING_BEG, "%=", [0, 2],
2967
+ :tSTRING_CONTENT, 'foo', [2, 5],
2968
+ :tSTRING_END, "=", [5, 6])
2969
+
2970
+ @lex.state = :expr_beg
2971
+ assert_scanned("% = ",
2972
+ :tSTRING_BEG, "% ", [0, 2],
2973
+ :tSTRING_CONTENT, '=', [2, 3],
2974
+ :tSTRING_END, ' ', [3, 4])
2975
+ end
2976
+
2977
+ def test_bug_expr_beg_document
2978
+ @lex.state = :expr_beg
2979
+ assert_scanned(" \n=begin\n=end\nend",
2980
+ :kEND, "end", [14, 17])
2981
+
2982
+ end
2983
+
2984
+ def test_bug_expr_beg_number
2985
+ @lex.state = :expr_beg
2986
+ assert_scanned("86400_000_000",
2987
+ :tINTEGER, 86400_000_000, [0, 13])
2988
+ end
2989
+
2990
+ def test_bug_expr_beg_backspace_nl
2991
+ @lex.state = :expr_beg
2992
+ assert_scanned("\n/foo/",
2993
+ :tREGEXP_BEG, "/", [1, 2],
2994
+ :tSTRING_CONTENT, "foo", [2, 5],
2995
+ :tSTRING_END, "/", [5, 6],
2996
+ :tREGEXP_OPT, "", [6, 6])
2997
+ end
2998
+
2999
+ def test_bug_expr_beg_heredoc
3000
+ assert_scanned("<<EOL % [\nfoo\nEOL\n]",
3001
+ :tSTRING_BEG, '<<"', [0, 5],
3002
+ :tSTRING_CONTENT, "foo\n", [10, 14],
3003
+ :tSTRING_END, 'EOL', [14, 17],
3004
+ :tPERCENT, '%', [6, 7],
3005
+ :tLBRACK, '[', [8, 9],
3006
+ :tRBRACK, ']', [18, 19])
3007
+ end
3008
+
3009
+ def test_bug_expr_beg_fid
3010
+ assert_scanned("Rainbows!",
3011
+ :tFID, 'Rainbows!', [0, 9])
3012
+ end
3013
+
3014
+ def test_bug_expr_beg_rescue_assoc
3015
+ assert_scanned("rescue=>",
3016
+ :kRESCUE, 'rescue', [0, 6],
3017
+ :tASSOC, '=>', [6, 8])
3018
+ end
3019
+
3020
+ def test_bug_expr_arg_percent
3021
+ @lex.state = :expr_arg
3022
+ assert_scanned("%[",
3023
+ :tPERCENT, "%", [0, 1],
3024
+ :tLBRACK, "[", [1, 2])
3025
+
3026
+ @lex.state = :expr_arg
3027
+ assert_scanned("%=1",
3028
+ :tOP_ASGN, "%", [0, 2],
3029
+ :tINTEGER, 1, [2, 3])
3030
+
3031
+ @lex.state = :expr_arg
3032
+ assert_scanned(" %[1]",
3033
+ :tSTRING_BEG, "%[", [1, 3],
3034
+ :tSTRING_CONTENT, '1', [3, 4],
3035
+ :tSTRING_END, ']', [4, 5])
3036
+
3037
+ @lex.state = :expr_arg
3038
+ assert_scanned(" %=1=",
3039
+ :tOP_ASGN, "%", [1, 3],
3040
+ :tINTEGER, 1, [3, 4],
3041
+ :tEQL, "=", [4, 5])
3042
+
3043
+ @lex.state = :expr_arg
3044
+ assert_scanned(" %\n",
3045
+ :tPERCENT, '%', [1, 2])
3046
+ end
3047
+
3048
+ def test_bug_expr_arg_lt_lt
3049
+ @lex.state = :expr_arg
3050
+ assert_scanned("<<EOS\nEOS",
3051
+ :tLSHFT, "<<", [0, 2],
3052
+ :tCONSTANT, "EOS", [2, 5],
3053
+ :tNL, nil, [5, 6],
3054
+ :tCONSTANT, "EOS", [6, 9])
3055
+
3056
+ @lex.state = :expr_arg
3057
+ assert_scanned(" <<EOS\nEOS",
3058
+ :tSTRING_BEG, "<<\"", [1, 6],
3059
+ :tSTRING_END, "EOS", [7, 10],
3060
+ :tNL, nil, [6, 7])
3061
+ end
3062
+
3063
+ def test_bug_expr_arg_slash
3064
+ @lex.state = :expr_arg
3065
+ assert_scanned("/1",
3066
+ :tDIVIDE, "/", [0, 1],
3067
+ :tINTEGER, 1, [1, 2])
3068
+
3069
+ @lex.state = :expr_arg
3070
+ assert_scanned("/ 1",
3071
+ :tDIVIDE, "/", [0, 1],
3072
+ :tINTEGER, 1, [2, 3])
3073
+
3074
+ @lex.state = :expr_arg
3075
+ assert_scanned(" /1/",
3076
+ :tREGEXP_BEG, "/", [1, 2],
3077
+ :tSTRING_CONTENT, "1", [2, 3],
3078
+ :tSTRING_END, "/", [3, 4],
3079
+ :tREGEXP_OPT, "", [4, 4])
3080
+
3081
+ @lex.state = :expr_arg
3082
+ assert_scanned(" / 1",
3083
+ :tDIVIDE, "/", [1, 2],
3084
+ :tINTEGER, 1, [3, 4])
3085
+ end
3086
+
3087
+ def test_bug_expr_arg_label
3088
+ setup_lexer 19
3089
+
3090
+ @lex.state = :expr_arg
3091
+ assert_scanned(" unless:",
3092
+ :tLABEL, 'unless', [1, 8])
3093
+
3094
+ @lex.state = :expr_arg
3095
+ assert_scanned(" unless: ",
3096
+ :tLABEL, 'unless', [1, 8])
3097
+ end
3098
+
3099
+ def test_bug_heredoc_continuation
3100
+ @lex.state = :expr_arg
3101
+ assert_scanned(" <<EOS\nEOS\nend",
3102
+ :tSTRING_BEG, "<<\"", [1, 6],
3103
+ :tSTRING_END, "EOS", [7, 10],
3104
+ :tNL, nil, [6, 7],
3105
+ :kEND, "end", [11, 14])
3106
+ end
3107
+
3108
+ def test_bug_heredoc_cr_lf
3109
+ assert_scanned("<<FIN\r\nfoo\r\nFIN\r\n",
3110
+ :tSTRING_BEG, "<<\"", [0, 5],
3111
+ :tSTRING_CONTENT, "foo\n", [6, 10],
3112
+ :tSTRING_END, "FIN", [10, 13],
3113
+ :tNL, nil, [5, 6])
3114
+ end
3115
+
3116
+ def test_bug_eh_symbol_no_newline
3117
+ assert_scanned("?\"\nfoo",
3118
+ :tINTEGER, 34, [0, 2],
3119
+ :tNL, nil, [2, 3],
3120
+ :tIDENTIFIER, "foo", [3, 6])
3121
+ end
3122
+
3123
+ def test_bug_expr_arg_newline
3124
+ @lex.state = :expr_arg
3125
+ assert_scanned("\nfoo",
3126
+ :tNL, nil, [0, 1],
3127
+ :tIDENTIFIER, "foo", [1, 4])
3128
+
3129
+ @lex.state = :expr_arg
3130
+ assert_scanned(" \nfoo",
3131
+ :tNL, nil, [1, 2],
3132
+ :tIDENTIFIER, "foo", [2, 5])
3133
+
3134
+ @lex.state = :expr_arg
3135
+ assert_scanned("#foo\nfoo",
3136
+ :tNL, nil, [4, 5],
3137
+ :tIDENTIFIER, "foo", [5, 8])
3138
+ end
3139
+
3140
+ def test_bug_expr_arg_comment_newline
3141
+ @lex.state = :expr_arg
3142
+ assert_scanned(" #\nfoo",
3143
+ :tNL, nil, [2, 3],
3144
+ :tIDENTIFIER, 'foo', [3, 6])
3145
+ end
3146
+
3147
+ def test_bug_expr_arg_eh_crlf
3148
+ @lex.state = :expr_arg
3149
+ assert_scanned(" ?\r\n",
3150
+ :tEH, '?', [1, 2])
3151
+ end
3152
+
3153
+ def test_bug_heredoc_backspace_nl
3154
+ assert_scanned(" <<'XXX'\nf \\\nXXX\n",
3155
+ :tSTRING_BEG, "<<'", [1, 8],
3156
+ :tSTRING_CONTENT, "f \\\n", [9, 13],
3157
+ :tSTRING_END, "XXX", [13, 16],
3158
+ :tNL, nil, [8, 9])
3159
+ end
3160
+
3161
+ def test_bug_heredoc_lshft
3162
+ assert_scanned("<<RULES << CLEANINGS\nRULES",
3163
+ :tSTRING_BEG, '<<"', [0, 7],
3164
+ :tSTRING_END, 'RULES', [21, 26],
3165
+ :tLSHFT, '<<', [8, 10],
3166
+ :tCONSTANT, 'CLEANINGS', [11, 20])
3167
+ end
3168
+
3169
+ def test_bug_sclass_comment_lshft_label
3170
+ assert_scanned("class # foo\n<< a:b;end",
3171
+ :kCLASS, 'class', [0, 5],
3172
+ :tLSHFT, '<<', [12, 14],
3173
+ :tIDENTIFIER, 'a', [15, 16],
3174
+ :tSYMBOL, 'b', [16, 18],
3175
+ :tSEMI, ';', [18, 19],
3176
+ :kEND, 'end', [19, 22])
3177
+ end
3178
+
3179
+ def test_bug_expr_dot_comment
3180
+ assert_scanned("foo. #bar\nbaz",
3181
+ :tIDENTIFIER, 'foo', [0, 3],
3182
+ :tDOT, '.', [3, 4],
3183
+ :tIDENTIFIER, 'baz', [10, 13])
3184
+ end
3185
+
3186
+ def test_bug_expr_dot_fid
3187
+ assert_scanned("foo.S?",
3188
+ :tIDENTIFIER, 'foo', [0, 3],
3189
+ :tDOT, '.', [3, 4],
3190
+ :tFID, 'S?', [4, 6])
3191
+ end
3192
+
3193
+ def test_bug_expr_dot_id_eq
3194
+ assert_scanned("foo.x= 1",
3195
+ :tIDENTIFIER, 'foo', [0, 3],
3196
+ :tDOT, '.', [3, 4],
3197
+ :tIDENTIFIER, 'x', [4, 5],
3198
+ :tEQL, '=', [5, 6],
3199
+ :tINTEGER, 1, [7, 8])
3200
+ end
3201
+
3202
+ def test_bug_expr_dot_fid_mod
3203
+ assert_scanned("foo.x!if 1",
3204
+ :tIDENTIFIER, 'foo', [0, 3],
3205
+ :tDOT, '.', [3, 4],
3206
+ :tFID, 'x!', [4, 6],
3207
+ :kIF_MOD, 'if', [6, 8],
3208
+ :tINTEGER, 1, [9, 10])
3209
+ end
3210
+
3211
+ def test_bug_expr_mid_comment
3212
+ assert_scanned("rescue #bar\nprint",
3213
+ :kRESCUE, 'rescue', [0, 6],
3214
+ :tNL, nil, [11, 12],
3215
+ :tIDENTIFIER, 'print', [12, 17])
3216
+ end
3217
+
3218
+ def test_bug_expr_mid_bareword
3219
+ assert_scanned("begin; rescue rescue1",
3220
+ :kBEGIN, 'begin', [0, 5],
3221
+ :tSEMI, ';', [5, 6],
3222
+ :kRESCUE, 'rescue', [7, 13],
3223
+ :tIDENTIFIER, 'rescue1', [14, 21])
3224
+ end
3225
+
3226
+ def test_bug_expr_value_document
3227
+ assert_scanned("1;\n=begin\n=end",
3228
+ :tINTEGER, 1, [0, 1],
3229
+ :tSEMI, ';', [1, 2])
3230
+ end
3231
+
3232
+ def test_bug_expr_end_colon
3233
+ assert_scanned("'foo':'bar'",
3234
+ :tSTRING, 'foo', [0, 5],
3235
+ :tCOLON, ':', [5, 6],
3236
+ :tSTRING, 'bar', [6, 11])
3237
+ end
3238
+
3239
+ def test_bug_expr_value_rescue_colon2
3240
+ @lex.state = :expr_value
3241
+ assert_scanned("rescue::Exception",
3242
+ :kRESCUE, 'rescue', [0, 6],
3243
+ :tCOLON3, '::', [6, 8],
3244
+ :tCONSTANT, 'Exception', [8, 17])
3245
+ end
3246
+
3247
+ def test_bug_expr_endarg_braces
3248
+ assert_scanned("let [] {",
3249
+ :tIDENTIFIER, 'let', [0, 3],
3250
+ :tLBRACK, '[', [4, 5],
3251
+ :tRBRACK, ']', [5, 6],
3252
+ :tLBRACE_ARG, '{', [7, 8])
3253
+ end
3254
+
3255
+ def test_bug_line_begin_label
3256
+ setup_lexer(19)
3257
+ assert_scanned("foo:bar",
3258
+ :tIDENTIFIER, 'foo', [0, 3],
3259
+ :tSYMBOL, 'bar', [3, 7])
3260
+ end
3261
+
3262
+ def test_bug_interp_expr_value
3263
+ assert_scanned('"#{f:a}"',
3264
+ :tSTRING_BEG, '"', [0, 1],
3265
+ :tSTRING_DBEG, '#{', [1, 3],
3266
+ :tIDENTIFIER, 'f', [3, 4],
3267
+ :tSYMBOL, 'a', [4, 6],
3268
+ :tRCURLY, '}', [6, 7],
3269
+ :tSTRING_END, '"', [7, 8])
3270
+ end
3271
+
3272
+ def test_bug_const_e
3273
+ assert_scanned('E10',
3274
+ :tCONSTANT, 'E10', [0, 3])
3275
+ assert_scanned('E4U',
3276
+ :tCONSTANT, 'E4U', [0, 3])
3277
+ end
3278
+
3279
+ def test_bug_symbol_newline
3280
+ assert_scanned(":foo\n",
3281
+ :tSYMBOL, 'foo', [0, 4],
3282
+ :tNL, nil, [4, 5])
3283
+
3284
+ assert_scanned(":foo=\n",
3285
+ :tSYMBOL, 'foo=', [0, 5],
3286
+ :tNL, nil, [5, 6])
3287
+ end
3288
+
3289
+ def test_bug_interleaved_heredoc
3290
+ assert_scanned(%Q{<<w; "\nfoo\nw\n"},
3291
+ :tSTRING_BEG, '<<"', [0, 3],
3292
+ :tSTRING_CONTENT, "foo\n", [7, 11],
3293
+ :tSTRING_END, 'w', [11, 12],
3294
+ :tSEMI, ';', [3, 4],
3295
+ :tSTRING_BEG, '"', [5, 6],
3296
+ :tSTRING_CONTENT, "\n", [6, 7],
3297
+ :tSTRING_END, '"', [13, 14])
3298
+
3299
+ @lex.state = :expr_beg
3300
+ assert_scanned(%Q{<<w; %w[\nfoo\nw\n1]},
3301
+ :tSTRING_BEG, '<<"', [0, 3],
3302
+ :tSTRING_CONTENT, "foo\n", [9, 13],
3303
+ :tSTRING_END, 'w', [13, 14],
3304
+ :tSEMI, ';', [3, 4],
3305
+ :tQWORDS_BEG, '%w[', [5, 8],
3306
+ :tSTRING_CONTENT, "1", [15, 16],
3307
+ :tSPACE, nil, [16, 16],
3308
+ :tSTRING_END, ']', [16, 17])
3309
+
3310
+ @lex.state = :expr_beg
3311
+ assert_scanned(%Q{<<w; "\#{\nfoo\nw\n}"},
3312
+ :tSTRING_BEG, '<<"', [0, 3],
3313
+ :tSTRING_CONTENT, "foo\n", [9, 13],
3314
+ :tSTRING_END, 'w', [13, 14],
3315
+ :tSEMI, ';', [3, 4],
3316
+ :tSTRING_BEG, '"', [5, 6],
3317
+ :tSTRING_DBEG, '#{', [6, 8],
3318
+ :tRCURLY, '}', [15, 16],
3319
+ :tSTRING_END, '"', [16, 17])
3320
+ end
3321
+
3322
+ def test_bug_fid_char
3323
+ setup_lexer(19)
3324
+ assert_scanned('eof??a',
3325
+ :tFID, 'eof?', [0, 4],
3326
+ :tCHARACTER, 'a', [4, 6])
3327
+ end
3328
+
3329
+ def test_bug_nonlabel_context__18
3330
+ env = Parser::StaticEnvironment.new
3331
+ env.declare "a"
3332
+
3333
+ @lex.static_env = env
3334
+ assert_scanned("1+a:a",
3335
+ :tINTEGER, 1, [0, 1],
3336
+ :tPLUS, '+', [1, 2],
3337
+ :tIDENTIFIER, 'a', [2, 3],
3338
+ :tCOLON, ':', [3, 4],
3339
+ :tIDENTIFIER, 'a', [4, 5])
3340
+ end
3341
+
3342
+ def test_bug_string_percent_newline
3343
+ assert_scanned(%Q{%\nfoo\n},
3344
+ :tSTRING_BEG, "%\n", [0, 2],
3345
+ :tSTRING_CONTENT, 'foo', [2, 5],
3346
+ :tSTRING_END, "\n", [5, 6])
3347
+ end
3348
+
3349
+ def test_bug_string_percent_zero
3350
+ assert_scanned(%Q{%\0foo\0},
3351
+ :tSTRING_BEG, "%\0", [0, 2],
3352
+ :tSTRING_CONTENT, 'foo', [2, 5],
3353
+ :tSTRING_END, "\0", [5, 6])
3354
+ end
3355
+
3356
+ def test_bug_string_utf_escape_composition
3357
+ assert_scanned(%q{"\xE2\x80\x99"},
3358
+ :tSTRING, "\xE2\x80\x99", [0, 14])
3359
+
3360
+ assert_scanned(utf(%q{"\xE2\x80\x99"}),
3361
+ :tSTRING, utf('’'), [0, 14])
3362
+ assert_scanned(utf(%q{"\342\200\231"}),
3363
+ :tSTRING, utf('’'), [0, 14])
3364
+ assert_scanned(utf(%q{"\M-b\C-\M-@\C-\M-Y"}),
3365
+ :tSTRING, utf('’'), [0, 20])
3366
+ end
3367
+
3368
+ def test_bug_string_utf_escape_noop
3369
+ assert_scanned(utf(%q{"\あ"}),
3370
+ :tSTRING, utf("あ"), [0, 4])
3371
+ end
3372
+
3373
+ def test_bug_string_non_utf
3374
+ assert_scanned(%Q{"caf\xE9"},
3375
+ :tSTRING, "caf\xE9", [0, 6])
3376
+ assert_scanned(%Q{"caf\xC3\xA9"},
3377
+ :tSTRING, "caf\xC3\xA9", [0, 7])
3378
+
3379
+ assert_scanned(utf(%q{"café"}),
3380
+ :tSTRING, utf("café"), [0, 6])
3381
+ end
3382
+
3383
+ def test_bug_semi__END__
3384
+ assert_scanned(%Q{foo;\n__END__},
3385
+ :tIDENTIFIER, 'foo', [0, 3],
3386
+ :tSEMI, ';', [3, 4])
3387
+ end
3388
+
3389
+ def test_bug_eql_end
3390
+ assert_scanned(%Q{=begin\n#=end\n=end})
3391
+ end
3392
+
3393
+ def test_bug_hidden_eof
3394
+ @lex.state = :expr_beg
3395
+ assert_scanned(%Q{"foo\0\x1a\x04bar"},
3396
+ :tSTRING_BEG, '"', [0, 1],
3397
+ :tSTRING_CONTENT, "foo\0", [1, 5],
3398
+ :tSTRING_CONTENT, "\x1a", [5, 6],
3399
+ :tSTRING_CONTENT, "\x04", [6, 7],
3400
+ :tSTRING_CONTENT, "bar", [7, 10],
3401
+ :tSTRING_END, '"', [10, 11])
3402
+
3403
+ @lex.state = :expr_beg
3404
+ assert_scanned(%Q{'foo\0\x1a\x04bar'},
3405
+ :tSTRING_BEG, "'", [0, 1],
3406
+ :tSTRING_CONTENT, "foo\0", [1, 5],
3407
+ :tSTRING_CONTENT, "\x1a", [5, 6],
3408
+ :tSTRING_CONTENT, "\x04", [6, 7],
3409
+ :tSTRING_CONTENT, "bar", [7, 10],
3410
+ :tSTRING_END, "'", [10, 11])
3411
+
3412
+ @lex.state = :expr_beg
3413
+ assert_scanned(%Q{%w[foo\0\x1a\x04bar]},
3414
+ :tQWORDS_BEG, '%w[', [0, 3],
3415
+ :tSTRING_CONTENT, "foo\0", [3, 7],
3416
+ :tSTRING_CONTENT, "\x1a", [7, 8],
3417
+ :tSTRING_CONTENT, "\x04", [8, 9],
3418
+ :tSTRING_CONTENT, "bar", [9, 12],
3419
+ :tSPACE, nil, [12, 12],
3420
+ :tSTRING_END, ']', [12, 13])
3421
+
3422
+ @lex.state = :expr_beg
3423
+ assert_scanned(%Q{%W[foo\0\x1a\x04bar]},
3424
+ :tWORDS_BEG, '%W[', [0, 3],
3425
+ :tSTRING_CONTENT, "foo\0", [3, 7],
3426
+ :tSTRING_CONTENT, "\x1a", [7, 8],
3427
+ :tSTRING_CONTENT, "\x04", [8, 9],
3428
+ :tSTRING_CONTENT, "bar", [9, 12],
3429
+ :tSPACE, nil, [12, 12],
3430
+ :tSTRING_END, ']', [12, 13])
3431
+
3432
+ @lex.state = :expr_beg
3433
+ assert_scanned(%Q{# foo\0\nbar},
3434
+ :tIDENTIFIER, 'bar', [7, 10])
3435
+
3436
+ @lex.state = :line_begin
3437
+ assert_scanned(%Q{=begin\n\0\n=end\nbar},
3438
+ :tIDENTIFIER, 'bar', [14, 17])
3439
+ end
3440
+
3441
+ def test_bug_num_adj_kw
3442
+ assert_scanned('1if',
3443
+ :tINTEGER, 1, [0, 1],
3444
+ :kIF_MOD, 'if', [1, 3])
3445
+
3446
+ assert_scanned('1.0if',
3447
+ :tFLOAT, 1.0, [0, 3],
3448
+ :kIF_MOD, 'if', [3, 5])
3449
+ end
3450
+
3451
+ def test_bug_unicode_in_literal
3452
+ setup_lexer(19)
3453
+ assert_scanned('"\u00a4"',
3454
+ :tSTRING, "\u00a4", [0, 8])
3455
+ end
3456
+
3457
+ def test_bug_utf32le_leak
3458
+ setup_lexer(19)
3459
+ @lex.force_utf32 = true
3460
+ assert_scanned('"F0"',
3461
+ :tSTRING, "F0", [0, 4])
3462
+ end
3463
+
3464
+ def test_bug_ragel_stack
3465
+ assert_scanned("\"\#{$2 ? $2 : 1}\"",
3466
+ :tSTRING_BEG, "\"", [0, 1],
3467
+ :tSTRING_DBEG, "\#{", [1, 3],
3468
+ :tNTH_REF, 2, [3, 5],
3469
+ :tEH, "?", [6, 7],
3470
+ :tNTH_REF, 2, [8, 10],
3471
+ :tCOLON, ":", [11, 12],
3472
+ :tINTEGER, 1, [13, 14],
3473
+ :tRCURLY, "}", [14, 15],
3474
+ :tSTRING_END, "\"", [15, 16])
3475
+ end
3476
+
3477
+ def test_bug_423
3478
+ @lex.state = :expr_beg
3479
+ assert_scanned(':&&',
3480
+ :tSYMBEG, ':', [0, 1],
3481
+ :tANDOP, '&&', [1, 3])
3482
+
3483
+ @lex.state = :expr_beg
3484
+ assert_scanned(':||',
3485
+ :tSYMBEG, ':', [0, 1],
3486
+ :tOROP, '||', [1, 3])
3487
+ end
3488
+
3489
+ def test_bug_418
3490
+ setup_lexer 19
3491
+
3492
+ assert_scanned("{\n=begin\nx: 1,\n=end\ny: 2}",
3493
+ :tLBRACE, '{', [0, 1],
3494
+ :tLABEL, 'y', [20, 22],
3495
+ :tINTEGER, 2, [23, 24],
3496
+ :tRCURLY, '}', [24, 25])
3497
+ end
3498
+
3499
+ def test_bug_407
3500
+ setup_lexer(21)
3501
+
3502
+ assert_scanned('123if cond',
3503
+ :tINTEGER, 123, [0, 3],
3504
+ :kIF_MOD, 'if', [3, 5],
3505
+ :tIDENTIFIER, 'cond', [6, 10])
3506
+
3507
+ assert_scanned('1.23if cond',
3508
+ :tFLOAT, 1.23, [0, 4],
3509
+ :kIF_MOD, 'if', [4, 6],
3510
+ :tIDENTIFIER, 'cond', [7, 11])
3511
+
3512
+ assert_scanned('123rescue cond',
3513
+ :tINTEGER, 123, [0, 3],
3514
+ :kRESCUE_MOD, 'rescue', [3, 9],
3515
+ :tIDENTIFIER, 'cond', [10, 14])
3516
+
3517
+ assert_scanned('1.23rescue cond',
3518
+ :tFLOAT, 1.23, [0, 4],
3519
+ :kRESCUE_MOD, 'rescue', [4, 10],
3520
+ :tIDENTIFIER, 'cond', [11, 15])
3521
+ end
3522
+
3523
+ def test_parser_bug_486
3524
+ setup_lexer(19)
3525
+ assert_scanned(':!@',
3526
+ :tSYMBOL, '!', [0, 3])
3527
+
3528
+ setup_lexer(19)
3529
+ assert_scanned(':~@',
3530
+ :tSYMBOL, '~', [0, 3])
3531
+ end
3532
+
3533
+ def test_slash_only_in_heredocs
3534
+ setup_lexer(23)
3535
+ refute_scanned(%Q{<<~E\n\\\nE})
3536
+
3537
+ setup_lexer(23)
3538
+ refute_scanned(%Q{<<-E\n\\\nE})
3539
+ end
3540
+
3541
+ def test_escapes_in_squiggly_heredoc
3542
+ setup_lexer(23)
3543
+
3544
+ assert_scanned(%Q{<<~E\n\a\b\e\f\r\t\\\v\nE},
3545
+ :tSTRING_BEG, '<<"', [0, 4],
3546
+ :tSTRING_CONTENT, "\a\b\e\f\r\t\v\n", [5, 14],
3547
+ :tSTRING_END, 'E', [14, 15],
3548
+ :tNL, nil, [4, 5])
3549
+
3550
+ setup_lexer(23)
3551
+
3552
+ assert_scanned(%Q{<<-E\n\a\b\e\f\r\t\\\v\nE},
3553
+ :tSTRING_BEG, '<<"', [0, 4],
3554
+ :tSTRING_CONTENT, "\a\b\e\f\r\t\v\n", [5, 14],
3555
+ :tSTRING_END, 'E', [14, 15],
3556
+ :tNL, nil, [4, 5])
3557
+ end
3558
+
3559
+ def test_ambiguous_integer_re
3560
+ assert_scanned('1re',
3561
+ :tINTEGER, 1, [0, 1],
3562
+ :tIDENTIFIER, 're', [1, 3])
3563
+ end
3564
+
3565
+ def test_meth_ref
3566
+ setup_lexer(27)
3567
+
3568
+ assert_scanned('foo.:bar',
3569
+ :tIDENTIFIER, 'foo', [0, 3],
3570
+ :tMETHREF, '.:', [3, 5],
3571
+ :tIDENTIFIER, 'bar', [5, 8])
3572
+
3573
+ assert_scanned('foo .:bar',
3574
+ :tIDENTIFIER, 'foo', [0, 3],
3575
+ :tMETHREF, '.:', [4, 6],
3576
+ :tIDENTIFIER, 'bar', [6, 9])
3577
+ end
3578
+
3579
+ def test_meth_ref_unary_op
3580
+ setup_lexer(27)
3581
+
3582
+ assert_scanned('foo.:+',
3583
+ :tIDENTIFIER, 'foo', [0, 3],
3584
+ :tMETHREF, '.:', [3, 5],
3585
+ :tPLUS, '+', [5, 6])
3586
+
3587
+ assert_scanned('foo.:-@',
3588
+ :tIDENTIFIER, 'foo', [0, 3],
3589
+ :tMETHREF, '.:', [3, 5],
3590
+ :tUMINUS, '-@', [5, 7])
3591
+ end
3592
+
3593
+ def test_meth_ref_unsupported_newlines
3594
+ # MRI emits exactly the same sequence of tokens,
3595
+ # the error happens later in the parser
3596
+
3597
+ assert_scanned('foo. :+',
3598
+ :tIDENTIFIER, 'foo', [0, 3],
3599
+ :tDOT, '.', [3, 4],
3600
+ :tCOLON, ':', [5, 6],
3601
+ :tUPLUS, '+', [6, 7])
3602
+
3603
+ assert_scanned('foo.: +',
3604
+ :tIDENTIFIER, 'foo', [0, 3],
3605
+ :tDOT, '.', [3, 4],
3606
+ :tCOLON, ':', [4, 5],
3607
+ :tPLUS, '+', [6, 7])
3608
+ end
3609
+
3610
+ def lex_numbered_parameter(input)
3611
+ @lex.max_numparam_stack.push
3612
+
3613
+ @lex.context = Parser::Context.new
3614
+ @lex.context.push(:block)
3615
+
3616
+ source_buffer = Parser::Source::Buffer.new('(assert_lex_numbered_parameter)')
3617
+ source_buffer.source = input
3618
+
3619
+ @lex.source_buffer = source_buffer
3620
+
3621
+ @lex.advance
3622
+ end
3623
+
3624
+ def assert_scanned_numbered_parameter(input)
3625
+ lex_token, (lex_value, lex_range) = lex_numbered_parameter(input)
3626
+
3627
+ assert_equal(lex_token, :tNUMPARAM)
3628
+ assert_equal(lex_value, input.tr('@', ''))
3629
+ assert_equal(lex_range.begin_pos, 0)
3630
+ assert_equal(lex_range.end_pos, input.length)
3631
+ end
3632
+
3633
+ def refute_scanned_numbered_parameter(input, message = nil)
3634
+ err = assert_raises Parser::SyntaxError do
3635
+ lex_token, (lex_value, lex_range) = lex_numbered_parameter(input)
3636
+ end
3637
+
3638
+ if message
3639
+ assert_equal(err.message, Parser::MESSAGES[message])
3640
+
3641
+ assert_equal(err.diagnostic.location.begin_pos, 0)
3642
+ assert_equal(err.diagnostic.location.end_pos, input.length)
3643
+ end
3644
+ end
3645
+
3646
+ def test_numbered_args_before_27
3647
+ setup_lexer(26)
3648
+ refute_scanned_numbered_parameter('@1')
3649
+ end
3650
+
3651
+ def test_numbered_args_27
3652
+ setup_lexer(27)
3653
+ assert_scanned_numbered_parameter('@1')
3654
+ assert_equal(@lex.max_numparam, 1)
3655
+
3656
+ setup_lexer(27)
3657
+ assert_scanned_numbered_parameter('@9')
3658
+ assert_equal(@lex.max_numparam, 9)
3659
+
3660
+ setup_lexer(27)
3661
+ refute_scanned_numbered_parameter('@10', :too_large_numparam)
3662
+
3663
+ setup_lexer(27)
3664
+ refute_scanned_numbered_parameter('@01', :leading_zero_in_numparam)
3665
+ end
3666
+
3667
+ end