summaryrefslogtreecommitdiff
path: root/lib/pry/code
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pry/code')
-rw-r--r--lib/pry/code/code_file.rb4
-rw-r--r--lib/pry/code/loc.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/pry/code/code_file.rb b/lib/pry/code/code_file.rb
index 7ac6ef0e..d120af84 100644
--- a/lib/pry/code/code_file.rb
+++ b/lib/pry/code/code_file.rb
@@ -82,8 +82,8 @@ class Pry
# @param [String] filename
# @param [Symbol] default (:unknown) the file type to assume if none could be
# detected.
- # @return [Symbol, nil] The CodeRay type of a file from its extension, or
- # `nil` if `:unknown`.
+ # @return [Symbol, nil] The SyntaxHighlighter type of a file from its
+ # extension, or `nil` if `:unknown`.
def type_from_filename(filename, default = :unknown)
_, @code_type = EXTENSIONS.find do |k, _|
k.any? { |ext| ext == File.extname(filename) }
diff --git a/lib/pry/code/loc.rb b/lib/pry/code/loc.rb
index 5ec4ed87..905c7693 100644
--- a/lib/pry/code/loc.rb
+++ b/lib/pry/code/loc.rb
@@ -54,7 +54,7 @@ class Pry
# @param [Symbol] code_type
# @return [void]
def colorize(code_type)
- tuple[0] = CodeRay.scan(line, code_type).term
+ tuple[0] = SyntaxHighlighter.highlight(line, code_type)
end
# Prepends the line number `lineno` to the `line`.