Skip to content

Commit

Permalink
Use beginless ranges when possible
Browse files Browse the repository at this point in the history
The new syntax was introduced back on Ruby v2.7 [1]

[1] - https://ruby-doc.org/core-2.7.0/Range.html#class-Range-label-Beginless-2FEndless+Ranges
  • Loading branch information
waiting-for-dev committed Jan 11, 2023
1 parent fb347f7 commit 25f0428
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/app/views/spree/admin/taxons/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<% if @taxon.parent %>
<div class="input-group-prepend">
<span class="input-group-text">
<%= @taxon.permalink.split('/')[0...-1].join('/') + '/' %>
<%= @taxon.permalink.split('/')[...-1].join('/') + '/' %>
</span>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion core/lib/spree/testing_support/order_walkthrough.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def up_to(state, user: nil)
states
else
end_state_position = states.index(state.to_sym)
states[0..end_state_position]
states[..end_state_position]
end

states_to_process.each do |state_to_process|
Expand Down

0 comments on commit 25f0428

Please sign in to comment.