From c70437e2deb06b21a1cf81e167e2d43db7c4171f Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 9 Dec 2020 23:07:40 +0530 Subject: [PATCH] Correct offenses reported by RuboCop 1.6.0 --- lib/jekyll/convertible.rb | 2 +- lib/jekyll/document.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index b5b6bf54..b9f7a93f 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -41,7 +41,7 @@ module Jekyll begin self.content = File.read(filename, **Utils.merged_file_read_opts(site, opts)) if content =~ Document::YAML_FRONT_MATTER_REGEXP - self.content = $POSTMATCH + self.content = Regexp.last_match.post_match self.data = SafeYAML.load(Regexp.last_match(1)) end rescue Psych::SyntaxError => e diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 89243dd6..e5c19a10 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -483,7 +483,7 @@ module Jekyll def read_content(**opts) self.content = File.read(path, **Utils.merged_file_read_opts(site, opts)) if content =~ YAML_FRONT_MATTER_REGEXP - self.content = $POSTMATCH + self.content = Regexp.last_match.post_match data_file = SafeYAML.load(Regexp.last_match(1)) merge_data!(data_file, :source => "YAML front matter") if data_file end