From d8f48643644e7d54161fbd94acd717820f833128 Mon Sep 17 00:00:00 2001 From: benklop Date: Mon, 13 Nov 2023 12:10:43 -0700 Subject: [PATCH 1/2] correct perfect_toml.rbs syntax I was getting parsing errors when SolarGraph tried to open this RBS file. --- sig/perfect_toml.rbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sig/perfect_toml.rbs b/sig/perfect_toml.rbs index be3c9b9..1248cca 100644 --- a/sig/perfect_toml.rbs +++ b/sig/perfect_toml.rbs @@ -4,9 +4,9 @@ module PerfectTOML def self.parse: (String toml_src, symbolize_names: bool) -> untyped def self.load_file: (String filename, symbolize_names: bool) -> untyped | (IO io, symbolize_names: bool) -> untyped - def self.generate: ( - def self.save_file: (String filename, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> String) -> void - | (IO io, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> String) -> void + def self.generate: (untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> String + def self.save_file: (String filename, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> IO + | (IO io, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> IO class LocalDateTime def initialize: (untyped year, untyped month, untyped day, untyped hour, untyped min, untyped sec) -> void From 5e8a4feed42bfeb97f2ba6b3626f8071cc84530d Mon Sep 17 00:00:00 2001 From: benklop Date: Tue, 14 Nov 2023 17:11:14 -0700 Subject: [PATCH 2/2] keep save_file returning a void type --- sig/perfect_toml.rbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sig/perfect_toml.rbs b/sig/perfect_toml.rbs index 1248cca..191ac41 100644 --- a/sig/perfect_toml.rbs +++ b/sig/perfect_toml.rbs @@ -5,8 +5,8 @@ module PerfectTOML def self.load_file: (String filename, symbolize_names: bool) -> untyped | (IO io, symbolize_names: bool) -> untyped def self.generate: (untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> String - def self.save_file: (String filename, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> IO - | (IO io, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> IO + def self.save_file: (String filename, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> void + | (IO io, untyped data, sort_keys: boolean, use_literal_string: boolean, use_multiline_string: boolean, use_dot: boolean) -> void class LocalDateTime def initialize: (untyped year, untyped month, untyped day, untyped hour, untyped min, untyped sec) -> void