lib/hanami/middleware/trie.rb in hanami-router-2.0.2 vs lib/hanami/middleware/trie.rb in hanami-router-2.1.0.beta1
- old
+ new
@@ -1,8 +1,8 @@
# frozen_string_literal: true
-require_relative "./node"
+require_relative "node"
module Hanami
module Middleware
# Trie to register scopes with custom Rack middleware
#
@@ -59,10 +59,10 @@
private
# @api private
# @since 2.0.0
def for_each_segment(path, &blk)
- _, *segments = path.split(/\//)
+ _, *segments = path.split("/")
segments.each(&blk)
end
end
end
end