Skip to content

Commit

Permalink
Remove reserved word Interrupt to avoid confusion
Browse files Browse the repository at this point in the history
Also resolves rubocop conflicts
  • Loading branch information
shopmike committed Sep 10, 2019
1 parent 1f90a37 commit a5b387c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/liquid/interrupts.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Liquid
# An interrupt is any command that breaks processing of a block (ex: a for loop).
class Interrupt
# A block interrupt is any command that breaks processing of a block (ex: a for loop).
class BlockInterrupt
attr_reader :message

def initialize(message = nil)
Expand All @@ -9,8 +9,8 @@ def initialize(message = nil)
end

# Interrupt that is thrown whenever a {% break %} is called.
class BreakInterrupt < RuntimeError; end
class BreakInterrupt < BlockInterrupt; end

# Interrupt that is thrown whenever a {% continue %} is called.
class ContinueInterrupt < RuntimeError; end
class ContinueInterrupt < BlockInterrupt; end
end

0 comments on commit a5b387c

Please sign in to comment.