From 088c54ea0a3718471d8bf1e48bed6ab4448b8d54 Mon Sep 17 00:00:00 2001 From: maxtaran2010 Date: Fri, 10 Jul 2026 00:53:09 +0300 Subject: [PATCH] Fix typos in comments and string literals Fix minor spelling mistakes found by codespell: - hierachy -> hierarchy (context.rb) - performace -> performance (expression.rb) - agressive -> aggressive (trim_mode_test.rb) - overriden -> overridden (strainer_template_unit_test.rb) Co-Authored-By: Claude Sonnet 4.6 --- lib/liquid/context.rb | 2 +- lib/liquid/expression.rb | 2 +- test/integration/trim_mode_test.rb | 4 ++-- test/unit/strainer_template_unit_test.rb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/liquid/context.rb b/lib/liquid/context.rb index 30492578e..c4fa5e997 100644 --- a/lib/liquid/context.rb +++ b/lib/liquid/context.rb @@ -200,7 +200,7 @@ def evaluate(object) object.respond_to?(:evaluate) ? object.evaluate(self) : object end - # Fetches an object starting at the local scope and then moving up the hierachy + # Fetches an object starting at the local scope and then moving up the hierarchy def find_variable(key, raise_on_not_found: true) # This was changed from find() to find_index() because this is a very hot # path and find_index() is optimized in MRI to reduce object allocation diff --git a/lib/liquid/expression.rb b/lib/liquid/expression.rb index 7e15f85b0..b74955d24 100644 --- a/lib/liquid/expression.rb +++ b/lib/liquid/expression.rb @@ -14,7 +14,7 @@ class Expression 'blank' => '', 'empty' => '', # in lax mode, minus sign can be a VariableLookup - # For simplicity and performace, we treat it like a literal + # For simplicity and performance, we treat it like a literal '-' => VariableLookup.parse("-", nil).freeze, }.freeze diff --git a/test/integration/trim_mode_test.rb b/test/integration/trim_mode_test.rb index a0a59089b..b40aac192 100644 --- a/test/integration/trim_mode_test.rb +++ b/test/integration/trim_mode_test.rb @@ -108,14 +108,14 @@ def test_standard_tags assert_template_result(expected, text) end - # Make sure the trim isn't too agressive + # Make sure the trim isn't too aggressive def test_no_trim_output text = '

{{- \'John\' -}}

' expected = '

John

' assert_template_result(expected, text) end - # Make sure the trim isn't too agressive + # Make sure the trim isn't too aggressive def test_no_trim_tags text = '

{%- if true -%}yes{%- endif -%}

' expected = '

yes

' diff --git a/test/unit/strainer_template_unit_test.rb b/test/unit/strainer_template_unit_test.rb index aa3f153a3..9389ec4f1 100644 --- a/test/unit/strainer_template_unit_test.rb +++ b/test/unit/strainer_template_unit_test.rb @@ -20,7 +20,7 @@ module PrivateMethodOverrideFilter private def public_filter - "overriden as private" + "overridden as private" end end @@ -39,7 +39,7 @@ module ProtectedMethodOverrideFilter protected def public_filter - "overriden as protected" + "overridden as protected" end end