Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source "https://rubygems.org"
# gemspec
#end

gem "prism", ">= 1.0.0"
gem "prism", ">= 1.4.0"

group :development do
gem "rake"
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GEM
docile (1.4.0)
logger (1.6.0)
power_assert (2.0.3)
prism (1.0.0)
prism (1.4.0)
rake (13.2.1)
simplecov (0.22.0)
docile (~> 1.1)
Expand All @@ -30,7 +30,7 @@ PLATFORMS

DEPENDENCIES
coverage-helpers
prism (>= 1.0.0)
prism (>= 1.4.0)
rake
rbs!
simplecov
Expand All @@ -39,4 +39,4 @@ DEPENDENCIES
test-unit

BUNDLED WITH
2.6.0.dev
2.6.8
3 changes: 1 addition & 2 deletions lib/typeprof/core/ast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ def self.parse_cpath(raw_node, cref)
break
when :constant_path_node, :constant_path_target_node
if raw_node.parent
# temporarily support old Prism https://bugs.ruby-lang.org/issues/20467
names << (raw_node.respond_to?(:name) ? raw_node.name : raw_node.child.name)
names << raw_node.name
raw_node = raw_node.parent
else
return names.reverse
Expand Down
10 changes: 2 additions & 8 deletions lib/typeprof/core/ast/const.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@ def initialize(raw_node, lenv)
@cbase = nil
@toplevel = true
end
# temporarily support old Prism https://bugs.ruby-lang.org/issues/20467
if raw_node.respond_to?(:name)
@cname = raw_node.name
@cname_code_range = TypeProf::CodeRange.from_node(raw_node.name_loc)
else
@cname = raw_node.child.name
@cname_code_range = TypeProf::CodeRange.from_node(raw_node.child.location)
end
@cname = raw_node.name
@cname_code_range = TypeProf::CodeRange.from_node(raw_node.name_loc)
else
raise raw_node.type.to_s
end
Expand Down