brakeman 4.7.2 → 5.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (505) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +155 -1
  3. data/README.md +23 -6
  4. data/bundle/load.rb +15 -13
  5. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
  6. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
  7. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/README.txt +0 -0
  8. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
  9. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
  10. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
  11. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
  12. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
  13. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
  14. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
  15. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
  16. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
  17. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
  18. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
  19. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
  20. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
  21. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
  22. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
  23. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
  24. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
  25. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
  26. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
  27. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
  28. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
  29. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
  30. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
  31. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
  32. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
  33. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
  34. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
  35. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
  36. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
  37. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/setup.rb +0 -0
  38. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/CHANGELOG.md +24 -0
  39. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/FAQ.md +0 -0
  40. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/Gemfile +1 -4
  41. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/MIT-LICENSE +0 -0
  42. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/README.md +21 -16
  43. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/REFERENCE.md +39 -10
  44. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/TODO +0 -0
  45. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/haml.gemspec +2 -1
  46. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_builder.rb +58 -3
  47. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_compiler.rb +45 -32
  48. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_parser.rb +0 -0
  49. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/buffer.rb +0 -56
  50. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/compiler.rb +0 -0
  51. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/engine.rb +0 -0
  52. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/error.rb +0 -0
  53. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +77 -0
  54. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/exec.rb +0 -0
  55. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/filters.rb +0 -0
  56. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/generator.rb +0 -0
  57. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_extensions.rb +0 -0
  58. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_mods.rb +0 -0
  59. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_xss_mods.rb +0 -0
  60. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubi_template.rb +0 -0
  61. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubis_template.rb +0 -0
  62. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/xss_mods.rb +6 -3
  63. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers.rb +7 -1
  64. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/options.rb +0 -0
  65. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/parser.rb +32 -4
  66. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/plugin.rb +18 -1
  67. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/railtie.rb +5 -0
  68. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/sass_rails_filter.rb +0 -0
  69. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/template/options.rb +0 -0
  70. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/template.rb +0 -0
  71. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/temple_engine.rb +2 -1
  72. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/temple_line_counter.rb +0 -0
  73. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/util.rb +1 -1
  74. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/version.rb +1 -1
  75. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml.rb +0 -0
  76. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/yard/default/fulldoc/html/css/common.sass +0 -0
  77. data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/yard/default/layout/html/footer.erb +0 -0
  78. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/AUTHORS +0 -0
  79. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/COPYING +0 -0
  80. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/Changelog.md +0 -0
  81. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/Gemfile +0 -0
  82. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/LICENSE +0 -0
  83. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/README.md +0 -0
  84. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/TODO +0 -0
  85. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/appveyor.yml +0 -0
  86. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/highline.gemspec +0 -0
  87. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/builtin_styles.rb +0 -0
  88. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/color_scheme.rb +0 -0
  89. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/compatibility.rb +0 -0
  90. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/custom_errors.rb +0 -0
  91. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/import.rb +0 -0
  92. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/io_console_compatible.rb +0 -0
  93. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/list.rb +0 -0
  94. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/list_renderer.rb +0 -0
  95. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/menu/item.rb +0 -0
  96. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/menu.rb +0 -0
  97. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/paginator.rb +0 -0
  98. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question/answer_converter.rb +0 -0
  99. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question.rb +0 -0
  100. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question_asker.rb +0 -0
  101. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/simulate.rb +0 -0
  102. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/statement.rb +0 -0
  103. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/string.rb +0 -0
  104. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/string_extensions.rb +0 -0
  105. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/style.rb +0 -0
  106. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/template_renderer.rb +0 -0
  107. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/io_console.rb +0 -0
  108. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/ncurses.rb +0 -0
  109. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb +0 -0
  110. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal.rb +0 -0
  111. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/version.rb +0 -0
  112. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/wrapper.rb +0 -0
  113. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline.rb +0 -0
  114. data/bundle/ruby/2.7.0/gems/parallel-1.21.0/MIT-LICENSE.txt +20 -0
  115. data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/processor_count.rb +45 -0
  116. data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/version.rb +4 -0
  117. data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel.rb +532 -0
  118. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
  119. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +178 -0
  120. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +48 -0
  121. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
  122. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
  123. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
  124. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
  125. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
  126. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
  127. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
  128. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
  129. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
  130. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
  131. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
  132. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
  133. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
  134. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
  135. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
  136. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
  137. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
  138. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
  139. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
  140. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
  141. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
  142. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
  143. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
  144. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
  145. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
  146. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
  147. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
  148. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
  149. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
  150. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
  151. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
  152. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
  153. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
  154. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
  155. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
  156. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
  157. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
  158. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
  159. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
  160. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
  161. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
  162. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
  163. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
  164. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
  165. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
  166. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
  167. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
  168. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
  169. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
  170. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
  171. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/History.rdoc +0 -0
  172. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/Manifest.txt +0 -0
  173. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/README.rdoc +0 -0
  174. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -0
  175. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/History.rdoc +154 -0
  176. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/Manifest.txt +7 -0
  177. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/README.rdoc +1 -0
  178. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/compare/normalize.rb +51 -6
  179. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/debugging.md +190 -0
  180. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/gauntlet.md +106 -0
  181. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/rp_extensions.rb +15 -36
  182. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/rp_stringscanner.rb +33 -0
  183. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby20_parser.rb +7128 -0
  184. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby20_parser.y +422 -301
  185. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby21_parser.rb +7182 -0
  186. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby21_parser.y +417 -298
  187. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby22_parser.rb +7228 -0
  188. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby22_parser.y +421 -300
  189. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby23_parser.rb +7237 -0
  190. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby23_parser.y +421 -300
  191. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby24_parser.rb +7268 -0
  192. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby24_parser.y +421 -300
  193. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.rb +7268 -0
  194. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby26_parser.y → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.y} +420 -313
  195. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.rb +7287 -0
  196. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby_parser.yy → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.y} +421 -404
  197. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.rb +8517 -0
  198. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby25_parser.y → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.y} +1032 -299
  199. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.rb +8751 -0
  200. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.y +3472 -0
  201. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby3_parser.yy +3476 -0
  202. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rb +308 -605
  203. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rex +33 -27
  204. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rex.rb +65 -31
  205. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_lexer_strings.rb +638 -0
  206. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser.rb +4 -0
  207. data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_parser.yy +3487 -0
  208. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser_extras.rb +341 -133
  209. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/tools/munge.rb +43 -10
  210. data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/tools/ripper.rb +15 -10
  211. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -0
  212. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -0
  213. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -0
  214. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -0
  215. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -0
  216. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -0
  217. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -0
  218. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -0
  219. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -0
  220. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -0
  221. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -0
  222. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -0
  223. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -0
  224. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/CHANGES.md +0 -0
  225. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/Gemfile +0 -0
  226. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/LICENSE.txt +0 -0
  227. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/README.md +0 -0
  228. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -0
  229. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -0
  230. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -0
  231. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -0
  232. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -0
  233. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -0
  234. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -0
  235. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -0
  236. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -0
  237. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -0
  238. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
  239. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -0
  240. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -0
  241. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
  242. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -0
  243. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -0
  244. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -0
  245. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -0
  246. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -0
  247. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -0
  248. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -0
  249. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -0
  250. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -0
  251. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -0
  252. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -0
  253. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -0
  254. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -0
  255. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/History.rdoc +55 -0
  256. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/Manifest.txt +0 -0
  257. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/README.rdoc +0 -0
  258. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/composite_sexp_processor.rb +0 -0
  259. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/pt_testcase.rb +9 -4
  260. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp.rb +19 -9
  261. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp_matcher.rb +44 -7
  262. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp_processor.rb +1 -1
  263. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/strict_sexp.rb +25 -3
  264. data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/unique.rb +0 -0
  265. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/CHANGES +4 -0
  266. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/Gemfile +12 -13
  267. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/LICENSE +0 -0
  268. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.jp.md +0 -0
  269. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.md +0 -0
  270. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/code_attributes.rb +0 -0
  271. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/command.rb +13 -13
  272. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/controls.rb +0 -0
  273. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/do_inserter.rb +0 -0
  274. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/embedded.rb +0 -0
  275. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/end_inserter.rb +0 -0
  276. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/engine.rb +0 -0
  277. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/erb_converter.rb +0 -0
  278. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/filter.rb +0 -0
  279. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/grammar.rb +0 -0
  280. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/include.rb +0 -0
  281. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/interpolation.rb +0 -0
  282. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/context.rb +0 -0
  283. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/filter.rb +0 -0
  284. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less.rb +0 -0
  285. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/parser.rb +1 -1
  286. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/escaper.rb +0 -0
  287. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/filter.rb +0 -0
  288. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/parser.rb +0 -0
  289. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart.rb +0 -0
  290. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/builder.rb +0 -0
  291. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/filter.rb +0 -0
  292. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/template.rb +0 -0
  293. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/translator.rb +0 -0
  294. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/version.rb +1 -1
  295. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim.rb +0 -0
  296. data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/slim.gemspec +0 -0
  297. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/CHANGES +0 -0
  298. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/EXPRESSIONS.md +0 -0
  299. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/Gemfile +0 -0
  300. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/LICENSE +0 -0
  301. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/README.md +0 -0
  302. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/engine.rb +0 -0
  303. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -0
  304. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -0
  305. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -0
  306. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -0
  307. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -0
  308. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filter.rb +0 -0
  309. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -0
  310. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -0
  311. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -0
  312. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -0
  313. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -0
  314. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -0
  315. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -0
  316. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -0
  317. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -0
  318. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -0
  319. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -0
  320. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -0
  321. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generator.rb +0 -0
  322. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -0
  323. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -0
  324. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -0
  325. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -0
  326. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -0
  327. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/grammar.rb +0 -0
  328. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -0
  329. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -0
  330. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -0
  331. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -0
  332. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -0
  333. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -0
  334. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -0
  335. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -0
  336. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/map.rb +0 -0
  337. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -0
  338. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -0
  339. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -0
  340. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -0
  341. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -0
  342. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/parser.rb +0 -0
  343. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -0
  344. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -0
  345. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -0
  346. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates.rb +0 -0
  347. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/utils.rb +0 -0
  348. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/version.rb +0 -0
  349. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple.rb +0 -0
  350. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/temple.gemspec +0 -0
  351. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Gemfile +0 -0
  352. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/History.rdoc +0 -0
  353. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/LICENSE.txt +0 -0
  354. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Manifest +0 -0
  355. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/README.rdoc +0 -0
  356. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Todo.rdoc +0 -0
  357. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -0
  358. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +0 -0
  359. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -0
  360. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -0
  361. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -0
  362. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -0
  363. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +0 -0
  364. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -0
  365. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -0
  366. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -0
  367. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/COPYING +0 -0
  368. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -0
  369. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -0
  370. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -0
  371. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -0
  372. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -0
  373. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -0
  374. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -0
  375. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/csv.rb +0 -0
  376. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -0
  377. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erb.rb +0 -0
  378. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -0
  379. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -0
  380. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/etanni.rb +0 -0
  381. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -0
  382. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -0
  383. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/less.rb +0 -0
  384. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/liquid.rb +0 -0
  385. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -0
  386. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/mapping.rb +0 -0
  387. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/markaby.rb +0 -0
  388. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -0
  389. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +0 -0
  390. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -0
  391. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -0
  392. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -0
  393. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -0
  394. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -0
  395. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -0
  396. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -0
  397. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -0
  398. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -0
  399. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -0
  400. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -0
  401. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/string.rb +0 -0
  402. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/template.rb +0 -0
  403. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -0
  404. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -0
  405. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/yajl.rb +0 -0
  406. data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt.rb +0 -0
  407. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/CHANGELOG.md +12 -0
  408. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/MIT-LICENSE.txt +1 -1
  409. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/README.md +3 -3
  410. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  411. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/constants.rb +2 -2
  412. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/index.rb +0 -0
  413. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
  414. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/string_ext.rb +0 -0
  415. data/bundle/ruby/{2.6.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width.rb +1 -1
  416. data/lib/brakeman/app_tree.rb +37 -4
  417. data/lib/brakeman/checks/base_check.rb +30 -11
  418. data/lib/brakeman/checks/check_basic_auth.rb +2 -0
  419. data/lib/brakeman/checks/check_content_tag.rb +1 -2
  420. data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +28 -0
  421. data/lib/brakeman/checks/check_deserialize.rb +21 -1
  422. data/lib/brakeman/checks/check_detailed_exceptions.rb +1 -1
  423. data/lib/brakeman/checks/check_eol_rails.rb +23 -0
  424. data/lib/brakeman/checks/check_eol_ruby.rb +26 -0
  425. data/lib/brakeman/checks/check_evaluation.rb +1 -1
  426. data/lib/brakeman/checks/check_execute.rb +52 -6
  427. data/lib/brakeman/checks/check_json_entity_escape.rb +38 -0
  428. data/lib/brakeman/checks/check_json_parsing.rb +1 -1
  429. data/lib/brakeman/checks/check_link_to.rb +1 -1
  430. data/lib/brakeman/checks/check_link_to_href.rb +1 -3
  431. data/lib/brakeman/checks/check_mass_assignment.rb +37 -9
  432. data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -1
  433. data/lib/brakeman/checks/check_model_attributes.rb +1 -1
  434. data/lib/brakeman/checks/check_page_caching_cve.rb +37 -0
  435. data/lib/brakeman/checks/check_permit_attributes.rb +1 -1
  436. data/lib/brakeman/checks/check_regex_dos.rb +1 -1
  437. data/lib/brakeman/checks/check_render.rb +15 -1
  438. data/lib/brakeman/checks/check_sanitize_methods.rb +2 -1
  439. data/lib/brakeman/checks/check_skip_before_filter.rb +4 -4
  440. data/lib/brakeman/checks/check_sql.rb +60 -20
  441. data/lib/brakeman/checks/check_symbol_dos.rb +1 -1
  442. data/lib/brakeman/checks/check_template_injection.rb +32 -0
  443. data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +68 -0
  444. data/lib/brakeman/checks/check_verb_confusion.rb +75 -0
  445. data/lib/brakeman/checks/eol_check.rb +47 -0
  446. data/lib/brakeman/commandline.rb +25 -1
  447. data/lib/brakeman/differ.rb +0 -5
  448. data/lib/brakeman/file_parser.rb +58 -22
  449. data/lib/brakeman/options.rb +39 -2
  450. data/lib/brakeman/parsers/template_parser.rb +26 -3
  451. data/lib/brakeman/processors/alias_processor.rb +132 -24
  452. data/lib/brakeman/processors/base_processor.rb +4 -4
  453. data/lib/brakeman/processors/controller_alias_processor.rb +6 -43
  454. data/lib/brakeman/processors/controller_processor.rb +1 -1
  455. data/lib/brakeman/processors/gem_processor.rb +3 -0
  456. data/lib/brakeman/processors/haml_template_processor.rb +17 -1
  457. data/lib/brakeman/processors/lib/call_conversion_helper.rb +13 -7
  458. data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
  459. data/lib/brakeman/processors/lib/find_all_calls.rb +30 -14
  460. data/lib/brakeman/processors/lib/rails3_config_processor.rb +16 -16
  461. data/lib/brakeman/processors/lib/rails3_route_processor.rb +2 -0
  462. data/lib/brakeman/processors/lib/rails4_config_processor.rb +2 -1
  463. data/lib/brakeman/processors/lib/render_helper.rb +3 -1
  464. data/lib/brakeman/processors/library_processor.rb +9 -0
  465. data/lib/brakeman/processors/model_processor.rb +32 -0
  466. data/lib/brakeman/processors/output_processor.rb +1 -1
  467. data/lib/brakeman/processors/template_alias_processor.rb +5 -0
  468. data/lib/brakeman/report/ignore/config.rb +10 -2
  469. data/lib/brakeman/report/ignore/interactive.rb +1 -1
  470. data/lib/brakeman/report/report_base.rb +0 -2
  471. data/lib/brakeman/report/report_csv.rb +37 -60
  472. data/lib/brakeman/report/report_github.rb +31 -0
  473. data/lib/brakeman/report/report_junit.rb +104 -0
  474. data/lib/brakeman/report/report_markdown.rb +0 -1
  475. data/lib/brakeman/report/report_sarif.rb +133 -0
  476. data/lib/brakeman/report/report_sonar.rb +38 -0
  477. data/lib/brakeman/report/report_tabs.rb +1 -1
  478. data/lib/brakeman/report/report_text.rb +38 -17
  479. data/lib/brakeman/report.rb +22 -1
  480. data/lib/brakeman/rescanner.rb +7 -5
  481. data/lib/brakeman/scanner.rb +65 -31
  482. data/lib/brakeman/tracker/collection.rb +57 -7
  483. data/lib/brakeman/tracker/config.rb +88 -5
  484. data/lib/brakeman/tracker/constants.rb +8 -7
  485. data/lib/brakeman/tracker/controller.rb +1 -1
  486. data/lib/brakeman/tracker/method_info.rb +70 -0
  487. data/lib/brakeman/tracker.rb +42 -5
  488. data/lib/brakeman/util.rb +58 -21
  489. data/lib/brakeman/version.rb +1 -1
  490. data/lib/brakeman/warning.rb +10 -2
  491. data/lib/brakeman/warning_codes.rb +13 -0
  492. data/lib/brakeman.rb +49 -6
  493. data/lib/ruby_parser/bm_sexp.rb +33 -9
  494. metadata +430 -351
  495. data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/escapable.rb +0 -50
  496. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/debugging.md +0 -18
  497. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/rp_stringscanner.rb +0 -64
  498. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby20_parser.rb +0 -7045
  499. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby21_parser.rb +0 -7116
  500. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby22_parser.rb +0 -7149
  501. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby23_parser.rb +0 -7166
  502. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby24_parser.rb +0 -7178
  503. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby25_parser.rb +0 -7178
  504. data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby26_parser.rb +0 -7198
  505. data/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/data/display_width.marshal.gz +0 -0
@@ -1,4 +1,6 @@
1
1
  # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
3
+ # TODO: remove encoding comment
2
4
 
3
5
  require "sexp"
4
6
  require "ruby_lexer"
@@ -28,7 +30,7 @@ class Sexp
28
30
  end
29
31
 
30
32
  module RubyParserStuff
31
- VERSION = "3.14.1"
33
+ VERSION = "3.18.1"
32
34
 
33
35
  attr_accessor :lexer, :in_def, :in_single, :file
34
36
  attr_accessor :in_kwarg
@@ -45,6 +47,11 @@ module RubyParserStuff
45
47
 
46
48
  attr_accessor :canonicalize_conditions
47
49
 
50
+ ##
51
+ # The last token type returned from #next_token
52
+
53
+ attr_accessor :last_token_type
54
+
48
55
  $good20 = []
49
56
 
50
57
  %w[
@@ -109,7 +116,7 @@ module RubyParserStuff
109
116
  def initialize(options = {})
110
117
  super()
111
118
 
112
- v = self.class.name[/2\d/]
119
+ v = self.class.name[/[23]\d/]
113
120
  raise "Bad Class name #{self.class}" unless v
114
121
 
115
122
  self.lexer = RubyLexer.new v && v.to_i
@@ -124,12 +131,6 @@ module RubyParserStuff
124
131
  self.reset
125
132
  end
126
133
 
127
- def arg_blk_pass node1, node2 # TODO: nuke
128
- node1 = s(:arglist, node1) unless ARG_TYPES[node1.sexp_type]
129
- node1 << node2 if node2
130
- node1
131
- end
132
-
133
134
  def arg_concat node1, node2 # TODO: nuke
134
135
  raise "huh" unless node2
135
136
 
@@ -155,11 +156,31 @@ module RubyParserStuff
155
156
  end
156
157
 
157
158
  args.each do |arg|
159
+ if arg.instance_of? Array and arg.size == 2 and arg.last.is_a? Numeric then
160
+ arg = arg.first
161
+ end
162
+
158
163
  case arg
159
164
  when Sexp then
160
165
  case arg.sexp_type
161
166
  when :args, :block, :array, :call_args then # HACK call_args mismatch
162
- result.concat arg.sexp_body
167
+ rest = arg.sexp_body
168
+
169
+ rest.map! { |x|
170
+ if x.instance_of? Array and x.size == 2 and Numeric === x.last then
171
+ x.first
172
+ else
173
+ x
174
+ end
175
+ }
176
+
177
+ result.concat rest
178
+ when :forward_args then
179
+ self.env[:*] = :lvar # TODO: arg_var(p, idFWD_REST) ?
180
+ self.env[:**] = :lvar
181
+ self.env[:&] = :lvar
182
+
183
+ result << arg
163
184
  when :block_arg then
164
185
  result << :"&#{arg.last}"
165
186
  when :shadow then
@@ -179,6 +200,8 @@ module RubyParserStuff
179
200
  name = arg.to_s.delete("&*")
180
201
  self.env[name.to_sym] = :lvar unless name.empty?
181
202
  result << arg
203
+ when true, false then
204
+ self.in_kwarg = arg
182
205
  when ",", "|", ";", "(", ")", nil then
183
206
  # ignore
184
207
  else
@@ -189,6 +212,23 @@ module RubyParserStuff
189
212
  result
190
213
  end
191
214
 
215
+ def end_args args
216
+ lexer.lex_state = RubyLexer::State::Values::EXPR_BEG
217
+ lexer.command_start = true
218
+ self.args args
219
+ end
220
+
221
+ def endless_method_name defn_or_defs
222
+ name = defn_or_defs[1]
223
+ name = defn_or_defs[2] unless Symbol === name
224
+
225
+ if name.end_with? "=" then
226
+ yyerror "setter method cannot be defined in an endless method definition"
227
+ end
228
+
229
+ # TODO? token_info_drop(p, "def", loc->beg_pos);
230
+ end
231
+
192
232
  def array_to_hash array
193
233
  case array.sexp_type
194
234
  when :kwsplat then
@@ -208,17 +248,10 @@ module RubyParserStuff
208
248
  end
209
249
 
210
250
  def assignable(lhs, value = nil)
211
- id = lhs.to_sym unless Sexp === lhs
212
-
213
- raise "WTF" if Sexp === id
214
- id = id.to_sym if Sexp === id
215
-
216
- raise "write a test 1" if id.to_s =~ /^(?:self|nil|true|false|__LINE__|__FILE__)$/
251
+ id, line = lhs
252
+ id = id.to_sym
217
253
 
218
- raise SyntaxError, "Can't change the value of #{id}" if
219
- id.to_s =~ /^(?:self|nil|true|false|__LINE__|__FILE__)$/
220
-
221
- result = case id.to_s
254
+ result = case id
222
255
  when /^@@/ then
223
256
  asgn = in_def || in_single > 0
224
257
  s((asgn ? :cvasgn : :cvdecl), id)
@@ -239,17 +272,9 @@ module RubyParserStuff
239
272
 
240
273
  self.env[id] ||= :lvar if result.sexp_type == :lasgn
241
274
 
242
- line = case lhs
243
- when Sexp then
244
- lhs.line
245
- else
246
- value && value.line || lexer.lineno
247
- end
248
-
249
275
  result << value if value
250
- result.line = line
251
-
252
- return result
276
+ result.line line
277
+ result
253
278
  end
254
279
 
255
280
  def backref_assign_error ref
@@ -273,9 +298,9 @@ module RubyParserStuff
273
298
  line = [head.line, tail.line].compact.min
274
299
 
275
300
  head = remove_begin(head)
276
- head = s(:block, head) unless head.node_type == :block
301
+ head = s(:block, head).line(line) unless head.sexp_type == :block
277
302
 
278
- head.line = line
303
+ # head.line = line
279
304
  head << tail
280
305
  end
281
306
 
@@ -301,6 +326,10 @@ module RubyParserStuff
301
326
  end
302
327
 
303
328
  args.each do |arg|
329
+ if arg.instance_of? Array and arg.size == 2 and arg.last.is_a? Numeric then
330
+ arg = arg.first
331
+ end
332
+
304
333
  case arg
305
334
  when Sexp then
306
335
  case arg.sexp_type
@@ -311,7 +340,10 @@ module RubyParserStuff
311
340
  end
312
341
  when Symbol then
313
342
  result << arg
314
- when ",", nil then
343
+ when Array then
344
+ id, _line = arg
345
+ result << id
346
+ when ",", nil, "(" then
315
347
  # ignore
316
348
  else
317
349
  raise "unhandled: #{arg.inspect} in #{args.inspect}"
@@ -435,7 +467,7 @@ module RubyParserStuff
435
467
  end
436
468
  else
437
469
  warn "unprocessed: %p" % [s]
438
- end.map { |l| whitespace_width l[/^[ \t]*/] }
470
+ end.map { |l| whitespace_width l.chomp }
439
471
  }.compact.min
440
472
  end
441
473
 
@@ -459,7 +491,6 @@ module RubyParserStuff
459
491
  end
460
492
 
461
493
  def gettable(id)
462
- lineno = id.lineno if id.respond_to? :lineno
463
494
  id = id.to_sym if String === id
464
495
 
465
496
  result = case id.to_s
@@ -480,8 +511,6 @@ module RubyParserStuff
480
511
  end
481
512
  end
482
513
 
483
- result.line lineno if lineno
484
-
485
514
  raise "identifier #{id.inspect} is not valid" unless result
486
515
 
487
516
  result
@@ -499,6 +528,8 @@ module RubyParserStuff
499
528
  str.encode! Encoding::UTF_8
500
529
  break
501
530
  end
531
+ rescue ArgumentError # unknown encoding name
532
+ # do nothing
502
533
  rescue Encoding::InvalidByteSequenceError
503
534
  # do nothing
504
535
  rescue Encoding::UndefinedConversionError
@@ -538,7 +569,7 @@ module RubyParserStuff
538
569
  header.map! { |s| s.force_encoding "ASCII-8BIT" } if has_enc
539
570
 
540
571
  first = header.first || ""
541
- encoding, str = "utf-8", str[3..-1] if first =~ /\A\xEF\xBB\xBF/
572
+ encoding, str = +"utf-8", str.b[3..-1] if first =~ /\A\xEF\xBB\xBF/
542
573
 
543
574
  encoding = $1.strip if header.find { |s|
544
575
  s[/^#.*?-\*-.*?coding:\s*([^ ;]+).*?-\*-/, 1] ||
@@ -598,7 +629,9 @@ module RubyParserStuff
598
629
  case ttype
599
630
  when :str then
600
631
  if htype == :str
601
- head.last << tail.last
632
+ a, b = head.last, tail.last
633
+ b = b.dup.force_encoding a.encoding unless Encoding.compatible?(a, b)
634
+ a << b
602
635
  elsif htype == :dstr and head.size == 2 then
603
636
  head.last << tail.last
604
637
  else
@@ -620,7 +653,7 @@ module RubyParserStuff
620
653
  when :evstr then
621
654
  if htype == :str then
622
655
  f, l = head.file, head.line
623
- head = s(:dstr, *head.sexp_body).line head.line
656
+ head = s(:dstr, *head.sexp_body)
624
657
  head.file = f
625
658
  head.line = l
626
659
  end
@@ -639,6 +672,13 @@ module RubyParserStuff
639
672
  return head
640
673
  end
641
674
 
675
+ def local_pop in_def
676
+ lexer.cond.pop # group = local_pop
677
+ lexer.cmdarg.pop
678
+ self.env.unextend
679
+ self.in_def = in_def
680
+ end
681
+
642
682
  def logical_op type, left, right
643
683
  left = value_expr left
644
684
 
@@ -668,6 +708,73 @@ module RubyParserStuff
668
708
  new_call val[0], :"[]", val[2]
669
709
  end
670
710
 
711
+ def new_arg val
712
+ arg, = val
713
+
714
+ case arg
715
+ when Symbol then
716
+ result = s(:args, arg).line line
717
+ when Sexp then
718
+ result = arg
719
+ when Array then
720
+ (arg, line), = val
721
+ result = s(:args, arg).line line
722
+ else
723
+ debug20 32
724
+ raise "Unknown f_arg type: #{val.inspect}"
725
+ end
726
+
727
+ result
728
+ end
729
+
730
+ def new_array_pattern const, pre_arg, arypat, loc
731
+ result = s(:array_pat, const).line loc
732
+ result << pre_arg if pre_arg
733
+
734
+ if arypat && arypat.sexp_type == :array_TAIL then
735
+ result.concat arypat.sexp_body
736
+ else
737
+ raise "NO?: %p" % [arypat]
738
+ end
739
+
740
+ result
741
+ end
742
+
743
+ def array_pat_concat lhs, rhs
744
+ case lhs.sexp_type
745
+ when :PATTERN then
746
+ lhs.sexp_type = :array_pat
747
+ end
748
+
749
+ if rhs then
750
+ case rhs.sexp_type
751
+ when :array_pat, :array_TAIL, :PATTERN then
752
+ lhs.concat rhs.sexp_body
753
+ else
754
+ lhs << rhs
755
+ end
756
+ end
757
+ end
758
+
759
+ def new_array_pattern_tail pre_args, has_rest, rest_arg, post_args
760
+ # TODO: remove has_rest once all tests pass !!!
761
+ rest_arg = if has_rest then
762
+ :"*#{rest_arg}"
763
+ else
764
+ nil
765
+ end
766
+
767
+ result = s(:array_TAIL).line 666
768
+
769
+ array_pat_concat result, pre_args
770
+
771
+ result << rest_arg if rest_arg
772
+
773
+ array_pat_concat result, post_args
774
+
775
+ result
776
+ end
777
+
671
778
  def new_assign lhs, rhs
672
779
  return nil unless lhs
673
780
 
@@ -687,6 +794,8 @@ module RubyParserStuff
687
794
  end
688
795
 
689
796
  def new_attrasgn recv, meth, call_op = :"."
797
+ call_op = call_op.first if Array === call_op
798
+
690
799
  meth = :"#{meth}="
691
800
 
692
801
  result = case call_op.to_sym
@@ -702,6 +811,15 @@ module RubyParserStuff
702
811
  result
703
812
  end
704
813
 
814
+ def new_begin val
815
+ _, lineno, body, _ = val
816
+
817
+ result = body ? s(:begin, body) : s(:nil)
818
+ result.line lineno
819
+
820
+ result
821
+ end
822
+
705
823
  def new_body val
706
824
  body, resbody, elsebody, ensurebody = val
707
825
 
@@ -729,7 +847,10 @@ module RubyParserStuff
729
847
  result = block_append(result, elsebody)
730
848
  end
731
849
 
732
- result = s(:ensure, result, ensurebody).compact.line result.line if ensurebody
850
+ if ensurebody
851
+ lineno = (result || ensurebody).line
852
+ result = s(:ensure, result, ensurebody).compact.line lineno
853
+ end
733
854
 
734
855
  result
735
856
  end
@@ -739,6 +860,8 @@ module RubyParserStuff
739
860
  end
740
861
 
741
862
  def new_call recv, meth, args = nil, call_op = :"."
863
+ call_op = call_op.first if Array === call_op
864
+
742
865
  result = case call_op.to_sym
743
866
  when :"."
744
867
  s(:call, recv, meth)
@@ -766,10 +889,14 @@ module RubyParserStuff
766
889
  result
767
890
  end
768
891
 
892
+ def new_in pat, body, cases, line
893
+ s(:in, pat, body, cases).line line
894
+ end
895
+
769
896
  def new_case expr, body, line
770
897
  result = s(:case, expr)
771
898
 
772
- while body and body.node_type == :when
899
+ while body and [:when, :in].include? body.sexp_type
773
900
  result << body
774
901
  body = body.delete_at 3
775
902
  end
@@ -788,8 +915,11 @@ module RubyParserStuff
788
915
  end
789
916
 
790
917
  def new_class val
918
+ # TODO: get line from class keyword
791
919
  line, path, superclass, body = val[1], val[2], val[3], val[5]
792
920
 
921
+ path = path.first if path.instance_of? Array
922
+
793
923
  result = s(:class, path, superclass)
794
924
 
795
925
  if body then
@@ -812,7 +942,8 @@ module RubyParserStuff
812
942
  end
813
943
 
814
944
  def new_const_op_asgn val
815
- lhs, asgn_op, rhs = val[0], val[1].to_sym, val[2]
945
+ lhs, (asgn_op, _), rhs = val
946
+ asgn_op = asgn_op.to_sym
816
947
 
817
948
  result = case asgn_op
818
949
  when :"||" then
@@ -828,52 +959,71 @@ module RubyParserStuff
828
959
  end
829
960
 
830
961
  def new_defn val
831
- (_, line), name, _, args, body, nil_body_line, * = val
832
- body ||= s(:nil).line nil_body_line
962
+ _, (name, line), in_def, args, body, _ = val
963
+
964
+ body ||= s(:nil).line line
833
965
 
834
966
  args.line line
835
967
 
836
968
  result = s(:defn, name.to_sym, args).line line
837
969
 
838
- if body then
839
- if body.sexp_type == :block then
840
- result.push(*body.sexp_body)
841
- else
842
- result.push body
843
- end
970
+ if body.sexp_type == :block then
971
+ result.push(*body.sexp_body)
972
+ else
973
+ result.push body
844
974
  end
845
975
 
846
976
  result.comments = self.comments.pop
847
977
 
848
- result
978
+ [result, in_def]
849
979
  end
850
980
 
851
981
  def new_defs val
852
- recv, (name, _line), args, body = val[1], val[4], val[6], val[7]
853
- line, _ = val[5]
982
+ _, recv, (name, line), in_def, args, body, _ = val
983
+
854
984
  body ||= s(:nil).line line
855
985
 
856
986
  args.line line
857
987
 
858
- result = s(:defs, recv, name.to_sym, args)
988
+ result = s(:defs, recv, name.to_sym, args).line line
859
989
 
860
- if body then
861
- if body.sexp_type == :block then
862
- result.push(*body.sexp_body)
863
- else
864
- result.push body
865
- end
990
+ # TODO: remove_begin
991
+ # TODO: reduce_nodes
992
+
993
+ if body.sexp_type == :block then
994
+ result.push(*body.sexp_body)
995
+ else
996
+ result.push body
866
997
  end
867
998
 
868
- result.line = recv.line
869
999
  result.comments = self.comments.pop
870
- result
1000
+
1001
+ [result, in_def]
871
1002
  end
872
1003
 
873
1004
  def new_do_body args, body, lineno
874
1005
  new_iter(nil, args, body).line(lineno)
875
1006
  end
876
1007
 
1008
+ def new_find_pattern const, pat
1009
+ pat.sexp_type = :find_pat
1010
+ pat.insert 1, const
1011
+ end
1012
+
1013
+ def new_find_pattern_tail lhs, mid, rhs
1014
+ lhs_id, line = lhs
1015
+ rhs_id, _line = rhs
1016
+
1017
+ # TODO: fpinfo->pre_rest_arg = pre_rest_arg ? assignable(p, pre_rest_arg, 0, loc) : NODE_SPECIAL_NO_NAME_REST;
1018
+
1019
+ lhs_id = "*#{lhs_id}".to_sym
1020
+ rhs_id = "*#{rhs_id}".to_sym
1021
+
1022
+ mid.sexp_type = :array_pat # HACK?
1023
+
1024
+ s(:find_pat_TAIL, lhs_id, mid, rhs_id).line line
1025
+ end
1026
+
877
1027
  def new_for expr, var, body
878
1028
  result = s(:for, expr, var).line(var.line)
879
1029
  result << body if body
@@ -881,7 +1031,49 @@ module RubyParserStuff
881
1031
  end
882
1032
 
883
1033
  def new_hash val
884
- s(:hash, *val[2].values).line(val[1])
1034
+ _, line, assocs = val
1035
+
1036
+ s(:hash).line(line).concat assocs.sexp_body
1037
+ end
1038
+
1039
+ def new_hash_pattern const, hash_pat, loc
1040
+ _, pat, kw_args, kw_rest_arg = hash_pat
1041
+
1042
+ line = (const||hash_pat).line
1043
+
1044
+ result = s(:hash_pat, const).line line
1045
+ result.concat pat.sexp_body if pat
1046
+ result << kw_args if kw_args
1047
+ result << kw_rest_arg if kw_rest_arg
1048
+ result
1049
+ end
1050
+
1051
+ def new_hash_pattern_tail kw_args, kw_rest_arg, line # TODO: remove line arg
1052
+ # kw_rest_arg = assignable(kw_rest_arg, nil).line line if kw_rest_arg
1053
+
1054
+ result = s(:hash_pat).line line
1055
+ result << kw_args
1056
+
1057
+ if kw_rest_arg then
1058
+ name = kw_rest_arg.value
1059
+ # TODO: I _hate_ this:
1060
+ assignable [name, kw_rest_arg.line] if name != :**
1061
+ result << kw_rest_arg
1062
+ end
1063
+
1064
+ result
1065
+ end
1066
+
1067
+ def push_pktbl
1068
+ end
1069
+
1070
+ def pop_pktbl
1071
+ end
1072
+
1073
+ def push_pvtbl
1074
+ end
1075
+
1076
+ def pop_pvtbl
885
1077
  end
886
1078
 
887
1079
  def new_if c, t, f
@@ -958,9 +1150,12 @@ module RubyParserStuff
958
1150
  end
959
1151
 
960
1152
  def new_module val
1153
+ # TODO: get line from module keyword
961
1154
  line, path, body = val[1], val[2], val[4]
962
1155
 
963
- result = s(:module, path)
1156
+ path = path.first if path.instance_of? Array
1157
+
1158
+ result = s(:module, path).line line
964
1159
 
965
1160
  if body then # REFACTOR?
966
1161
  if body.sexp_type == :block then
@@ -970,32 +1165,33 @@ module RubyParserStuff
970
1165
  end
971
1166
  end
972
1167
 
973
- result.line = line
974
1168
  result.comments = self.comments.pop
975
1169
  result
976
1170
  end
977
1171
 
978
1172
  def new_op_asgn val
979
- lhs, asgn_op, arg = val[0], val[1].to_sym, val[2]
980
- name = gettable(lhs.value).line lhs.line
981
- arg = remove_begin(arg)
982
- result = case asgn_op # REFACTOR
1173
+ lhs, (op, _line), rhs = val
1174
+ op = op.to_sym
1175
+
1176
+ name = gettable(lhs.last).line lhs.line
1177
+ arg = remove_begin rhs
1178
+ result = case op # REFACTOR
983
1179
  when :"||" then
984
1180
  lhs << arg
985
- s(:op_asgn_or, name, lhs)
1181
+ s(:op_asgn_or, name, lhs).line lhs.line
986
1182
  when :"&&" then
987
1183
  lhs << arg
988
- s(:op_asgn_and, name, lhs)
1184
+ s(:op_asgn_and, name, lhs).line lhs.line
989
1185
  else
990
- lhs << new_call(name, asgn_op, argl(arg))
1186
+ lhs << new_call(name, op, argl(arg))
991
1187
  lhs
992
1188
  end
993
- result.line = lhs.line
1189
+
994
1190
  result
995
1191
  end
996
1192
 
997
1193
  def new_op_asgn1 val
998
- lhs, _, args, _, op, rhs = val
1194
+ lhs, _, args, _, (op, _), rhs = val
999
1195
 
1000
1196
  args.sexp_type = :arglist if args
1001
1197
 
@@ -1005,7 +1201,7 @@ module RubyParserStuff
1005
1201
  end
1006
1202
 
1007
1203
  def new_op_asgn2 val
1008
- recv, call_op, meth, op, arg = val
1204
+ recv, (call_op, _), (meth, _), (op, _), arg = val
1009
1205
  meth = :"#{meth}="
1010
1206
 
1011
1207
  result = case call_op.to_sym
@@ -1022,36 +1218,28 @@ module RubyParserStuff
1022
1218
  end
1023
1219
 
1024
1220
  def new_qsym_list
1025
- result = s(:array).line lexer.lineno
1026
- self.lexer.fixup_lineno
1027
- result
1221
+ s(:array).line lexer.lineno
1028
1222
  end
1029
1223
 
1030
1224
  def new_qsym_list_entry val
1031
- _, str, _ = val
1032
- result = s(:lit, str.to_sym).line lexer.lineno
1033
- self.lexer.fixup_lineno
1034
- result
1225
+ _, (str, line), _ = val
1226
+ s(:lit, str.to_sym).line line
1035
1227
  end
1036
1228
 
1037
1229
  def new_qword_list
1038
- result = s(:array).line lexer.lineno
1039
- self.lexer.fixup_lineno
1040
- result
1230
+ s(:array).line lexer.lineno
1041
1231
  end
1042
1232
 
1043
1233
  def new_qword_list_entry val
1044
- _, str, _ = val
1234
+ _, (str, line), _ = val
1045
1235
  str.force_encoding("ASCII-8BIT") unless str.valid_encoding?
1046
- result = s(:str, str).line lexer.lineno # TODO: problematic? grab from parser
1047
- self.lexer.fixup_lineno
1048
- result
1236
+ s(:str, str).line line
1049
1237
  end
1050
1238
 
1051
1239
  def new_regexp val
1052
- _, node, options = val
1240
+ (_, line), node, (options, _) = val
1053
1241
 
1054
- node ||= s(:str, "").line lexer.lineno
1242
+ node ||= s(:str, "").line line
1055
1243
 
1056
1244
  o, k = 0, nil
1057
1245
  options.split(//).uniq.each do |c| # FIX: this has a better home
@@ -1078,12 +1266,12 @@ module RubyParserStuff
1078
1266
  begin
1079
1267
  Regexp.new(node[1], o)
1080
1268
  rescue RegexpError => e
1081
- warn "WA\RNING: #{e.message} for #{node[1].inspect} #{options.inspect}"
1269
+ warn "WARNING: #{e.message} for #{node[1].inspect} #{options.inspect}"
1082
1270
  begin
1083
- warn "WA\RNING: trying to recover with ENC_UTF8"
1271
+ warn "WARNING: trying to recover with ENC_UTF8"
1084
1272
  Regexp.new(node[1], Regexp::ENC_UTF8)
1085
1273
  rescue RegexpError => e
1086
- warn "WA\RNING: trying to recover with ENC_NONE"
1274
+ warn "WARNING: trying to recover with ENC_NONE"
1087
1275
  Regexp.new(node[1], Regexp::ENC_NONE)
1088
1276
  end
1089
1277
  end
@@ -1096,7 +1284,7 @@ module RubyParserStuff
1096
1284
  end
1097
1285
  node << o if o and o != 0
1098
1286
  else
1099
- node = s(:dregx, "", node).line node.line
1287
+ node = s(:dregx, "", node).line line
1100
1288
  node.sexp_type = :dregx_once if options =~ /o/
1101
1289
  node << o if o and o != 0
1102
1290
  end
@@ -1138,16 +1326,16 @@ module RubyParserStuff
1138
1326
  end
1139
1327
 
1140
1328
  def new_string val
1141
- str, = val
1329
+ (str, line), = val
1330
+
1142
1331
  str.force_encoding("UTF-8")
1332
+ # TODO: remove:
1143
1333
  str.force_encoding("ASCII-8BIT") unless str.valid_encoding?
1144
- result = s(:str, str).line lexer.lineno
1145
- self.lexer.fixup_lineno str.count("\n")
1146
- result
1334
+ s(:str, str).line line
1147
1335
  end
1148
1336
 
1149
1337
  def new_super args
1150
- if args && args.node_type == :block_pass then
1338
+ if args && args.sexp_type == :block_pass then
1151
1339
  s(:super, args).line args.line
1152
1340
  else
1153
1341
  args ||= s(:arglist).line lexer.lineno
@@ -1155,32 +1343,30 @@ module RubyParserStuff
1155
1343
  end
1156
1344
  end
1157
1345
 
1346
+ def new_symbol val
1347
+ name = val.last
1348
+ s(:lit, name.to_sym).line lexer.lineno
1349
+ end
1350
+
1158
1351
  def new_symbol_list
1159
- result = s(:array).line lexer.lineno
1160
- self.lexer.fixup_lineno
1161
- result
1352
+ # TODO: hunt down and try to remove ALL lexer.lineno usage!
1353
+ s(:array).line lexer.lineno
1162
1354
  end
1163
1355
 
1164
1356
  def new_symbol_list_entry val
1165
1357
  _, sym, _ = val
1166
1358
 
1167
- sym ||= s(:str, "")
1168
-
1169
- line = lexer.lineno
1359
+ sym ||= s(:str, "").line lexer.lineno
1170
1360
 
1171
1361
  case sym.sexp_type
1172
1362
  when :dstr then
1173
1363
  sym.sexp_type = :dsym
1174
1364
  when :str then
1175
- sym = s(:lit, sym.last.to_sym)
1365
+ sym = s(:lit, sym.last.to_sym).line sym.line
1176
1366
  else
1177
- sym = s(:dsym, "", sym || s(:str, "").line(line))
1367
+ sym = s(:dsym, "", sym).line sym.line
1178
1368
  end
1179
1369
 
1180
- sym.line line
1181
-
1182
- self.lexer.fixup_lineno
1183
-
1184
1370
  sym
1185
1371
  end
1186
1372
 
@@ -1222,39 +1408,38 @@ module RubyParserStuff
1222
1408
  end
1223
1409
 
1224
1410
  def new_word_list
1225
- result = s(:array).line lexer.lineno
1226
- self.lexer.fixup_lineno
1227
- result
1411
+ s(:array).line lexer.lineno
1228
1412
  end
1229
1413
 
1230
1414
  def new_word_list_entry val
1231
1415
  _, word, _ = val
1232
- result = word.sexp_type == :evstr ? s(:dstr, "", word).line(word.line) : word
1233
- self.lexer.fixup_lineno
1234
- result
1416
+ word.sexp_type == :evstr ? s(:dstr, "", word).line(word.line) : word
1235
1417
  end
1236
1418
 
1237
- def new_xstring str
1238
- if str then
1239
- case str.sexp_type
1419
+ def new_xstring val
1420
+ _, node = val
1421
+
1422
+ node ||= s(:str, "").line lexer.lineno
1423
+
1424
+ if node then
1425
+ case node.sexp_type
1240
1426
  when :str
1241
- str.sexp_type = :xstr
1427
+ node.sexp_type = :xstr
1242
1428
  when :dstr
1243
- str.sexp_type = :dxstr
1429
+ node.sexp_type = :dxstr
1244
1430
  else
1245
- str = s(:dxstr, "", str).line str.line
1431
+ node = s(:dxstr, "", node).line node.line
1246
1432
  end
1247
- str
1248
- else
1249
- s(:xstr, "")
1250
1433
  end
1434
+
1435
+ node
1251
1436
  end
1252
1437
 
1253
1438
  def new_yield args = nil
1254
1439
  # TODO: raise args.inspect unless [:arglist].include? args.first # HACK
1255
- raise "write a test 4" if args && args.node_type == :block_pass
1440
+ raise "write a test 4" if args && args.sexp_type == :block_pass
1256
1441
  raise SyntaxError, "Block argument should not be given." if
1257
- args && args.node_type == :block_pass
1442
+ args && args.sexp_type == :block_pass
1258
1443
 
1259
1444
  args ||= s(:arglist).line lexer.lineno
1260
1445
 
@@ -1264,17 +1449,30 @@ module RubyParserStuff
1264
1449
  s(:yield, *args.sexp_body).line args.line
1265
1450
  end
1266
1451
 
1452
+ def prev_value_to_lineno v
1453
+ s, n = v
1454
+ if String === s then
1455
+ n
1456
+ else
1457
+ lexer.lineno
1458
+ end
1459
+ end
1460
+
1267
1461
  def next_token
1268
1462
  token = self.lexer.next_token
1269
1463
 
1270
1464
  if token and token.first != RubyLexer::EOF then
1465
+ self.last_token_type = token
1271
1466
  return token
1467
+ elsif !token
1468
+ return self.lexer.next_token
1272
1469
  else
1273
1470
  return [false, false]
1274
1471
  end
1275
1472
  end
1276
1473
 
1277
1474
  def on_error(et, ev, values)
1475
+ ev = ev.first if ev.instance_of?(Array) && ev.size == 2 && ev.last.is_a?(Integer)
1278
1476
  super
1279
1477
  rescue Racc::ParseError => e
1280
1478
  # I don't like how the exception obscures the error message
@@ -1288,18 +1486,17 @@ module RubyParserStuff
1288
1486
  # Timeout::Error if it runs for more than +time+ seconds.
1289
1487
 
1290
1488
  def process(str, file = "(string)", time = 10)
1489
+ str.freeze
1490
+
1291
1491
  Timeout.timeout time do
1292
1492
  raise "bad val: #{str.inspect}" unless String === str
1293
1493
 
1294
- str = handle_encoding str
1494
+ self.lexer.string = handle_encoding str
1295
1495
 
1296
1496
  self.file = file.dup
1297
1497
 
1298
1498
  @yydebug = ENV.has_key? "DEBUG"
1299
1499
 
1300
- # HACK -- need to get tests passing more than have graceful code
1301
- self.lexer.ss = RPStringScanner.new str
1302
-
1303
1500
  do_parse
1304
1501
  end
1305
1502
  end
@@ -1326,6 +1523,7 @@ module RubyParserStuff
1326
1523
  self.in_single = 0
1327
1524
  self.env.reset
1328
1525
  self.comments.clear
1526
+ self.last_token_type = nil
1329
1527
  end
1330
1528
 
1331
1529
  def ret_args node
@@ -1354,6 +1552,14 @@ module RubyParserStuff
1354
1552
  result
1355
1553
  end
1356
1554
 
1555
+ def debug n
1556
+ if ENV["PRY"] then
1557
+ require "pry"; binding.pry
1558
+ end
1559
+
1560
+ raise RubyParser::SyntaxError, "debug #{n}"
1561
+ end
1562
+
1357
1563
  def syntax_error msg
1358
1564
  raise RubyParser::SyntaxError, msg
1359
1565
  end
@@ -1398,6 +1604,8 @@ module RubyParserStuff
1398
1604
 
1399
1605
  if remove_width then
1400
1606
  line[idx..-1]
1607
+ elsif line[idx].nil?
1608
+ nil
1401
1609
  else
1402
1610
  col
1403
1611
  end