Skip to content

Commit 4d8929f

Browse files
committed
Remove Debug module
1 parent b850794 commit 4d8929f

10 files changed

Lines changed: 187 additions & 216 deletions

File tree

Steepfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ target :lib do
88
check "lib"
99

1010
# TODO: Type-checking these files is still WIP
11-
ignore "lib/prism/debug.rb"
1211
ignore "lib/prism/desugar_compiler.rb"
1312
ignore "lib/prism/lex_compat.rb"
1413
ignore "lib/prism/serialize.rb"

lib/prism.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ module Prism
1313

1414
autoload :BasicVisitor, "prism/visitor"
1515
autoload :Compiler, "prism/compiler"
16-
autoload :Debug, "prism/debug"
1716
autoload :DesugarCompiler, "prism/desugar_compiler"
1817
autoload :Dispatcher, "prism/dispatcher"
1918
autoload :DotVisitor, "prism/dot_visitor"
@@ -32,7 +31,6 @@ module Prism
3231
# Some of these constants are not meant to be exposed, so marking them as
3332
# private here.
3433

35-
private_constant :Debug
3634
private_constant :LexCompat
3735
private_constant :LexRipper
3836

lib/prism/debug.rb

Lines changed: 0 additions & 206 deletions
This file was deleted.

lib/prism/ffi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def dump_options(options)
394394

395395
template << "L"
396396
if (encoding = options[:encoding])
397-
name = encoding.name
397+
name = encoding.is_a?(Encoding) ? encoding.name : encoding
398398
values.push(name.bytesize, name.b)
399399
template << "A*"
400400
else

prism.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Gem::Specification.new do |spec|
7070
"include/prism/version.h",
7171
"lib/prism.rb",
7272
"lib/prism/compiler.rb",
73-
"lib/prism/debug.rb",
7473
"lib/prism/desugar_compiler.rb",
7574
"lib/prism/dispatcher.rb",
7675
"lib/prism/dot_visitor.rb",

rakelib/typecheck.rake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ namespace :typecheck do
3131

3232
File.write("sorbet/typed_overrides.yml", ERB.new(<<~YAML, trim_mode: "-").result_with_hash(locals))
3333
false:
34-
- ./lib/prism/debug.rb
3534
- ./lib/prism/lex_compat.rb
3635
- ./lib/prism/node_ext.rb
3736
- ./lib/prism/parse_result.rb

test/prism/comments_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Prism
66
class CommentsTest < TestCase
77
def test_comment_inline
88
source = "# comment"
9-
assert_equal [0], Debug.newlines(source)
9+
assert_equal [0], Prism.parse(source).source.offsets
1010

1111
assert_comment(
1212
source,

0 commit comments

Comments
 (0)