brakeman 5.2.2 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (952) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +153 -0
  3. data/README.md +9 -6
  4. data/bundle/load.rb +16 -15
  5. data/bundle/ruby/3.1.0/gems/csv-3.3.5/LICENSE.txt +33 -0
  6. data/bundle/ruby/3.1.0/gems/csv-3.3.5/NEWS.md +1009 -0
  7. data/bundle/ruby/3.1.0/gems/csv-3.3.5/README.md +55 -0
  8. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb +9 -0
  9. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb +9 -0
  10. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/fields_converter.rb +96 -0
  11. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb +18 -0
  12. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/parser.rb +1302 -0
  13. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/row.rb +757 -0
  14. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/table.rb +1055 -0
  15. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/version.rb +6 -0
  16. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/writer.rb +209 -0
  17. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv.rb +3017 -0
  18. data/bundle/ruby/3.1.0/gems/haml-6.4.0/CHANGELOG.md +1681 -0
  19. data/bundle/ruby/3.1.0/gems/haml-6.4.0/FAQ.md +147 -0
  20. data/bundle/ruby/3.1.0/gems/haml-6.4.0/Gemfile +34 -0
  21. data/bundle/ruby/3.1.0/gems/haml-6.4.0/MIT-LICENSE +20 -0
  22. data/bundle/ruby/3.1.0/gems/haml-6.4.0/README.md +205 -0
  23. data/bundle/ruby/3.1.0/gems/haml-6.4.0/REFERENCE.md +1309 -0
  24. data/bundle/ruby/3.1.0/gems/haml-6.4.0/exe/haml +6 -0
  25. data/bundle/ruby/3.1.0/gems/haml-6.4.0/haml.gemspec +45 -0
  26. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ambles.rb +20 -0
  27. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_builder.rb +162 -0
  28. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_compiler.rb +133 -0
  29. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_parser.rb +116 -0
  30. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/cli.rb +154 -0
  31. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/children_compiler.rb +155 -0
  32. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/comment_compiler.rb +51 -0
  33. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/doctype_compiler.rb +52 -0
  34. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/script_compiler.rb +114 -0
  35. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/silent_script_compiler.rb +24 -0
  36. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/tag_compiler.rb +76 -0
  37. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler.rb +97 -0
  38. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/dynamic_merger.rb +67 -0
  39. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/engine.rb +59 -0
  40. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/error.rb +66 -0
  41. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape.rb +13 -0
  42. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape_any.rb +21 -0
  43. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/base.rb +12 -0
  44. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/cdata.rb +20 -0
  45. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/coffee.rb +17 -0
  46. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/css.rb +33 -0
  47. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/erb.rb +10 -0
  48. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/escaped.rb +22 -0
  49. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/javascript.rb +33 -0
  50. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/less.rb +20 -0
  51. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/markdown.rb +11 -0
  52. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/plain.rb +29 -0
  53. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/preserve.rb +22 -0
  54. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/ruby.rb +10 -0
  55. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/sass.rb +15 -0
  56. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/scss.rb +15 -0
  57. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/text_base.rb +25 -0
  58. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/tilt_base.rb +59 -0
  59. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters.rb +75 -0
  60. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/force_escape.rb +29 -0
  61. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/helpers.rb +15 -0
  62. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/html.rb +22 -0
  63. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/identity.rb +13 -0
  64. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/object_ref.rb +35 -0
  65. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/parser.rb +991 -0
  66. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_helpers.rb +53 -0
  67. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_template.rb +62 -0
  68. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/railtie.rb +10 -0
  69. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ruby_expression.rb +32 -0
  70. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/string_splitter.rb +140 -0
  71. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/template.rb +20 -0
  72. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/temple_line_counter.rb +31 -0
  73. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/util.rb +262 -0
  74. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/version.rb +4 -0
  75. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/whitespace.rb +8 -0
  76. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml.rb +13 -0
  77. data/bundle/ruby/3.1.0/gems/highline-3.1.2/Changelog.md +658 -0
  78. data/bundle/ruby/3.1.0/gems/highline-3.1.2/Gemfile +21 -0
  79. data/bundle/ruby/3.1.0/gems/highline-3.1.2/README.md +240 -0
  80. data/bundle/ruby/3.1.0/gems/highline-3.1.2/highline.gemspec +40 -0
  81. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/io_console_compatible.rb +37 -0
  82. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/list_renderer.rb +261 -0
  83. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/menu.rb +578 -0
  84. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question/answer_converter.rb +100 -0
  85. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question.rb +640 -0
  86. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question_asker.rb +152 -0
  87. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/style.rb +0 -0
  88. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal/io_console.rb +36 -0
  89. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal/unix_stty.rb +53 -0
  90. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal.rb +192 -0
  91. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/version.rb +6 -0
  92. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline.rb +676 -0
  93. data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel/version.rb +4 -0
  94. data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel.rb +708 -0
  95. data/bundle/ruby/3.1.0/gems/reline-0.6.2/COPYING +56 -0
  96. data/bundle/ruby/3.1.0/gems/reline-0.6.2/README.md +94 -0
  97. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/config.rb +378 -0
  98. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/face.rb +199 -0
  99. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/history.rb +76 -0
  100. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/ansi.rb +322 -0
  101. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/dumb.rb +120 -0
  102. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/windows.rb +530 -0
  103. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io.rb +55 -0
  104. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/base.rb +37 -0
  105. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/composite.rb +17 -0
  106. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/emacs.rb +517 -0
  107. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/vi_command.rb +518 -0
  108. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/vi_insert.rb +517 -0
  109. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor.rb +8 -0
  110. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_stroke.rb +119 -0
  111. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/kill_ring.rb +125 -0
  112. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/line_editor.rb +2356 -0
  113. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/unicode/east_asian_width.rb +1292 -0
  114. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/unicode.rb +421 -0
  115. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/version.rb +3 -0
  116. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline.rb +527 -0
  117. data/bundle/ruby/3.1.0/gems/reline-0.6.2/license_of_rb-readline +25 -0
  118. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
  119. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/NEWS.md +843 -0
  120. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/README.md +57 -0
  121. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
  122. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
  123. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
  124. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
  125. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
  126. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
  127. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
  128. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
  129. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
  130. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
  131. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
  132. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
  133. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
  134. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
  135. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
  136. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
  137. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
  138. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
  139. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
  140. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
  141. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
  142. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
  143. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
  144. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
  145. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
  146. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
  147. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
  148. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
  149. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
  150. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
  151. data/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/History.rdoc +463 -0
  152. data/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/lib/ruby2ruby.rb +1448 -0
  153. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/History.rdoc +1345 -0
  154. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/Manifest.txt +48 -0
  155. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/README.rdoc +113 -0
  156. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/compare/normalize.rb +219 -0
  157. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.rb +10956 -0
  158. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.y +2707 -0
  159. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.rb +10981 -0
  160. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.y +2724 -0
  161. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.rb +11122 -0
  162. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.y +2735 -0
  163. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.rb +11163 -0
  164. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.y +2737 -0
  165. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.rb +11212 -0
  166. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.y +2745 -0
  167. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.rb +11212 -0
  168. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.y +2745 -0
  169. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.rb +11234 -0
  170. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.y +2760 -0
  171. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.rb +12963 -0
  172. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.y +3360 -0
  173. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.rb +13316 -0
  174. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.y +3508 -0
  175. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.rb +13649 -0
  176. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y +3542 -0
  177. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +13601 -0
  178. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y +3543 -0
  179. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy +3635 -0
  180. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer.rb +1159 -0
  181. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer.rex.rb +399 -0
  182. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer_strings.rb +638 -0
  183. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.rb +100 -0
  184. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.yy +3501 -0
  185. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser_extras.rb +1878 -0
  186. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/tools/munge.rb +256 -0
  187. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/tools/ripper.rb +46 -0
  188. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/History.rdoc +493 -0
  189. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/pt_testcase.rb +3137 -0
  190. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp.rb +397 -0
  191. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp_matcher.rb +1100 -0
  192. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp_processor.rb +754 -0
  193. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/strict_sexp.rb +149 -0
  194. data/bundle/ruby/3.1.0/gems/slim-5.2.1/CHANGES +496 -0
  195. data/bundle/ruby/3.1.0/gems/slim-5.2.1/Gemfile +43 -0
  196. data/bundle/ruby/3.1.0/gems/slim-5.2.1/LICENSE +21 -0
  197. data/bundle/ruby/3.1.0/gems/slim-5.2.1/README.jp.md +1276 -0
  198. data/bundle/ruby/3.1.0/gems/slim-5.2.1/README.md +1313 -0
  199. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/code_attributes.rb +68 -0
  200. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/command.rb +122 -0
  201. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/controls.rb +61 -0
  202. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/do_inserter.rb +34 -0
  203. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/embedded.rb +248 -0
  204. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/end_inserter.rb +63 -0
  205. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/engine.rb +42 -0
  206. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/erb_converter.rb +15 -0
  207. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/filter.rb +31 -0
  208. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/grammar.rb +24 -0
  209. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/include.rb +58 -0
  210. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/interpolation.rb +36 -0
  211. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less/context.rb +126 -0
  212. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less/filter.rb +81 -0
  213. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less.rb +6 -0
  214. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/parser.rb +535 -0
  215. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb +19 -0
  216. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/escaper.rb +42 -0
  217. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/filter.rb +97 -0
  218. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/parser.rb +35 -0
  219. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart.rb +9 -0
  220. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/splat/builder.rb +115 -0
  221. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/splat/filter.rb +93 -0
  222. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/template.rb +6 -0
  223. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/translator.rb +119 -0
  224. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/version.rb +6 -0
  225. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim.rb +16 -0
  226. data/bundle/ruby/3.1.0/gems/slim-5.2.1/slim.gemspec +33 -0
  227. data/bundle/ruby/3.1.0/gems/temple-0.10.4/CHANGES +302 -0
  228. data/bundle/ruby/3.1.0/gems/temple-0.10.4/Gemfile +2 -0
  229. data/bundle/ruby/3.1.0/gems/temple-0.10.4/README.md +267 -0
  230. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/engine.rb +68 -0
  231. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/engine.rb +18 -0
  232. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/parser.rb +41 -0
  233. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/template.rb +12 -0
  234. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/trimming.rb +24 -0
  235. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/exceptions.rb +14 -0
  236. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filter.rb +10 -0
  237. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/ambles.rb +22 -0
  238. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/code_merger.rb +31 -0
  239. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/control_flow.rb +43 -0
  240. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/dynamic_inliner.rb +72 -0
  241. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/dynamic_merger.rb +69 -0
  242. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/encoding.rb +25 -0
  243. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/eraser.rb +23 -0
  244. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/escapable.rb +41 -0
  245. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/multi_flattener.rb +26 -0
  246. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/remove_bom.rb +14 -0
  247. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/static_analyzer.rb +31 -0
  248. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/static_merger.rb +38 -0
  249. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/string_splitter.rb +142 -0
  250. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/validator.rb +16 -0
  251. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generator.rb +91 -0
  252. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/array.rb +22 -0
  253. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/array_buffer.rb +30 -0
  254. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/erb.rb +33 -0
  255. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/rails_output_buffer.rb +35 -0
  256. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/string_buffer.rb +26 -0
  257. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/grammar.rb +58 -0
  258. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_merger.rb +43 -0
  259. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_remover.rb +36 -0
  260. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_sorter.rb +22 -0
  261. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/dispatcher.rb +32 -0
  262. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/fast.rb +131 -0
  263. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/filter.rb +22 -0
  264. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/pretty.rb +104 -0
  265. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/safe.rb +24 -0
  266. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/map.rb +106 -0
  267. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/dispatcher.rb +162 -0
  268. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/engine_dsl.rb +146 -0
  269. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/grammar_dsl.rb +172 -0
  270. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/options.rb +88 -0
  271. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/template.rb +29 -0
  272. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/parser.rb +9 -0
  273. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/static_analyzer.rb +78 -0
  274. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates/rails.rb +31 -0
  275. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates/tilt.rb +39 -0
  276. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates.rb +12 -0
  277. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/utils.rb +91 -0
  278. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/version.rb +4 -0
  279. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple.rb +70 -0
  280. data/bundle/ruby/3.1.0/gems/temple-0.10.4/temple.gemspec +27 -0
  281. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/History.rdoc +149 -0
  282. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/README.md +417 -0
  283. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/cell.rb +94 -0
  284. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/row.rb +66 -0
  285. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/separator.rb +66 -0
  286. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/style.rb +284 -0
  287. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/table.rb +374 -0
  288. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/util.rb +13 -0
  289. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/version.rb +5 -0
  290. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table.rb +26 -0
  291. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/terminal-table.gemspec +25 -0
  292. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/COPYING +19 -0
  293. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_emacs_org.rb +2 -0
  294. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_handlebars.rb +2 -0
  295. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_jbuilder.rb +2 -0
  296. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_org.rb +2 -0
  297. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/asciidoc.rb +15 -0
  298. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/babel.rb +8 -0
  299. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/builder.rb +42 -0
  300. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/cli.rb +134 -0
  301. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/coffee.rb +39 -0
  302. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/commonmarker.rb +95 -0
  303. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/creole.rb +16 -0
  304. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/csv.rb +53 -0
  305. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/erb.rb +65 -0
  306. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/erubi.rb +55 -0
  307. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/etanni.rb +28 -0
  308. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/haml.rb +94 -0
  309. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/kramdown.rb +13 -0
  310. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/liquid.rb +37 -0
  311. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/livescript.rb +11 -0
  312. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/mapping.rb +412 -0
  313. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/markaby.rb +43 -0
  314. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/nokogiri.rb +37 -0
  315. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/pandoc.rb +39 -0
  316. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/pipeline.rb +19 -0
  317. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/plain.rb +5 -0
  318. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/prawn.rb +28 -0
  319. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/radius.rb +41 -0
  320. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rdiscount.rb +23 -0
  321. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rdoc.rb +11 -0
  322. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/redcarpet.rb +31 -0
  323. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/redcloth.rb +13 -0
  324. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rst-pandoc.rb +10 -0
  325. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/sass.rb +78 -0
  326. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/slim.rb +5 -0
  327. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/string.rb +27 -0
  328. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/template.rb +611 -0
  329. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/typescript.rb +19 -0
  330. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/yajl.rb +81 -0
  331. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt.rb +192 -0
  332. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/CHANGELOG.md +299 -0
  333. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/MIT-LICENSE.txt +22 -0
  334. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/README.md +194 -0
  335. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/data/display_width.marshal.gz +0 -0
  336. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/constants.rb +10 -0
  337. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/emoji_support.rb +55 -0
  338. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/index.rb +34 -0
  339. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/no_string_ext.rb +8 -0
  340. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/reline_ext.rb +14 -0
  341. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/string_ext.rb +9 -0
  342. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width.rb +247 -0
  343. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/CHANGELOG.md +196 -0
  344. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/CODE_OF_CONDUCT.md +74 -0
  345. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/Gemfile +7 -0
  346. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/Gemfile.lock +33 -0
  347. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/MIT-LICENSE.txt +20 -0
  348. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/README.md +205 -0
  349. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/emoji.marshal.gz +0 -0
  350. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/generate_constants.rb +344 -0
  351. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/constants.rb +49 -0
  352. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex.rb +8 -0
  353. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_basic.rb +8 -0
  354. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
  355. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
  356. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
  357. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
  358. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto.rb +8 -0
  359. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
  360. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_possible.rb +8 -0
  361. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
  362. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
  363. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
  364. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
  365. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
  366. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_text.rb +8 -0
  367. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
  368. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid.rb +8 -0
  369. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
  370. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
  371. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
  372. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex.rb +8 -0
  373. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
  374. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
  375. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
  376. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
  377. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
  378. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
  379. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
  380. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
  381. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
  382. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
  383. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
  384. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
  385. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
  386. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
  387. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
  388. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
  389. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
  390. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
  391. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +8 -0
  392. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/index.rb +14 -0
  393. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/lazy_constants.rb +56 -0
  394. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/list.rb +13 -0
  395. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji.rb +111 -0
  396. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/unicode-emoji.gemspec +22 -0
  397. data/lib/brakeman/app_tree.rb +98 -19
  398. data/lib/brakeman/checks/base_check.rb +7 -5
  399. data/lib/brakeman/checks/check_basic_auth.rb +4 -2
  400. data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
  401. data/lib/brakeman/checks/check_content_tag.rb +16 -9
  402. data/lib/brakeman/checks/check_cookie_serialization.rb +2 -1
  403. data/lib/brakeman/checks/check_create_with.rb +4 -2
  404. data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -3
  405. data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +2 -1
  406. data/lib/brakeman/checks/check_default_routes.rb +6 -3
  407. data/lib/brakeman/checks/check_deserialize.rb +6 -2
  408. data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -2
  409. data/lib/brakeman/checks/check_digest_dos.rb +2 -1
  410. data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
  411. data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
  412. data/lib/brakeman/checks/check_eol_rails.rb +7 -0
  413. data/lib/brakeman/checks/check_eol_ruby.rb +5 -1
  414. data/lib/brakeman/checks/check_escape_function.rb +2 -1
  415. data/lib/brakeman/checks/check_evaluation.rb +45 -7
  416. data/lib/brakeman/checks/check_execute.rb +34 -3
  417. data/lib/brakeman/checks/check_file_access.rb +2 -1
  418. data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
  419. data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
  420. data/lib/brakeman/checks/check_force_ssl.rb +2 -1
  421. data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
  422. data/lib/brakeman/checks/check_header_dos.rb +2 -1
  423. data/lib/brakeman/checks/check_i18n_xss.rb +2 -1
  424. data/lib/brakeman/checks/check_jruby_xml.rb +2 -1
  425. data/lib/brakeman/checks/check_json_encoding.rb +2 -1
  426. data/lib/brakeman/checks/check_json_entity_escape.rb +4 -2
  427. data/lib/brakeman/checks/check_json_parsing.rb +4 -2
  428. data/lib/brakeman/checks/check_link_to.rb +2 -1
  429. data/lib/brakeman/checks/check_link_to_href.rb +4 -2
  430. data/lib/brakeman/checks/check_mail_to.rb +2 -1
  431. data/lib/brakeman/checks/check_mass_assignment.rb +6 -3
  432. data/lib/brakeman/checks/check_mime_type_dos.rb +2 -1
  433. data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -1
  434. data/lib/brakeman/checks/check_model_attributes.rb +4 -2
  435. data/lib/brakeman/checks/check_model_serialize.rb +2 -1
  436. data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
  437. data/lib/brakeman/checks/check_nested_attributes_bypass.rb +2 -1
  438. data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
  439. data/lib/brakeman/checks/check_page_caching_cve.rb +2 -1
  440. data/lib/brakeman/checks/check_pathname.rb +48 -0
  441. data/lib/brakeman/checks/check_permit_attributes.rb +2 -1
  442. data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
  443. data/lib/brakeman/checks/check_ransack.rb +53 -0
  444. data/lib/brakeman/checks/check_redirect.rb +67 -31
  445. data/lib/brakeman/checks/check_regex_dos.rb +2 -1
  446. data/lib/brakeman/checks/check_render.rb +15 -3
  447. data/lib/brakeman/checks/check_render_dos.rb +2 -1
  448. data/lib/brakeman/checks/check_render_inline.rb +4 -2
  449. data/lib/brakeman/checks/check_response_splitting.rb +2 -1
  450. data/lib/brakeman/checks/check_reverse_tabnabbing.rb +2 -1
  451. data/lib/brakeman/checks/check_route_dos.rb +2 -1
  452. data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
  453. data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
  454. data/lib/brakeman/checks/check_sanitize_methods.rb +6 -3
  455. data/lib/brakeman/checks/check_secrets.rb +2 -1
  456. data/lib/brakeman/checks/check_select_tag.rb +2 -1
  457. data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
  458. data/lib/brakeman/checks/check_send.rb +2 -1
  459. data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
  460. data/lib/brakeman/checks/check_session_settings.rb +8 -6
  461. data/lib/brakeman/checks/check_simple_format.rb +4 -2
  462. data/lib/brakeman/checks/check_single_quotes.rb +2 -1
  463. data/lib/brakeman/checks/check_skip_before_filter.rb +4 -2
  464. data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
  465. data/lib/brakeman/checks/check_sql.rb +14 -5
  466. data/lib/brakeman/checks/check_sql_cves.rb +4 -2
  467. data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
  468. data/lib/brakeman/checks/check_strip_tags.rb +6 -3
  469. data/lib/brakeman/checks/check_symbol_dos.rb +2 -1
  470. data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
  471. data/lib/brakeman/checks/check_template_injection.rb +2 -1
  472. data/lib/brakeman/checks/check_translate_bug.rb +2 -1
  473. data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -1
  474. data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +2 -1
  475. data/lib/brakeman/checks/check_unscoped_find.rb +10 -1
  476. data/lib/brakeman/checks/check_validation_regex.rb +2 -1
  477. data/lib/brakeman/checks/check_verb_confusion.rb +2 -1
  478. data/lib/brakeman/checks/check_weak_hash.rb +6 -3
  479. data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
  480. data/lib/brakeman/checks/check_without_protection.rb +2 -1
  481. data/lib/brakeman/checks/check_xml_dos.rb +2 -1
  482. data/lib/brakeman/checks/check_yaml_parsing.rb +4 -2
  483. data/lib/brakeman/checks/eol_check.rb +4 -2
  484. data/lib/brakeman/commandline.rb +5 -0
  485. data/lib/brakeman/file_parser.rb +35 -2
  486. data/lib/brakeman/file_path.rb +4 -0
  487. data/lib/brakeman/messages.rb +1 -1
  488. data/lib/brakeman/options.rb +50 -5
  489. data/lib/brakeman/parsers/erubis_patch.rb +11 -0
  490. data/lib/brakeman/parsers/haml6_embedded.rb +23 -0
  491. data/lib/brakeman/parsers/rails2_erubis.rb +3 -0
  492. data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +4 -0
  493. data/lib/brakeman/parsers/rails3_erubis.rb +5 -1
  494. data/lib/brakeman/parsers/slim_embedded.rb +2 -0
  495. data/lib/brakeman/parsers/template_parser.rb +32 -7
  496. data/lib/brakeman/processor.rb +2 -0
  497. data/lib/brakeman/processors/alias_processor.rb +160 -44
  498. data/lib/brakeman/processors/base_processor.rb +2 -0
  499. data/lib/brakeman/processors/gem_processor.rb +2 -2
  500. data/lib/brakeman/processors/haml6_template_processor.rb +92 -0
  501. data/lib/brakeman/processors/haml_template_processor.rb +8 -2
  502. data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
  503. data/lib/brakeman/processors/lib/find_all_calls.rb +1 -0
  504. data/lib/brakeman/processors/lib/module_helper.rb +31 -1
  505. data/lib/brakeman/processors/lib/rails3_config_processor.rb +1 -1
  506. data/lib/brakeman/processors/lib/render_helper.rb +38 -1
  507. data/lib/brakeman/processors/library_processor.rb +6 -0
  508. data/lib/brakeman/processors/template_processor.rb +1 -1
  509. data/lib/brakeman/report/ignore/config.rb +0 -1
  510. data/lib/brakeman/report/ignore/interactive.rb +2 -2
  511. data/lib/brakeman/report/pager.rb +2 -2
  512. data/lib/brakeman/report/report_codeclimate.rb +1 -1
  513. data/lib/brakeman/report/report_csv.rb +2 -0
  514. data/lib/brakeman/report/report_github.rb +1 -1
  515. data/lib/brakeman/report/report_html.rb +1 -1
  516. data/lib/brakeman/report/report_junit.rb +6 -59
  517. data/lib/brakeman/report/report_markdown.rb +1 -1
  518. data/lib/brakeman/report/report_sarif.rb +122 -2
  519. data/lib/brakeman/report/report_table.rb +7 -7
  520. data/lib/brakeman/report/report_tabs.rb +0 -1
  521. data/lib/brakeman/report/report_text.rb +10 -1
  522. data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
  523. data/lib/brakeman/report/templates/header.html.erb +8 -3
  524. data/lib/brakeman/report/templates/ignored_warnings.html.erb +5 -3
  525. data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
  526. data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
  527. data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
  528. data/lib/brakeman/rescanner.rb +40 -388
  529. data/lib/brakeman/scanner.rb +182 -88
  530. data/lib/brakeman/tracker/config.rb +89 -34
  531. data/lib/brakeman/tracker/controller.rb +14 -10
  532. data/lib/brakeman/tracker/file_cache.rb +83 -0
  533. data/lib/brakeman/tracker.rb +27 -4
  534. data/lib/brakeman/util.rb +21 -7
  535. data/lib/brakeman/version.rb +1 -1
  536. data/lib/brakeman/warning.rb +6 -3
  537. data/lib/brakeman/warning_codes.rb +6 -0
  538. data/lib/brakeman.rb +33 -7
  539. data/lib/ruby_parser/bm_sexp.rb +5 -1
  540. metadata +515 -422
  541. data/bundle/ruby/2.7.0/gems/haml-5.2.2/CHANGELOG.md +0 -1505
  542. data/bundle/ruby/2.7.0/gems/haml-5.2.2/FAQ.md +0 -147
  543. data/bundle/ruby/2.7.0/gems/haml-5.2.2/Gemfile +0 -16
  544. data/bundle/ruby/2.7.0/gems/haml-5.2.2/MIT-LICENSE +0 -20
  545. data/bundle/ruby/2.7.0/gems/haml-5.2.2/README.md +0 -216
  546. data/bundle/ruby/2.7.0/gems/haml-5.2.2/REFERENCE.md +0 -1380
  547. data/bundle/ruby/2.7.0/gems/haml-5.2.2/TODO +0 -24
  548. data/bundle/ruby/2.7.0/gems/haml-5.2.2/haml.gemspec +0 -45
  549. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -219
  550. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -237
  551. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -150
  552. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/buffer.rb +0 -182
  553. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/compiler.rb +0 -330
  554. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/engine.rb +0 -238
  555. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/error.rb +0 -65
  556. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +0 -77
  557. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/exec.rb +0 -347
  558. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/filters.rb +0 -399
  559. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/generator.rb +0 -42
  560. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -60
  561. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -132
  562. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -60
  563. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -20
  564. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -33
  565. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -114
  566. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers.rb +0 -709
  567. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/options.rb +0 -273
  568. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/parser.rb +0 -856
  569. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/plugin.rb +0 -54
  570. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/railtie.rb +0 -53
  571. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -47
  572. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template/options.rb +0 -27
  573. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb +0 -39
  574. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -124
  575. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -30
  576. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/util.rb +0 -258
  577. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/version.rb +0 -5
  578. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml.rb +0 -25
  579. data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -15
  580. data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -12
  581. data/bundle/ruby/2.7.0/gems/highline-2.0.3/Changelog.md +0 -620
  582. data/bundle/ruby/2.7.0/gems/highline-2.0.3/Gemfile +0 -22
  583. data/bundle/ruby/2.7.0/gems/highline-2.0.3/README.md +0 -202
  584. data/bundle/ruby/2.7.0/gems/highline-2.0.3/appveyor.yml +0 -37
  585. data/bundle/ruby/2.7.0/gems/highline-2.0.3/highline.gemspec +0 -35
  586. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/io_console_compatible.rb +0 -37
  587. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/list_renderer.rb +0 -261
  588. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/menu.rb +0 -576
  589. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question/answer_converter.rb +0 -103
  590. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question.rb +0 -630
  591. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question_asker.rb +0 -150
  592. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/io_console.rb +0 -36
  593. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb +0 -51
  594. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal.rb +0 -190
  595. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/version.rb +0 -6
  596. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline.rb +0 -650
  597. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
  598. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
  599. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel.rb +0 -612
  600. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +0 -178
  601. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +0 -48
  602. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +0 -205
  603. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +0 -68
  604. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +0 -97
  605. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +0 -80
  606. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +0 -311
  607. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +0 -451
  608. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +0 -2599
  609. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +0 -51
  610. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +0 -171
  611. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +0 -142
  612. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +0 -447
  613. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +0 -79
  614. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +0 -59
  615. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +0 -76
  616. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +0 -52
  617. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -694
  618. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +0 -197
  619. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +0 -273
  620. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +0 -61
  621. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +0 -101
  622. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +0 -689
  623. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +0 -266
  624. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +0 -37
  625. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +0 -28
  626. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +0 -298
  627. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +0 -424
  628. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +0 -539
  629. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +0 -144
  630. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +0 -81
  631. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +0 -974
  632. data/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/History.rdoc +0 -435
  633. data/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -1309
  634. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/History.rdoc +0 -1297
  635. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/Manifest.txt +0 -46
  636. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/README.rdoc +0 -112
  637. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/compare/normalize.rb +0 -218
  638. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.rb +0 -10973
  639. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.y +0 -2683
  640. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.rb +0 -10980
  641. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.y +0 -2700
  642. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.rb +0 -11123
  643. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.y +0 -2711
  644. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.rb +0 -11132
  645. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.y +0 -2713
  646. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.rb +0 -11231
  647. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.y +0 -2721
  648. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.rb +0 -11231
  649. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.y +0 -2721
  650. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.rb +0 -11253
  651. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.y +0 -2736
  652. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.rb +0 -12980
  653. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.y +0 -3324
  654. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.rb +0 -13242
  655. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.y +0 -3447
  656. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.rb +0 -13622
  657. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y +0 -3481
  658. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy +0 -3536
  659. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rb +0 -1144
  660. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rex.rb +0 -399
  661. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer_strings.rb +0 -638
  662. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.rb +0 -98
  663. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.yy +0 -3465
  664. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser_extras.rb +0 -1865
  665. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/munge.rb +0 -250
  666. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/ripper.rb +0 -44
  667. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
  668. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
  669. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
  670. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
  671. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
  672. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
  673. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
  674. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
  675. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
  676. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
  677. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
  678. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
  679. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
  680. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/CHANGES.md +0 -154
  681. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/Gemfile +0 -11
  682. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/LICENSE.txt +0 -22
  683. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/README.md +0 -191
  684. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -11
  685. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -34
  686. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -36
  687. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -181
  688. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -37
  689. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -12
  690. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -26
  691. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -99
  692. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -52
  693. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -94
  694. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -29
  695. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -39
  696. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -36
  697. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
  698. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -38
  699. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -21
  700. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -13
  701. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -33
  702. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -26
  703. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -18
  704. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -17
  705. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -47
  706. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -41
  707. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -3
  708. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -94
  709. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -38
  710. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -19
  711. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/History.rdoc +0 -448
  712. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/pt_testcase.rb +0 -3133
  713. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp.rb +0 -391
  714. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp_matcher.rb +0 -1100
  715. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp_processor.rb +0 -754
  716. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/strict_sexp.rb +0 -148
  717. data/bundle/ruby/2.7.0/gems/slim-4.1.0/CHANGES +0 -460
  718. data/bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile +0 -70
  719. data/bundle/ruby/2.7.0/gems/slim-4.1.0/LICENSE +0 -21
  720. data/bundle/ruby/2.7.0/gems/slim-4.1.0/README.jp.md +0 -1289
  721. data/bundle/ruby/2.7.0/gems/slim-4.1.0/README.md +0 -1290
  722. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/code_attributes.rb +0 -67
  723. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/command.rb +0 -128
  724. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/controls.rb +0 -60
  725. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/do_inserter.rb +0 -33
  726. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/embedded.rb +0 -248
  727. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/end_inserter.rb +0 -62
  728. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/engine.rb +0 -39
  729. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/erb_converter.rb +0 -14
  730. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/filter.rb +0 -30
  731. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/grammar.rb +0 -23
  732. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/include.rb +0 -57
  733. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/interpolation.rb +0 -35
  734. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less/context.rb +0 -127
  735. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less/filter.rb +0 -80
  736. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less.rb +0 -5
  737. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/parser.rb +0 -548
  738. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/escaper.rb +0 -42
  739. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/filter.rb +0 -96
  740. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/parser.rb +0 -34
  741. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart.rb +0 -8
  742. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/splat/builder.rb +0 -107
  743. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/splat/filter.rb +0 -91
  744. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/template.rb +0 -19
  745. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/translator.rb +0 -118
  746. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/version.rb +0 -5
  747. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim.rb +0 -14
  748. data/bundle/ruby/2.7.0/gems/slim-4.1.0/slim.gemspec +0 -24
  749. data/bundle/ruby/2.7.0/gems/temple-0.8.2/CHANGES +0 -260
  750. data/bundle/ruby/2.7.0/gems/temple-0.8.2/Gemfile +0 -3
  751. data/bundle/ruby/2.7.0/gems/temple-0.8.2/README.md +0 -267
  752. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/engine.rb +0 -67
  753. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -15
  754. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -40
  755. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -11
  756. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -23
  757. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -13
  758. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filter.rb +0 -9
  759. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -30
  760. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -42
  761. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -71
  762. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -24
  763. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -22
  764. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -40
  765. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -25
  766. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -13
  767. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -30
  768. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -37
  769. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -130
  770. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -15
  771. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generator.rb +0 -88
  772. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -21
  773. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -29
  774. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -32
  775. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -35
  776. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -25
  777. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/grammar.rb +0 -57
  778. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -42
  779. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -35
  780. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -21
  781. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -31
  782. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -130
  783. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -21
  784. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -103
  785. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -23
  786. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/map.rb +0 -105
  787. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -161
  788. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -145
  789. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -170
  790. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -87
  791. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -28
  792. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/parser.rb +0 -8
  793. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -77
  794. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -26
  795. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -46
  796. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates.rb +0 -11
  797. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/utils.rb +0 -101
  798. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +0 -3
  799. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple.rb +0 -67
  800. data/bundle/ruby/2.7.0/gems/temple-0.8.2/temple.gemspec +0 -29
  801. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
  802. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
  803. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -94
  804. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -52
  805. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
  806. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
  807. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -343
  808. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -5
  809. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -26
  810. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -26
  811. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/COPYING +0 -18
  812. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -27
  813. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -16
  814. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -24
  815. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -37
  816. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -58
  817. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -78
  818. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -25
  819. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/csv.rb +0 -65
  820. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -3
  821. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erb.rb +0 -63
  822. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -32
  823. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -43
  824. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/etanni.rb +0 -27
  825. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -86
  826. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -25
  827. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/less.rb +0 -30
  828. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/liquid.rb +0 -44
  829. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -23
  830. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/mapping.rb +0 -293
  831. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/markaby.rb +0 -45
  832. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -22
  833. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +0 -36
  834. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -49
  835. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -16
  836. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -43
  837. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -48
  838. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -39
  839. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -40
  840. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -83
  841. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -23
  842. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -18
  843. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -52
  844. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -34
  845. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/string.rb +0 -21
  846. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/template.rb +0 -297
  847. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -26
  848. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -22
  849. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/yajl.rb +0 -87
  850. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt.rb +0 -166
  851. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -137
  852. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/MIT-LICENSE.txt +0 -22
  853. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/README.md +0 -124
  854. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  855. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
  856. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
  857. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
  858. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
  859. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
  860. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
  861. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
  862. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/README.txt +0 -0
  863. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
  864. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
  865. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
  866. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
  867. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
  868. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
  869. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
  870. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
  871. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
  872. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
  873. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
  874. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
  875. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
  876. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
  877. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
  878. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
  879. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
  880. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
  881. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
  882. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
  883. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
  884. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
  885. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
  886. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
  887. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
  888. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
  889. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
  890. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
  891. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
  892. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/setup.rb +0 -0
  893. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/AUTHORS +0 -0
  894. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/COPYING +0 -0
  895. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/LICENSE +0 -0
  896. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/TODO +0 -0
  897. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
  898. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
  899. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/compatibility.rb +0 -0
  900. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
  901. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/import.rb +0 -0
  902. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/list.rb +0 -0
  903. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/menu/item.rb +0 -0
  904. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/paginator.rb +0 -0
  905. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/simulate.rb +0 -0
  906. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/statement.rb +0 -0
  907. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/string.rb +0 -0
  908. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
  909. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
  910. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
  911. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/wrapper.rb +0 -0
  912. /data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.27.0}/MIT-LICENSE.txt +0 -0
  913. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5/LICENSE.txt → 3.1.0/gems/reline-0.6.2/BSDL} +0 -0
  914. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/attlistdecl.rb +0 -0
  915. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/attlistdecl.rb +0 -0
  916. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/dtd.rb +0 -0
  917. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/elementdecl.rb +0 -0
  918. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/entitydecl.rb +0 -0
  919. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/notationdecl.rb +0 -0
  920. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/formatters/default.rb +0 -0
  921. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/formatters/transitive.rb +0 -0
  922. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/light/node.rb +0 -0
  923. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/output.rb +0 -0
  924. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parent.rb +0 -0
  925. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parsers/lightparser.rb +0 -0
  926. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parsers/ultralightparser.rb +0 -0
  927. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/sax2listener.rb +0 -0
  928. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/streamlistener.rb +0 -0
  929. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/undefinednamespaceexception.rb +0 -0
  930. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/validation/validationexception.rb +0 -0
  931. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/xmldecl.rb +0 -0
  932. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/xmltokens.rb +0 -0
  933. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml.rb +0 -0
  934. /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.2}/Manifest.txt +0 -0
  935. /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.2}/README.rdoc +0 -0
  936. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/debugging.md +0 -0
  937. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/gauntlet.md +0 -0
  938. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_extensions.rb +0 -0
  939. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_stringscanner.rb +0 -0
  940. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex +0 -0
  941. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/Manifest.txt +0 -0
  942. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/README.rdoc +0 -0
  943. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/lib/composite_sexp_processor.rb +0 -0
  944. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/lib/unique.rb +0 -0
  945. /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.4}/EXPRESSIONS.md +0 -0
  946. /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.4}/LICENSE +0 -0
  947. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Gemfile +0 -0
  948. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/LICENSE.txt +0 -0
  949. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Manifest +0 -0
  950. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Todo.rdoc +0 -0
  951. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
  952. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
