Skip to content

Commit 2420fd4

Browse files
committed
Workaround for Ruby::ArgumentTypeMismatch
``` lib/ruby_header_parser/data.rb:11:33: [error] Cannot pass a value of type `(::String | nil)` as an argument of type `::string` │ (::String | nil) <: ::string │ (::String | nil) <: (::String | ::_ToStr) │ nil <: (::String | ::_ToStr) │ nil <: ::String │ │ Diagnostic ID: Ruby::ArgumentTypeMismatch │ └ yaml = File.read(File.join(__dir__, "data.yml")) ~~~~~~~ ```
1 parent 9a12339 commit 2420fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby_header_parser/data.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Data
88
attr_reader :data
99

1010
def initialize
11-
yaml = File.read(File.join(__dir__, "data.yml"))
11+
yaml = File.read(File.join(__dir__.to_s, "data.yml"))
1212
@data = YAML.safe_load(yaml, aliases: true, permitted_classes: [Regexp])
1313
end
1414

0 commit comments

Comments
 (0)