Skip to content

Commit 7ce2dcf

Browse files
committed
Workaround for [error] cannot find compatible overloading of method system of type ::RubyHeaderParser::Parser
``` lib/ruby_header_parser/parser.rb:150:8: [error] Cannot find compatible overloading of method `system` of type `::RubyHeaderParser::Parser` │ Method types: │ def system: (::String, *::String, ?unsetenv_others: ::boolish, ?pgroup: (true | ::Integer), ?umask: ::Integer, ?in: ::Kernel::redirect_fd, ?out: ::Kernel::redirect_fd, ?err: ::Kernel::redirect_fd, ?close_others: ::boolish, ?chdir: ::String) -> (::NilClass | ::FalseClass | ::TrueClass) │ | (::Hash[::string, (::string | nil)], ::String, *::String, ?unsetenv_others: ::boolish, ?pgroup: (true | ::Integer), ?umask: ::Integer, ?in: ::Kernel::redirect_fd, ?out: ::Kernel::redirect_fd, ?err: ::Kernel::redirect_fd, ?close_others: ::boolish, ?chdir: ::String) -> (::NilClass | ::FalseClass | ::TrueClass) │ │ Diagnostic ID: Ruby::UnresolvedOverloading │ └ system("gcc -E #{include_args} #{header_file} -o #{dist_preprocessed_header_file}", exception: true) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
1 parent d2f5267 commit 7ce2dcf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ruby_header_parser.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
2626
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
2727
ls.readlines("\x0", chomp: true).reject do |f|
2828
(f == gemspec) ||
29-
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
29+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile sig/non-gemify])
3030
end
3131
end
3232
spec.bindir = "exe"

sig/non-gemify/kernel.rbs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Kernel
2+
# FIXME: monkey patch for `exception` arg of `Kernel.system`
3+
def self?.system: (String command, *String args, ?unsetenv_others: boolish, ?pgroup: true | Integer, ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String, ?exception: bool) -> (NilClass | FalseClass | TrueClass)
4+
| (Hash[string, string?] env, String command, *String args, ?unsetenv_others: boolish, ?pgroup: true | Integer, ?umask: Integer, ?in: redirect_fd, ?out: redirect_fd, ?err: redirect_fd, ?close_others: boolish, ?chdir: String, ?exception: bool) -> (NilClass | FalseClass | TrueClass)
5+
| ...
6+
end

0 commit comments

Comments
 (0)