@@ -0,0 +1,1878 @@
1
+ # encoding: ASCII-8BIT
2
+ # frozen_string_literal: true
3
+ # TODO: remove encoding comment
4
+
5
+ require "sexp"
6
+ require "ruby_lexer"
7
+ require "timeout"
8
+ require "rp_extensions"
9
+ require "rp_stringscanner"
10
+
11
+ class Sexp
12
+ def check_line_numbers
13
+ raise "bad nil line for:\n%s" % [self.pretty_inspect] if nil_line?
14
+ raise "bad line number for:\n%s" % [self.pretty_inspect] unless
15
+ Integer === self.line &&
16
+ self.line >= 1 &&
17
+ self.line <= self.line_min
18
+ end
19
+
20
+ ##
21
+ # Returns the minimum line number of the children of self.
22
+
23
+ def line_min
24
+ @line_min ||= [self.deep_each.map(&:line).min, self.line].compact.min
25
+ end
26
+
27
+ def nil_line?
28
+ self.deep_each.map(&:line).any?(&:nil?)
29
+ end
30
+ end
31
+
32
+ module RubyParserStuff
33
+ VERSION = "3.20.3"
34
+
35
+ attr_accessor :lexer, :in_def, :in_single, :file, :in_argdef
36
+ attr_accessor :in_kwarg
37
+ attr_reader :env, :comments
38
+
39
+ ##
40
+ # Canonicalize conditionals. Eg:
41
+ #
42
+ # not x ? a : b
43
+ #
44
+ # becomes:
45
+ #
46
+ # x ? b : a
47
+
48
+ attr_accessor :canonicalize_conditions
49
+
50
+ ##
51
+ # The last token type returned from #next_token
52
+
53
+ attr_accessor :last_token_type
54
+
55
+ $good20 = []
56
+
57
+ %w[
58
+ ].map(&:to_i).each do |n|
59
+ $good20[n] = n
60
+ end
61
+
62
+ def debug20 n, v = nil, r = nil
63
+ raise "not yet #{n} #{v.inspect} => #{r.inspect}" unless $good20[n]
64
+ end
65
+
66
+ def self.deprecate old, new
67
+ define_method old do |*args|
68
+ warn "DEPRECATED: #{old} -> #{new} from #{caller.first}"
69
+ send new, *args
70
+ end
71
+ end
72
+
73
+ ##
74
+ # for pure ruby systems only
75
+
76
+ def do_parse
77
+ _racc_do_parse_rb(_racc_setup, false)
78
+ end if ENV["PURE_RUBY"] || ENV["CHECK_LINE_NUMS"]
79
+
80
+ if ENV["CHECK_LINE_NUMS"] then
81
+ def _racc_do_reduce arg, act
82
+ x = super
83
+
84
+ @racc_vstack.grep(Sexp).each do |sexp|
85
+ sexp.check_line_numbers
86
+ end
87
+ x
88
+ end
89
+ end
90
+
91
+ ARG_TYPES = [:arglist, :call_args, :array, :args].map { |k|
92
+ [k, true]
93
+ }.to_h
94
+
95
+ has_enc = "".respond_to? :encoding
96
+
97
+ # This is in sorted order of occurrence according to
98
+ # charlock_holmes against 500k files, with UTF_8 forced
99
+ # to the top.
100
+ #
101
+ # Overwrite this contstant if you need something different.
102
+ ENCODING_ORDER = [
103
+ Encoding::UTF_8, # moved to top to reflect default in 2.0
104
+ Encoding::ISO_8859_1,
105
+ Encoding::ISO_8859_2,
106
+ Encoding::ISO_8859_9,
107
+ Encoding::SHIFT_JIS,
108
+ Encoding::WINDOWS_1252,
109
+ Encoding::EUC_JP
110
+ ] if has_enc
111
+
112
+ JUMP_TYPE = [:return, :next, :break, :yield].map { |k| [k, true] }.to_h
113
+
114
+ TAB_WIDTH = 8
115
+
116
+ def initialize(options = {})
117
+ super()
118
+
119
+ v = self.class.name[/[23]\d/]
120
+ raise "Bad Class name #{self.class}" unless v
121
+
122
+ self.lexer = RubyLexer.new v && v.to_i
123
+ self.lexer.parser = self
124
+ self.in_kwarg = false
125
+ self.in_argdef = false
126
+
127
+ @env = RubyParserStuff::Environment.new
128
+ @comments = []
129
+
130
+ @canonicalize_conditions = true
131
+
132
+ self.reset
133
+ end
134
+
135
+ def arg_concat node1, node2 # TODO: nuke
136
+ raise "huh" unless node2
137
+
138
+ splat = s(:splat, node2)
139
+ splat.line node2.line
140
+
141
+ node1 << splat
142
+ end
143
+
144
+ def argl x
145
+ x = s(:arglist, x) if x and x.sexp_type == :array
146
+ x
147
+ end
148
+
149
+ def args args
150
+ result = s(:args)
151
+
152
+ ss = args.grep Sexp
153
+ if ss.empty? then
154
+ result.line lexer.lineno
155
+ else
156
+ result.line ss.first.line
157
+ result.line_max = ss.first.line_max
158
+ end
159
+
160
+ args.each do |arg|
161
+ if arg.instance_of? Array and arg.size == 2 and arg.last.is_a? Numeric then
162
+ arg = arg.first
163
+ end
164
+
165
+ case arg
166
+ when Sexp then
167
+ case arg.sexp_type
168
+ when :args, :block, :array, :call_args then # HACK call_args mismatch
169
+ rest = arg.sexp_body
170
+
171
+ rest.map! { |x|
172
+ if x.instance_of? Array and x.size == 2 and Numeric === x.last then
173
+ x.first
174
+ else
175
+ x
176
+ end
177
+ }
178
+
179
+ result.concat rest
180
+ when :forward_args then
181
+ self.env[:*] = :lvar # TODO: arg_var(p, idFWD_REST) ?
182
+ self.env[:**] = :lvar
183
+ self.env[:&] = :lvar
184
+
185
+ result << arg
186
+ when :block_arg then
187
+ result << :"&#{arg.last}"
188
+ when :shadow then
189
+ name = arg.last
190
+ self.env[name] = :lvar
191
+ if Sexp === result.last and result.last.sexp_type == :shadow then
192
+ result.last << name
193
+ else
194
+ result << arg
195
+ end
196
+ when :masgn, :block_pass, :hash then # HACK: remove. prolly call_args
197
+ result << arg
198
+ else
199
+ raise "unhandled: #{arg.sexp_type} in #{args.inspect}"
200
+ end
201
+ when Symbol then
202
+ name = arg.to_s.delete("&*")
203
+ self.env[name.to_sym] = :lvar unless name.empty?
204
+ result << arg
205
+ when true, false then
206
+ self.in_kwarg = arg
207
+ when ",", "|", ";", "(", ")", nil then
208
+ # ignore
209
+ else
210
+ raise "unhandled: #{arg.inspect} in #{args.inspect}"
211
+ end
212
+ end
213
+
214
+ result
215
+ end
216
+
217
+ def end_args args
218
+ lexer.lex_state = RubyLexer::State::Values::EXPR_BEG
219
+ lexer.command_start = true
220
+ self.args args
221
+ end
222
+
223
+ def attrset_id? id
224
+ id =~ /^\[\]=$|^\w+=$/
225
+ end
226
+
227
+ def endless_method_name defn_or_defs
228
+ name = defn_or_defs[1]
229
+ name = defn_or_defs[2] unless Symbol === name
230
+
231
+ if attrset_id? name then
232
+ yyerror "setter method cannot be defined in an endless method definition"
233
+ end
234
+
235
+ # TODO? token_info_drop(p, "def", loc->beg_pos);
236
+ end
237
+
238
+ def array_to_hash array
239
+ case array.sexp_type
240
+ when :kwsplat then
241
+ array
242
+ else
243
+ s(:hash, *array.sexp_body).line array.line
244
+ end
245
+ end
246
+
247
+ def aryset receiver, index
248
+ index ||= s()
249
+ l = receiver.line
250
+ result = s(:attrasgn, receiver, :"[]=",
251
+ *index.sexp_body).compact # [].sexp_body => nil
252
+ result.line = l
253
+ result
254
+ end
255
+
256
+ def assignable(lhs, value = nil)
257
+ id, line = lhs
258
+ id = id.to_sym
259
+
260
+ result = case id
261
+ when /^@@/ then
262
+ asgn = in_def || in_single > 0
263
+ s((asgn ? :cvasgn : :cvdecl), id)
264
+ when /^@/ then
265
+ s(:iasgn, id)
266
+ when /^\$/ then
267
+ s(:gasgn, id)
268
+ when /^[A-Z]/ then
269
+ s(:cdecl, id)
270
+ else
271
+ case self.env[id]
272
+ when :lvar, :dvar, nil then
273
+ s(:lasgn, id)
274
+ else
275
+ raise "wtf? unknown type: #{self.env[id]}"
276
+ end
277
+ end
278
+
279
+ self.env[id] ||= :lvar if result.sexp_type == :lasgn
280
+
281
+ result << value if value
282
+ result.line line
283
+ result
284
+ end
285
+
286
+ def backref_assign_error ref
287
+ # TODO: need a test for this... obviously
288
+ case ref.sexp_type
289
+ when :nth_ref then
290
+ raise "write a test 2"
291
+ raise SyntaxError, "Can't set variable %p" % ref.last
292
+ when :back_ref then
293
+ raise "write a test 3"
294
+ raise SyntaxError, "Can't set back reference %p" % ref.last
295
+ else
296
+ raise "Unknown backref type: #{ref.inspect}"
297
+ end
298
+ end
299
+
300
+ def block_append(head, tail)
301
+ return head if tail.nil?
302
+ return tail if head.nil?
303
+
304
+ line = [head.line, tail.line].compact.min
305
+
306
+ head = remove_begin(head)
307
+ head = s(:block, head).line(line) unless head.sexp_type == :block
308
+
309
+ # head.line = line
310
+ head << tail
311
+ end
312
+
313
+ def block_dup_check call_or_args, block
314
+ syntax_error "Both block arg and actual block given." if
315
+ block and call_or_args.block_pass?
316
+ end
317
+
318
+ def block_var *args
319
+ result = self.args args
320
+ result.sexp_type = :masgn
321
+ result
322
+ end
323
+
324
+ def call_args args
325
+ result = s(:call_args)
326
+
327
+ a = args.grep(Sexp).first
328
+ if a then
329
+ result.line a.line
330
+ else
331
+ result.line lexer.lineno
332
+ end
333
+
334
+ args.each do |arg|
335
+ # ruby 3.0+ TODO: next if arg in [String, Integer] # eg ["(", 1]
336
+ next if arg.class == Array && arg.map(&:class) == [String, Integer]
337
+
338
+ case arg
339
+ when Sexp then
340
+ case arg.sexp_type
341
+ when :array, :args, :call_args then # HACK? remove array at some point
342
+ result.concat arg.sexp_body
343
+ else
344
+ result << arg
345
+ end
346
+ when Symbol then
347
+ result << arg
348
+ when Array then
349
+ id, _line = arg
350
+ result << id
351
+ when ",", nil, "(" then
352
+ # ignore
353
+ else
354
+ raise "unhandled: #{arg.inspect} in #{args.inspect}"
355
+ end
356
+ end
357
+
358
+ result
359
+ end
360
+
361
+ def clean_mlhs sexp
362
+ case sexp.sexp_type
363
+ when :masgn then
364
+ if sexp.size == 2 and sexp[1].sexp_type == :array then
365
+ s(:masgn, *sexp[1].sexp_body.map { |sub| clean_mlhs sub })
366
+ else
367
+ debug20 5
368
+ sexp
369
+ end
370
+ when :gasgn, :iasgn, :lasgn, :cvasgn then
371
+ if sexp.size == 2 then
372
+ sexp.last
373
+ else
374
+ debug20 7
375
+ sexp # optional value
376
+ end
377
+ else
378
+ raise "unsupported type: #{sexp.inspect}"
379
+ end
380
+ end
381
+
382
+ def cond node
383
+ return nil if node.nil?
384
+ node = value_expr node
385
+
386
+ case node.sexp_type
387
+ when :lit then
388
+ if Regexp === node.last then
389
+ s(:match, node)
390
+ else
391
+ node
392
+ end
393
+ when :and then
394
+ _, lhs, rhs = node
395
+ s(:and, cond(lhs), cond(rhs))
396
+ when :or then
397
+ _, lhs, rhs = node
398
+ s(:or, cond(lhs), cond(rhs))
399
+ when :dot2 then
400
+ label = "flip#{node.hash}"
401
+ env[label] = :lvar
402
+ _, lhs, rhs = node
403
+ s(:flip2, lhs, rhs) # TODO: recurse?
404
+ when :dot3 then
405
+ label = "flip#{node.hash}"
406
+ env[label] = :lvar
407
+ _, lhs, rhs = node
408
+ s(:flip3, lhs, rhs)
409
+ else
410
+ node
411
+ end.line node.line
412
+ end
413
+
414
+ def dedent sexp
415
+ dedent_count = dedent_size sexp
416
+
417
+ skip_one = false
418
+ sexp.map { |obj|
419
+ case obj
420
+ when Symbol then
421
+ obj
422
+ when String then
423
+ obj.lines.map { |l| remove_whitespace_width l, dedent_count }.join
424
+ when Sexp then
425
+ case obj.sexp_type
426
+ when :evstr then
427
+ skip_one = true
428
+ obj
429
+ when :str then
430
+ _, str = obj
431
+ str = if skip_one then
432
+ skip_one = false
433
+ s1, *rest = str.lines
434
+ s1 + rest.map { |l| remove_whitespace_width l, dedent_count }.join
435
+ else
436
+ str.lines.map { |l| remove_whitespace_width l, dedent_count }.join
437
+ end
438
+
439
+ s(:str, str).line obj.line
440
+ else
441
+ warn "unprocessed sexp %p" % [obj]
442
+ end
443
+ else
444
+ warn "unprocessed: %p" % [obj]
445
+ end
446
+ }
447
+ end
448
+
449
+ def dedent_size sexp
450
+ skip_one = false
451
+ sexp.flat_map { |s|
452
+ case s
453
+ when Symbol then
454
+ next
455
+ when String then
456
+ s.lines
457
+ when Sexp then
458
+ case s.sexp_type
459
+ when :evstr then
460
+ skip_one = true
461
+ next
462
+ when :str then
463
+ _, str = s
464
+ lines = str.lines
465
+ if skip_one then
466
+ skip_one = false
467
+ lines.shift
468
+ end
469
+ lines
470
+ else
471
+ warn "unprocessed sexp %p" % [s]
472
+ end
473
+ else
474
+ warn "unprocessed: %p" % [s]
475
+ end.map { |l| whitespace_width l }
476
+ }.compact.min
477
+ end
478
+
479
+ def dedent_string string, width
480
+ characters_skipped = 0
481
+ indentation_skipped = 0
482
+
483
+ string.chars.each do |char|
484
+ break if indentation_skipped >= width
485
+ if char == " "
486
+ characters_skipped += 1
487
+ indentation_skipped += 1
488
+ elsif char == "\t"
489
+ proposed = TAB_WIDTH * (indentation_skipped / TAB_WIDTH + 1)
490
+ break if proposed > width
491
+ characters_skipped += 1
492
+ indentation_skipped = proposed
493
+ end
494
+ end
495
+ string[characters_skipped..-1]
496
+ end
497
+
498
+ def gettable(id)
499
+ id = id.to_sym if String === id
500
+
501
+ result = case id.to_s
502
+ when /^@@/ then
503
+ s(:cvar, id)
504
+ when /^@/ then
505
+ s(:ivar, id)
506
+ when /^\$/ then
507
+ s(:gvar, id)
508
+ when /^[A-Z]/ then
509
+ s(:const, id)
510
+ else
511
+ type = env[id]
512
+ if type then
513
+ s(type, id)
514
+ else
515
+ new_call(nil, id)
516
+ end
517
+ end
518
+
519
+ raise "identifier #{id.inspect} is not valid" unless result
520
+
521
+ result
522
+ end
523
+
524
+ def hack_encoding str, extra = nil
525
+ encodings = ENCODING_ORDER.dup
526
+ encodings.unshift(extra) unless extra.nil?
527
+
528
+ # terrible, horrible, no good, very bad, last ditch effort.
529
+ encodings.each do |enc|
530
+ begin
531
+ str.force_encoding enc
532
+ if str.valid_encoding? then
533
+ str.encode! Encoding::UTF_8
534
+ break
535
+ end
536
+ rescue ArgumentError # unknown encoding name
537
+ # do nothing
538
+ rescue Encoding::InvalidByteSequenceError
539
+ # do nothing
540
+ rescue Encoding::UndefinedConversionError
541
+ # do nothing
542
+ end
543
+ end
544
+
545
+ # no amount of pain is enough for you.
546
+ raise "Bad encoding. Need a magic encoding comment." unless
547
+ str.encoding.name == "UTF-8"
548
+ end
549
+
550
+ ##
551
+ # Returns a UTF-8 encoded string after processing BOMs and magic
552
+ # encoding comments.
553
+ #
554
+ # Holy crap... ok. Here goes:
555
+ #
556
+ # Ruby's file handling and encoding support is insane. We need to be
557
+ # able to lex a file. The lexer file is explicitly UTF-8 to make
558
+ # things cleaner. This allows us to deal with extended chars in
559
+ # class and method names. In order to do this, we need to encode all
560
+ # input source files as UTF-8. First, we look for a UTF-8 BOM by
561
+ # looking at the first line while forcing its encoding to
562
+ # ASCII-8BIT. If we find a BOM, we strip it and set the expected
563
+ # encoding to UTF-8. Then, we search for a magic encoding comment.
564
+ # If found, it overrides the BOM. Finally, we force the encoding of
565
+ # the input string to whatever was found, and then encode that to
566
+ # UTF-8 for compatibility with the lexer.
567
+
568
+ def handle_encoding str
569
+ str = str.dup
570
+ has_enc = str.respond_to? :encoding
571
+ encoding = nil
572
+
573
+ header = str.each_line.first(2)
574
+ header.map! { |s| s.force_encoding "ASCII-8BIT" } if has_enc
575
+
576
+ first = header.first || ""
577
+ encoding, str = +"utf-8", str.b[3..-1] if first =~ /\A\xEF\xBB\xBF/
578
+
579
+ encoding = $1.strip if header.find { |s|
580
+ s[/^#.*?-\*-.*?coding:\s*([^ ;]+).*?-\*-/, 1] ||
581
+ s[/^#.*(?:en)?coding(?:\s*[:=])\s*([\w-]+)/, 1]
582
+ }
583
+
584
+ if encoding then
585
+ if has_enc then
586
+ encoding.sub!(/utf-8-.+$/, "utf-8") # HACK for stupid emacs formats
587
+ hack_encoding str, encoding
588
+ else
589
+ warn "Skipping magic encoding comment"
590
+ end
591
+ else
592
+ # nothing specified... ugh. try to encode as utf-8
593
+ hack_encoding str if has_enc
594
+ end
595
+
596
+ str
597
+ end
598
+
599
+ def invert_block_call val
600
+ ret, iter = val
601
+ type, call = ret
602
+
603
+ iter.insert 1, call
604
+
605
+ ret = s(type).line ret.line
606
+
607
+ [iter, ret]
608
+ end
609
+
610
+ def inverted? val
611
+ JUMP_TYPE[val[0].sexp_type]
612
+ end
613
+
614
+ def list_append list, item # TODO: nuke me *sigh*
615
+ return s(:array, item) unless list
616
+ list = s(:array, list) unless Sexp === list && list.sexp_type == :array
617
+ list << item
618
+ end
619
+
620
+ def list_prepend item, list # TODO: nuke me *sigh*
621
+ list = s(:array, list) unless Sexp === list && list.sexp_type == :array
622
+ list.insert 1, item
623
+ list
624
+ end
625
+
626
+ def literal_concat head, tail # TODO: ugh. rewrite
627
+ return tail unless head
628
+ return head unless tail
629
+
630
+ htype, ttype = head.sexp_type, tail.sexp_type
631
+
632
+ head = s(:dstr, "", head).line head.line if htype == :evstr
633
+
634
+ case ttype
635
+ when :str then
636
+ if htype == :str
637
+ a, b = head.last, tail.last
638
+ b = b.dup.force_encoding a.encoding unless Encoding.compatible?(a, b)
639
+ a << b
640
+ elsif htype == :dstr and head.size == 2 then
641
+ head.last << tail.last
642
+ else
643
+ head << tail
644
+ end
645
+ when :dstr then
646
+ if htype == :str then
647
+ lineno = head.line
648
+ tail[1] = head.last + tail[1]
649
+ head = tail
650
+ head.line = lineno
651
+ else
652
+ tail.sexp_type = :array
653
+ tail[1] = s(:str, tail[1]).line tail.line
654
+ tail.delete_at 1 if tail[1] == s(:str, "")
655
+
656
+ head.push(*tail.sexp_body)
657
+ end
658
+ when :evstr then
659
+ if htype == :str then
660
+ f, l = head.file, head.line
661
+ head = s(:dstr, *head.sexp_body)
662
+ head.file = f
663
+ head.line = l
664
+ end
665
+
666
+ if head.size == 2 and tail.size > 1 and tail[1].sexp_type == :str then
667
+ head.last << tail[1].last
668
+ head.sexp_type = :str if head.size == 2 # HACK ?
669
+ else
670
+ head.push(tail)
671
+ end
672
+ else
673
+ x = [head, tail]
674
+ raise "unknown type: #{x.inspect}"
675
+ end
676
+
677
+ return head
678
+ end
679
+
680
+ def local_pop in_def
681
+ lexer.cond.pop # group = local_pop
682
+ lexer.cmdarg.pop
683
+ self.env.unextend
684
+ self.in_def = in_def
685
+ end
686
+
687
+ def logical_op type, left, right
688
+ left = value_expr left
689
+
690
+ if left and left.sexp_type == type and not left.paren then
691
+ node, rhs = left, nil
692
+
693
+ loop do
694
+ _, _lhs, rhs = node
695
+ break unless rhs && rhs.sexp_type == type and not rhs.paren
696
+ node = rhs
697
+ end
698
+
699
+ node.pop
700
+ node << s(type, rhs, right).line(rhs.line)
701
+
702
+ return left
703
+ end
704
+
705
+ result = s(type, left, right)
706
+ result.line left.line if left.line
707
+ result
708
+ end
709
+
710
+ def new_aref val
711
+ val[2] ||= s(:arglist)
712
+ val[2].sexp_type = :arglist if val[2].sexp_type == :array # REFACTOR
713
+ new_call val[0], :"[]", val[2]
714
+ end
715
+
716
+ def new_arg val
717
+ arg, = val
718
+
719
+ case arg
720
+ when Symbol then
721
+ result = s(:args, arg).line line
722
+ when Sexp then
723
+ result = arg
724
+ when Array then
725
+ (arg, line), = val
726
+ result = s(:args, arg).line line
727
+ else
728
+ debug20 32
729
+ raise "Unknown f_arg type: #{val.inspect}"
730
+ end
731
+
732
+ result
733
+ end
734
+
735
+ def ary_to_pat ary
736
+ pat = ary.dup
737
+ pat.sexp_type = :array_TAIL
738
+
739
+ new_array_pattern nil, nil, pat, ary.line
740
+ end
741
+
742
+ def new_array_pattern const, pre_arg, arypat, loc
743
+ result = s(:array_pat, const).line loc
744
+ result << pre_arg if pre_arg
745
+
746
+ if arypat && arypat.sexp_type == :array_TAIL then
747
+ result.concat arypat.sexp_body
748
+ else
749
+ raise "NO?: %p" % [arypat]
750
+ end
751
+
752
+ result
753
+ end
754
+
755
+ def array_pat_concat lhs, rhs
756
+ case lhs.sexp_type
757
+ when :PATTERN then
758
+ lhs.sexp_type = :array_pat
759
+ end
760
+
761
+ if rhs then
762
+ case rhs.sexp_type
763
+ when :array_pat, :array_TAIL, :PATTERN then
764
+ lhs.concat rhs.sexp_body
765
+ else
766
+ lhs << rhs
767
+ end
768
+ end
769
+ end
770
+
771
+ def new_array_pattern_tail pre_args, has_rest, rest_arg, post_args
772
+ # TODO: remove has_rest once all tests pass !!!
773
+ rest_arg = if has_rest then
774
+ :"*#{rest_arg}"
775
+ else
776
+ nil
777
+ end
778
+
779
+ result = s(:array_TAIL).line 666
780
+
781
+ array_pat_concat result, pre_args
782
+
783
+ result << rest_arg if rest_arg
784
+
785
+ array_pat_concat result, post_args
786
+
787
+ result
788
+ end
789
+
790
+ def new_assign lhs, rhs
791
+ return nil unless lhs
792
+
793
+ rhs = value_expr rhs
794
+
795
+ case lhs.sexp_type
796
+ when :lasgn, :iasgn, :cdecl, :cvdecl, :gasgn, :cvasgn, :attrasgn, :safe_attrasgn then
797
+ lhs << rhs
798
+ lhs.line_max = rhs.line_max
799
+ when :const then
800
+ lhs.sexp_type = :cdecl
801
+ lhs << rhs
802
+ else
803
+ raise "unknown lhs #{lhs.inspect} w/ #{rhs.inspect}"
804
+ end
805
+
806
+ lhs
807
+ end
808
+
809
+ def new_attrasgn recv, meth, call_op = :"."
810
+ call_op = call_op.first if Array === call_op
811
+
812
+ meth = :"#{meth}="
813
+
814
+ result = case call_op.to_sym
815
+ when :"."
816
+ s(:attrasgn, recv, meth)
817
+ when :"&."
818
+ s(:safe_attrasgn, recv, meth)
819
+ else
820
+ raise "unknown call operator: `#{type.inspect}`"
821
+ end
822
+
823
+ result.line = recv.line
824
+ result
825
+ end
826
+
827
+ def new_begin val
828
+ (_, line), _, body, _ = val
829
+
830
+ result = body ? s(:begin, body) : s(:nil)
831
+ result.line line
832
+
833
+ result
834
+ end
835
+
836
+ def new_body val
837
+ body, resbody, elsebody, ensurebody = val
838
+
839
+ result = body
840
+
841
+ if resbody then
842
+ result = s(:rescue)
843
+ result << body if body
844
+
845
+ res = resbody
846
+
847
+ while res do
848
+ result << res
849
+ res = res.resbody(true)
850
+ end
851
+
852
+ result << elsebody if elsebody
853
+
854
+ result.line = (body || resbody).line
855
+ end
856
+
857
+ if elsebody and not resbody then
858
+ warning("else without rescue is useless")
859
+ result = s(:begin, result).line result.line if result
860
+ result = block_append(result, elsebody)
861
+ end
862
+
863
+ if ensurebody
864
+ lineno = (result || ensurebody).line
865
+ result = s(:ensure, result, ensurebody).compact.line lineno
866
+ end
867
+
868
+ result
869
+ end
870
+
871
+ def new_brace_body args, body, lineno
872
+ new_iter(nil, args, body).line lineno
873
+ end
874
+
875
+ def new_call recv, meth, args = nil, call_op = :"."
876
+ call_op = call_op.first if Array === call_op
877
+
878
+ result = case call_op.to_sym
879
+ when :"."
880
+ s(:call, recv, meth)
881
+ when :"&."
882
+ s(:safe_call, recv, meth)
883
+ else
884
+ raise "unknown call operator: `#{type.inspect}`"
885
+ end
886
+
887
+ # TODO: need a test with f(&b) to produce block_pass
888
+ # TODO: need a test with f(&b) { } to produce warning
889
+
890
+ if args then
891
+ if ARG_TYPES[args.sexp_type] then
892
+ result.concat args.sexp_body
893
+ else
894
+ result << args
895
+ end
896
+ result.line_max = args.line_max
897
+ end
898
+
899
+ # line = result.grep(Sexp).map(&:line).compact.min
900
+ result.line = recv.line if recv
901
+ result.line ||= lexer.lineno
902
+
903
+ result
904
+ end
905
+
906
+ def new_in pat, body, cases, line
907
+ s(:in, pat, body, cases).line line
908
+ end
909
+
910
+ def new_case expr, body, line
911
+ result = s(:case, expr)
912
+
913
+ while body and [:when, :in].include? body.sexp_type
914
+ result << body
915
+ body = body.delete_at 3
916
+ end
917
+
918
+ result[2..-1].each do |node|
919
+ block = node.block(:delete)
920
+ node.concat block.sexp_body if block
921
+ end
922
+
923
+ # else
924
+ body = nil if body == s(:block)
925
+ result << body
926
+
927
+ result.line = line
928
+ result
929
+ end
930
+
931
+ def new_class val
932
+ (_, line), path, superclass, _, body, (_, line_max) = val
933
+
934
+ path = path.first if path.instance_of? Array
935
+
936
+ result = s(:class, path, superclass)
937
+
938
+ if body then
939
+ if body.sexp_type == :block then
940
+ result.push(*body.sexp_body)
941
+ else
942
+ result.push body
943
+ end
944
+ end
945
+
946
+ result.line = line
947
+ result.line_max = line_max
948
+ result.comments = self.comments.pop
949
+ result
950
+ end
951
+
952
+ def new_compstmt val
953
+ result = void_stmts(val.grep(Sexp)[0])
954
+ result = remove_begin(result) if result
955
+ result
956
+ end
957
+
958
+ def new_const_op_asgn val
959
+ lhs, (asgn_op, _), rhs = val
960
+ asgn_op = asgn_op.to_sym
961
+
962
+ result = case asgn_op
963
+ when :"||" then
964
+ s(:op_asgn_or, lhs, rhs)
965
+ when :"&&" then
966
+ s(:op_asgn_and, lhs, rhs)
967
+ else
968
+ s(:op_asgn, lhs, asgn_op, rhs)
969
+ end
970
+
971
+ result.line = lhs.line
972
+ result
973
+ end
974
+
975
+ def new_defn val
976
+ _, (name, line), in_def, args, body, (_, line_max) = val
977
+
978
+ body ||= s(:nil).line line
979
+
980
+ args.line line
981
+
982
+ result = s(:defn, name.to_sym, args).line line
983
+ result.line_max = line_max
984
+
985
+ if body.sexp_type == :block then
986
+ result.push(*body.sexp_body)
987
+ else
988
+ result.push body
989
+ end
990
+
991
+ result.comments = self.comments.pop
992
+
993
+ [result, in_def]
994
+ end
995
+
996
+ def new_endless_defn val
997
+ (name, line, in_def), args, _, body, _, resbody = val
998
+
999
+ result =
1000
+ if resbody then
1001
+ s(:defn, name, args,
1002
+ new_rescue(body,
1003
+ new_resbody(s(:array).line(line),
1004
+ resbody))).line line
1005
+ else
1006
+ s(:defn, name, args, body).line line
1007
+ end
1008
+
1009
+ local_pop in_def
1010
+ endless_method_name result
1011
+
1012
+ result.comments = self.comments.pop
1013
+
1014
+ result
1015
+ end
1016
+
1017
+ def new_endless_defs val
1018
+ (recv, (name, line, in_def)), args, _, body, _, resbody = val
1019
+
1020
+ result =
1021
+ if resbody then
1022
+ s(:defs, recv, name, args,
1023
+ new_rescue(body,
1024
+ new_resbody(s(:array).line(line),
1025
+ resbody))).line line
1026
+ else
1027
+ s(:defs, recv, name, args, body).line(line)
1028
+ end
1029
+
1030
+ self.in_single -= 1
1031
+ local_pop in_def
1032
+ endless_method_name result
1033
+
1034
+ result.comments = self.comments.pop
1035
+
1036
+ result
1037
+ end
1038
+
1039
+ def new_defs val
1040
+ _, recv, (name, line), in_def, args, body, (_, line_max) = val
1041
+
1042
+ body ||= s(:nil).line line
1043
+
1044
+ args.line line
1045
+
1046
+ result = s(:defs, recv, name.to_sym, args).line line
1047
+ result.line_max = line_max
1048
+
1049
+ # TODO: remove_begin
1050
+ # TODO: reduce_nodes
1051
+
1052
+ if body.sexp_type == :block then
1053
+ result.push(*body.sexp_body)
1054
+ else
1055
+ result.push body
1056
+ end
1057
+
1058
+ result.comments = self.comments.pop
1059
+
1060
+ [result, in_def]
1061
+ end
1062
+
1063
+ def new_do_body args, body, lineno
1064
+ new_iter(nil, args, body).line(lineno)
1065
+ end
1066
+
1067
+ def new_find_pattern const, pat
1068
+ pat.sexp_type = :find_pat
1069
+ pat.insert 1, const
1070
+ end
1071
+
1072
+ def new_find_pattern_tail lhs, mid, rhs
1073
+ lhs_id, line = lhs
1074
+ rhs_id, _line = rhs
1075
+
1076
+ # TODO: fpinfo->pre_rest_arg = pre_rest_arg ? assignable(p, pre_rest_arg, 0, loc) : NODE_SPECIAL_NO_NAME_REST;
1077
+
1078
+ lhs_id = "*#{lhs_id}".to_sym
1079
+ rhs_id = "*#{rhs_id}".to_sym
1080
+
1081
+ raise "BAD?" unless mid.sexp_type == :array_TAIL
1082
+
1083
+ s(:find_pat_TAIL, lhs_id, *mid.sexp_body, rhs_id).line line
1084
+ end
1085
+
1086
+ def new_for expr, var, body
1087
+ result = s(:for, expr, var).line(var.line)
1088
+ result << body if body
1089
+ result
1090
+ end
1091
+
1092
+ def new_hash val
1093
+ _, line, assocs = val
1094
+
1095
+ s(:hash).line(line).concat assocs.sexp_body
1096
+ end
1097
+
1098
+ def new_hash_pattern const, hash_pat, loc
1099
+ _, pat, kw_args, kw_rest_arg = hash_pat
1100
+
1101
+ line = (const||hash_pat).line
1102
+
1103
+ result = s(:hash_pat, const).line line
1104
+ result.concat pat.sexp_body if pat
1105
+ result << kw_args if kw_args
1106
+ result << kw_rest_arg if kw_rest_arg
1107
+ result
1108
+ end
1109
+
1110
+ def new_hash_pattern_tail kw_args, kw_rest_arg, line # TODO: remove line arg
1111
+ # kw_rest_arg = assignable(kw_rest_arg, nil).line line if kw_rest_arg
1112
+
1113
+ result = s(:hash_pat).line line
1114
+ result << kw_args
1115
+
1116
+ if kw_rest_arg then
1117
+ name = kw_rest_arg.value
1118
+ # TODO: I _hate_ this:
1119
+ assignable [name, kw_rest_arg.line] if name != :**
1120
+ result << kw_rest_arg
1121
+ end
1122
+
1123
+ result
1124
+ end
1125
+
1126
+ def push_pktbl
1127
+ end
1128
+
1129
+ def pop_pktbl
1130
+ end
1131
+
1132
+ def push_pvtbl
1133
+ end
1134
+
1135
+ def pop_pvtbl
1136
+ end
1137
+
1138
+ def new_if c, t, f
1139
+ l = [c.line, t && t.line, f && f.line].compact.min
1140
+ c = cond c
1141
+ c, t, f = c.last, f, t if c.sexp_type == :not and canonicalize_conditions
1142
+ s(:if, c, t, f).line(l)
1143
+ end
1144
+
1145
+ def new_iter call, args, body
1146
+ body ||= nil
1147
+
1148
+ args ||= s(:args)
1149
+ args = s(:args, args) if Symbol === args
1150
+
1151
+ result = s(:iter)
1152
+ result << call if call
1153
+ result << args
1154
+ result << body if body
1155
+
1156
+ result.line call.line if call
1157
+
1158
+ unless args == 0 then
1159
+ args.line call.line if call
1160
+ args.sexp_type = :args
1161
+ end
1162
+
1163
+ result
1164
+ end
1165
+
1166
+ def new_masgn lhs, rhs, wrap = false
1167
+ _, ary = lhs
1168
+
1169
+ line = rhs.line
1170
+ rhs = value_expr(rhs)
1171
+ rhs = ary ? s(:to_ary, rhs) : s(:array, rhs) if wrap
1172
+ rhs.line line if wrap
1173
+
1174
+ lhs.delete_at 1 if ary.nil?
1175
+ lhs << rhs
1176
+
1177
+ lhs
1178
+ end
1179
+
1180
+ def new_masgn_arg rhs, wrap = false
1181
+ rhs = value_expr(rhs)
1182
+ # HACK: could be array if lhs isn't right
1183
+ rhs = s(:to_ary, rhs).line rhs.line if wrap
1184
+ rhs
1185
+ end
1186
+
1187
+ def new_match lhs, rhs
1188
+ if lhs then
1189
+ case lhs.sexp_type
1190
+ when :dregx, :dregx_once then
1191
+ # TODO: no test coverage
1192
+ return s(:match2, lhs, rhs).line(lhs.line)
1193
+ when :lit then
1194
+ return s(:match2, lhs, rhs).line(lhs.line) if Regexp === lhs.last
1195
+ end
1196
+ end
1197
+
1198
+ if rhs then
1199
+ case rhs.sexp_type
1200
+ when :dregx, :dregx_once then
1201
+ # TODO: no test coverage
1202
+ return s(:match3, rhs, lhs).line(lhs.line)
1203
+ when :lit then
1204
+ return s(:match3, rhs, lhs).line(lhs.line) if Regexp === rhs.last
1205
+ end
1206
+ end
1207
+
1208
+ new_call(lhs, :"=~", argl(rhs)).line lhs.line
1209
+ end
1210
+
1211
+ def new_module val
1212
+ (_, line_min), path, _, body, (_, line_max) = val
1213
+
1214
+ path = path.first if path.instance_of? Array
1215
+
1216
+ result = s(:module, path).line line_min
1217
+ result.line_max = line_max
1218
+
1219
+ if body then # REFACTOR?
1220
+ if body.sexp_type == :block then
1221
+ result.push(*body.sexp_body)
1222
+ else
1223
+ result.push body
1224
+ end
1225
+ end
1226
+
1227
+ result.comments = self.comments.pop
1228
+ result
1229
+ end
1230
+
1231
+ def new_op_asgn val
1232
+ lhs, (op, _line), rhs = val
1233
+ op = op.to_sym
1234
+
1235
+ name = gettable(lhs.last).line lhs.line
1236
+ arg = remove_begin rhs
1237
+ result = case op # REFACTOR
1238
+ when :"||" then
1239
+ lhs << arg
1240
+ s(:op_asgn_or, name, lhs).line lhs.line
1241
+ when :"&&" then
1242
+ lhs << arg
1243
+ s(:op_asgn_and, name, lhs).line lhs.line
1244
+ else
1245
+ lhs << new_call(name, op, argl(arg))
1246
+ lhs
1247
+ end
1248
+
1249
+ result
1250
+ end
1251
+
1252
+ def new_op_asgn1 val
1253
+ lhs, _, args, _, (op, _), rhs = val
1254
+
1255
+ args.sexp_type = :arglist if args
1256
+
1257
+ result = s(:op_asgn1, lhs, args, op.to_sym, rhs)
1258
+ result.line lhs.line
1259
+ result
1260
+ end
1261
+
1262
+ def new_op_asgn2 val
1263
+ recv, (call_op, _), (meth, _), (op, _), arg = val
1264
+ meth = :"#{meth}="
1265
+
1266
+ result = case call_op.to_sym
1267
+ when :"."
1268
+ s(:op_asgn2, recv, meth, op.to_sym, arg)
1269
+ when :"&."
1270
+ s(:safe_op_asgn2, recv, meth, op.to_sym, arg)
1271
+ else
1272
+ raise "unknown call operator: `#{type.inspect}`"
1273
+ end
1274
+
1275
+ result.line = recv.line
1276
+ result
1277
+ end
1278
+
1279
+ def new_qsym_list
1280
+ s(:array).line lexer.lineno
1281
+ end
1282
+
1283
+ def new_qsym_list_entry val
1284
+ _, (str, line), _ = val
1285
+ s(:lit, str.to_sym).line line
1286
+ end
1287
+
1288
+ def new_qword_list
1289
+ s(:array).line lexer.lineno
1290
+ end
1291
+
1292
+ def new_qword_list_entry val
1293
+ _, (str, line), _ = val
1294
+ str.force_encoding("ASCII-8BIT") unless str.valid_encoding?
1295
+ s(:str, str).line line
1296
+ end
1297
+
1298
+ def new_regexp val
1299
+ (_, line), node, (options, line_max) = val
1300
+
1301
+ node ||= s(:str, "").line line
1302
+ node.line_max = line_max
1303
+
1304
+ o, k = 0, nil
1305
+ options.split(//).uniq.each do |c| # FIX: this has a better home
1306
+ v = {
1307
+ "x" => Regexp::EXTENDED,
1308
+ "i" => Regexp::IGNORECASE,
1309
+ "m" => Regexp::MULTILINE,
1310
+ "o" => Regexp::ONCE,
1311
+ "n" => Regexp::ENC_NONE,
1312
+ "e" => Regexp::ENC_EUC,
1313
+ "s" => Regexp::ENC_SJIS,
1314
+ "u" => Regexp::ENC_UTF8,
1315
+ }[c]
1316
+ raise "unknown regexp option: #{c}" unless v
1317
+ o += v
1318
+ end
1319
+
1320
+ case node.sexp_type
1321
+ when :str then
1322
+ node.sexp_type = :lit
1323
+ node[1] = if k then
1324
+ Regexp.new(node[1], o, k)
1325
+ else
1326
+ begin
1327
+ Regexp.new(node[1], o)
1328
+ rescue RegexpError => e
1329
+ warn "WARNING: #{e.message} for #{node[1].inspect} #{options.inspect}"
1330
+ begin
1331
+ warn "WARNING: trying to recover with ENC_UTF8"
1332
+ Regexp.new(node[1], Regexp::ENC_UTF8)
1333
+ rescue RegexpError => e
1334
+ warn "WARNING: trying to recover with ENC_NONE"
1335
+ Regexp.new(node[1], Regexp::ENC_NONE)
1336
+ end
1337
+ end
1338
+ end
1339
+ when :dstr then
1340
+ if options =~ /o/ then
1341
+ node.sexp_type = :dregx_once
1342
+ else
1343
+ node.sexp_type = :dregx
1344
+ end
1345
+ node << o if o and o != 0
1346
+ else
1347
+ node = s(:dregx, "", node).line line
1348
+ node.sexp_type = :dregx_once if options =~ /o/
1349
+ node << o if o and o != 0
1350
+ end
1351
+
1352
+ node
1353
+ end
1354
+
1355
+ def new_resbody cond, body
1356
+ if body && body.sexp_type == :block then
1357
+ body.shift # remove block and splat it in directly
1358
+ else
1359
+ body = [body]
1360
+ end
1361
+
1362
+ s(:resbody, cond, *body).line cond.line
1363
+ end
1364
+
1365
+ def new_rescue body, resbody
1366
+ s(:rescue, body, resbody).line body.line
1367
+ end
1368
+
1369
+ def new_sclass val
1370
+ (_, line), _, recv, in_def, _, in_single, body, _ = val
1371
+
1372
+ result = s(:sclass, recv)
1373
+
1374
+ if body then
1375
+ if body.sexp_type == :block then
1376
+ result.push(*body.sexp_body)
1377
+ else
1378
+ result.push body
1379
+ end
1380
+ end
1381
+
1382
+ result.line = line
1383
+ self.in_def = in_def
1384
+ self.in_single = in_single
1385
+ result
1386
+ end
1387
+
1388
+ def new_string val
1389
+ (str, line), = val
1390
+
1391
+ str.force_encoding("UTF-8")
1392
+ # TODO: remove:
1393
+ str.force_encoding("ASCII-8BIT") unless str.valid_encoding?
1394
+ s(:str, str).line line
1395
+ end
1396
+
1397
+ def new_super args
1398
+ if args && args.sexp_type == :block_pass then
1399
+ s(:super, args).line args.line
1400
+ else
1401
+ args ||= s(:arglist).line lexer.lineno
1402
+ s(:super, *args.sexp_body).line args.line
1403
+ end
1404
+ end
1405
+
1406
+ def new_symbol val
1407
+ name = val.last
1408
+ s(:lit, name.to_sym).line lexer.lineno
1409
+ end
1410
+
1411
+ def new_symbol_list
1412
+ # TODO: hunt down and try to remove ALL lexer.lineno usage!
1413
+ s(:array).line lexer.lineno
1414
+ end
1415
+
1416
+ def new_symbol_list_entry val
1417
+ _, sym, _ = val
1418
+
1419
+ sym ||= s(:str, "").line lexer.lineno
1420
+
1421
+ case sym.sexp_type
1422
+ when :dstr then
1423
+ sym.sexp_type = :dsym
1424
+ when :str then
1425
+ sym = s(:lit, sym.last.to_sym).line sym.line
1426
+ else
1427
+ sym = s(:dsym, "", sym).line sym.line
1428
+ end
1429
+
1430
+ sym
1431
+ end
1432
+
1433
+ def new_undef n, m = nil
1434
+ if m then
1435
+ block_append(n, s(:undef, m).line(m.line))
1436
+ else
1437
+ s(:undef, n).line n.line
1438
+ end
1439
+ end
1440
+
1441
+ def new_until block, expr, pre
1442
+ new_until_or_while :until, block, expr, pre
1443
+ end
1444
+
1445
+ def new_until_or_while type, block, expr, pre
1446
+ other = type == :until ? :while : :until
1447
+ line = [block && block.line, expr.line].compact.min
1448
+ block, pre = block.last, false if block && block.sexp_type == :begin
1449
+
1450
+ expr = cond expr
1451
+
1452
+ result = unless expr.sexp_type == :not and canonicalize_conditions then
1453
+ s(type, expr, block, pre)
1454
+ else
1455
+ s(other, expr.last, block, pre)
1456
+ end
1457
+
1458
+ result.line = line
1459
+ result
1460
+ end
1461
+
1462
+ def new_when cond, body
1463
+ s(:when, cond, body)
1464
+ end
1465
+
1466
+ def new_while block, expr, pre
1467
+ new_until_or_while :while, block, expr, pre
1468
+ end
1469
+
1470
+ def new_word_list
1471
+ s(:array).line lexer.lineno
1472
+ end
1473
+
1474
+ def new_word_list_entry val
1475
+ _, word, _ = val
1476
+ word.sexp_type == :evstr ? s(:dstr, "", word).line(word.line) : word
1477
+ end
1478
+
1479
+ def new_xstring val
1480
+ _, node = val
1481
+
1482
+ node ||= s(:str, "").line lexer.lineno
1483
+
1484
+ if node then
1485
+ case node.sexp_type
1486
+ when :str
1487
+ node.sexp_type = :xstr
1488
+ when :dstr
1489
+ node.sexp_type = :dxstr
1490
+ else
1491
+ node = s(:dxstr, "", node).line node.line
1492
+ end
1493
+ end
1494
+
1495
+ node
1496
+ end
1497
+
1498
+ def new_yield args = nil
1499
+ # TODO: raise args.inspect unless [:arglist].include? args.first # HACK
1500
+ raise "write a test 4" if args && args.sexp_type == :block_pass
1501
+ raise SyntaxError, "Block argument should not be given." if
1502
+ args && args.sexp_type == :block_pass
1503
+
1504
+ args ||= s(:arglist).line lexer.lineno
1505
+
1506
+ args.sexp_type = :arglist if [:call_args, :array].include? args.sexp_type
1507
+ args = s(:arglist, args).line args.line unless args.sexp_type == :arglist
1508
+
1509
+ s(:yield, *args.sexp_body).line args.line
1510
+ end
1511
+
1512
+ def prev_value_to_lineno v
1513
+ s, n = v
1514
+ if String === s then
1515
+ n
1516
+ else
1517
+ lexer.lineno
1518
+ end
1519
+ end
1520
+
1521
+ def next_token
1522
+ token = self.lexer.next_token
1523
+
1524
+ if token and token.first != RubyLexer::EOF then
1525
+ self.last_token_type = token
1526
+ return token
1527
+ elsif !token
1528
+ return self.lexer.next_token
1529
+ else
1530
+ return [false, false]
1531
+ end
1532
+ end
1533
+
1534
+ def on_error(et, ev, values)
1535
+ ev = ev.first if ev.instance_of?(Array) && ev.size == 2 && ev.last.is_a?(Integer)
1536
+ super
1537
+ rescue Racc::ParseError => e
1538
+ # I don't like how the exception obscures the error message
1539
+ e.message.replace "%s:%p :: %s" % [self.file, lexer.lineno, e.message.strip]
1540
+ warn e.message if $DEBUG
1541
+ raise
1542
+ end
1543
+
1544
+ ##
1545
+ # Parse +str+ at path +file+ and return a sexp. Raises
1546
+ # Timeout::Error if it runs for more than +time+ seconds.
1547
+
1548
+ def process(str, file = "(string)", time = 10)
1549
+ str.freeze
1550
+
1551
+ Timeout.timeout time do
1552
+ raise "bad val: #{str.inspect}" unless String === str
1553
+
1554
+ self.lexer.string = handle_encoding str
1555
+
1556
+ self.file = file.dup
1557
+
1558
+ @yydebug = ENV.has_key? "DEBUG"
1559
+
1560
+ do_parse
1561
+ end
1562
+ end
1563
+
1564
+ alias parse process
1565
+
1566
+ def remove_begin node
1567
+ line = node.line
1568
+
1569
+ node = node.last while node and node.sexp_type == :begin and node.size == 2
1570
+
1571
+ node = s(:nil) if node == s(:begin)
1572
+
1573
+ node.line ||= line
1574
+
1575
+ node
1576
+ end
1577
+
1578
+ alias value_expr remove_begin # TODO: for now..? could check the tree, but meh?
1579
+
1580
+ def reset
1581
+ lexer.reset
1582
+ self.in_def = false
1583
+ self.in_single = 0
1584
+ self.env.reset
1585
+ self.comments.clear
1586
+ self.last_token_type = nil
1587
+ end
1588
+
1589
+ def ret_args node
1590
+ if node then
1591
+ raise "write a test 5" if node.sexp_type == :block_pass
1592
+
1593
+ raise SyntaxError, "block argument should not be given" if
1594
+ node.sexp_type == :block_pass
1595
+
1596
+ node.sexp_type = :array if node.sexp_type == :call_args
1597
+ node = node.last if node.sexp_type == :array && node.size == 2
1598
+
1599
+ # HACK matz wraps ONE of the FOUR splats in a newline to
1600
+ # distinguish. I use paren for now. ugh
1601
+ node = s(:svalue, node).line node.line if node.sexp_type == :splat and not node.paren
1602
+ node.sexp_type = :svalue if node.sexp_type == :arglist && node[1].sexp_type == :splat
1603
+ end
1604
+
1605
+ node
1606
+ end
1607
+
1608
+ def s(*args)
1609
+ result = Sexp.new(*args)
1610
+ # result.line ||= lexer.lineno if lexer.ss unless ENV["CHECK_LINE_NUMS"] # otherwise...
1611
+ result.file = self.file
1612
+ result
1613
+ end
1614
+
1615
+ def debug n
1616
+ if ENV["PRY"] then
1617
+ require "pry"; binding.pry
1618
+ end
1619
+
1620
+ raise RubyParser::SyntaxError, "debug #{n}"
1621
+ end
1622
+
1623
+ def syntax_error msg
1624
+ raise RubyParser::SyntaxError, msg
1625
+ end
1626
+
1627
+ alias yyerror syntax_error
1628
+
1629
+ def void_stmts node
1630
+ return nil unless node
1631
+ return node unless node.sexp_type == :block
1632
+
1633
+ if node.respond_to? :sexp_body= then
1634
+ node.sexp_body = node.sexp_body.map { |n| remove_begin n }
1635
+ else
1636
+ node[1..-1] = node[1..-1].map { |n| remove_begin(n) }
1637
+ end
1638
+
1639
+ node
1640
+ end
1641
+
1642
+ def warning s
1643
+ # do nothing for now
1644
+ end
1645
+
1646
+ def whitespace_width line, remove_width = nil
1647
+ col = 0
1648
+ idx = 0
1649
+
1650
+ line.chars.each do |c|
1651
+ break if remove_width && col >= remove_width
1652
+ case c
1653
+ when " " then
1654
+ col += 1
1655
+ when "\t" then
1656
+ n = TAB_WIDTH * (col / TAB_WIDTH + 1)
1657
+ break if remove_width && n > remove_width
1658
+ col = n
1659
+ else
1660
+ break
1661
+ end
1662
+ idx += 1
1663
+ end
1664
+
1665
+ if remove_width then
1666
+ line[idx..-1]
1667
+ elsif line[idx] == "\n"
1668
+ nil
1669
+ else
1670
+ col
1671
+ end
1672
+ end
1673
+
1674
+ alias remove_whitespace_width whitespace_width
1675
+
1676
+ def wrap type, node
1677
+ value, line = node
1678
+ value = value.to_sym if value.respond_to? :to_sym
1679
+ s(type, value).line line
1680
+ end
1681
+
1682
+ class Keyword
1683
+ include RubyLexer::State::Values
1684
+
1685
+ class KWtable
1686
+ attr_accessor :name, :state, :id0, :id1
1687
+ def initialize(name, id=[], state=nil)
1688
+ @name = name
1689
+ @id0, @id1 = id
1690
+ @state = state
1691
+ end
1692
+ end
1693
+
1694
+ ##
1695
+ # :stopdoc:
1696
+ #
1697
+ # :expr_beg = ignore newline, +/- is a sign.
1698
+ # :expr_end = newline significant, +/- is an operator.
1699
+ # :expr_endarg = ditto, and unbound braces.
1700
+ # :expr_endfn = ditto, and unbound braces.
1701
+ # :expr_arg = newline significant, +/- is an operator.
1702
+ # :expr_cmdarg = ditto
1703
+ # :expr_mid = ditto
1704
+ # :expr_fname = ignore newline, no reserved words.
1705
+ # :expr_dot = right after . or ::, no reserved words.
1706
+ # :expr_class = immediate after class, no here document.
1707
+ # :expr_label = flag bit, label is allowed.
1708
+ # :expr_labeled = flag bit, just after a label.
1709
+ # :expr_fitem = symbol literal as FNAME.
1710
+ # :expr_value = :expr_beg -- work to remove. Need multi-state support.
1711
+
1712
+ expr_woot = EXPR_FNAME|EXPR_FITEM
1713
+
1714
+ wordlist = [
1715
+ ["alias", [:kALIAS, :kALIAS ], expr_woot ],
1716
+ ["and", [:kAND, :kAND ], EXPR_BEG ],
1717
+ ["begin", [:kBEGIN, :kBEGIN ], EXPR_BEG ],
1718
+ ["break", [:kBREAK, :kBREAK ], EXPR_MID ],
1719
+ ["case", [:kCASE, :kCASE ], EXPR_BEG ],
1720
+ ["class", [:kCLASS, :kCLASS ], EXPR_CLASS ],
1721
+ ["def", [:kDEF, :kDEF ], EXPR_FNAME ],
1722
+ ["defined?", [:kDEFINED, :kDEFINED ], EXPR_ARG ],
1723
+ ["do", [:kDO, :kDO ], EXPR_BEG ],
1724
+ ["else", [:kELSE, :kELSE ], EXPR_BEG ],
1725
+ ["elsif", [:kELSIF, :kELSIF ], EXPR_BEG ],
1726
+ ["end", [:kEND, :kEND ], EXPR_END ],
1727
+ ["ensure", [:kENSURE, :kENSURE ], EXPR_BEG ],
1728
+ ["false", [:kFALSE, :kFALSE ], EXPR_END ],
1729
+ ["for", [:kFOR, :kFOR ], EXPR_BEG ],
1730
+ ["if", [:kIF, :kIF_MOD ], EXPR_BEG ],
1731
+ ["in", [:kIN, :kIN ], EXPR_BEG ],
1732
+ ["module", [:kMODULE, :kMODULE ], EXPR_BEG ],
1733
+ ["next", [:kNEXT, :kNEXT ], EXPR_MID ],
1734
+ ["nil", [:kNIL, :kNIL ], EXPR_END ],
1735
+ ["not", [:kNOT, :kNOT ], EXPR_ARG ],
1736
+ ["or", [:kOR, :kOR ], EXPR_BEG ],
1737
+ ["redo", [:kREDO, :kREDO ], EXPR_END ],
1738
+ ["rescue", [:kRESCUE, :kRESCUE_MOD ], EXPR_MID ],
1739
+ ["retry", [:kRETRY, :kRETRY ], EXPR_END ],
1740
+ ["return", [:kRETURN, :kRETURN ], EXPR_MID ],
1741
+ ["self", [:kSELF, :kSELF ], EXPR_END ],
1742
+ ["super", [:kSUPER, :kSUPER ], EXPR_ARG ],
1743
+ ["then", [:kTHEN, :kTHEN ], EXPR_BEG ],
1744
+ ["true", [:kTRUE, :kTRUE ], EXPR_END ],
1745
+ ["undef", [:kUNDEF, :kUNDEF ], expr_woot ],
1746
+ ["unless", [:kUNLESS, :kUNLESS_MOD ], EXPR_BEG ],
1747
+ ["until", [:kUNTIL, :kUNTIL_MOD ], EXPR_BEG ],
1748
+ ["when", [:kWHEN, :kWHEN ], EXPR_BEG ],
1749
+ ["while", [:kWHILE, :kWHILE_MOD ], EXPR_BEG ],
1750
+ ["yield", [:kYIELD, :kYIELD ], EXPR_ARG ],
1751
+ ["BEGIN", [:klBEGIN, :klBEGIN ], EXPR_END ],
1752
+ ["END", [:klEND, :klEND ], EXPR_END ],
1753
+ ["__FILE__", [:k__FILE__, :k__FILE__ ], EXPR_END ],
1754
+ ["__LINE__", [:k__LINE__, :k__LINE__ ], EXPR_END ],
1755
+ ["__ENCODING__", [:k__ENCODING__, :k__ENCODING__], EXPR_END],
1756
+ ].map { |args|
1757
+ KWtable.new(*args)
1758
+ }
1759
+
1760
+ # :startdoc:
1761
+
1762
+ WORDLIST = Hash[*wordlist.map { |o| [o.name, o] }.flatten]
1763
+
1764
+ def self.keyword str
1765
+ WORDLIST[str]
1766
+ end
1767
+ end
1768
+
1769
+ class Environment
1770
+ attr_reader :env, :dyn
1771
+
1772
+ def [] k
1773
+ self.all[k]
1774
+ end
1775
+
1776
+ def []= k, v
1777
+ raise "no" if v == true
1778
+ self.current[k] = v
1779
+ end
1780
+
1781
+ def all
1782
+ idx = @dyn.index(false) || 0
1783
+ @env[0..idx].reverse.inject { |env, scope| env.merge scope }
1784
+ end
1785
+
1786
+ def current
1787
+ @env.first
1788
+ end
1789
+
1790
+ def extend dyn = false
1791
+ @dyn.unshift dyn
1792
+ @env.unshift({})
1793
+ end
1794
+
1795
+ def initialize dyn = false
1796
+ @dyn = []
1797
+ @env = []
1798
+ self.reset
1799
+ end
1800
+
1801
+ def reset
1802
+ @dyn.clear
1803
+ @env.clear
1804
+ self.extend
1805
+ end
1806
+
1807
+ def unextend
1808
+ @dyn.shift
1809
+ @env.shift
1810
+ raise "You went too far unextending env" if @env.empty?
1811
+ end
1812
+ end
1813
+
1814
+ class StackState
1815
+ attr_reader :name
1816
+ attr_reader :stack
1817
+ attr_accessor :debug
1818
+
1819
+ def initialize name, debug=false
1820
+ @name = name
1821
+ @stack = [false]
1822
+ @debug = debug
1823
+ end
1824
+
1825
+ def inspect
1826
+ "StackState(#{@name}, #{@stack.inspect})"
1827
+ end
1828
+
1829
+ def is_in_state
1830
+ log :is_in_state if debug
1831
+ @stack.last
1832
+ end
1833
+
1834
+ def lexpop
1835
+ raise if @stack.size == 0
1836
+ a = @stack.pop
1837
+ b = @stack.pop
1838
+ @stack.push(a || b)
1839
+ log :lexpop if debug
1840
+ end
1841
+
1842
+ def log action
1843
+ c = caller[1]
1844
+ c = caller[2] if c =~ /expr_result/
1845
+ warn "%s_stack.%s: %p at %s" % [name, action, @stack, c.clean_caller]
1846
+ nil
1847
+ end
1848
+
1849
+ def pop
1850
+ r = @stack.pop
1851
+ @stack.push false if @stack.empty?
1852
+ log :pop if debug
1853
+ r
1854
+ end
1855
+
1856
+ def push val
1857
+ @stack.push val
1858
+ log :push if debug
1859
+ end
1860
+
1861
+ def reset
1862
+ @stack = [false]
1863
+ log :reset if debug
1864
+ end
1865
+
1866
+ def restore oldstate
1867
+ @stack.replace oldstate
1868
+ log :restore if debug
1869
+ end
1870
+
1871
+ def store base = false
1872
+ result = @stack.dup
1873
+ @stack.replace [base]
1874
+ log :store if debug
1875
+ result
1876
+ end
1877
+ end
1878
+ end