Skip to content

Commit

Permalink
⛳ else + if = elsif
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jan 17, 2017
1 parent dc01a40 commit 8e2feed
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions activesupport/lib/active_support/core_ext/string/output_safety.rb
Expand Up @@ -152,18 +152,16 @@ def initialize
def [](*args)
if args.size < 2
super
else
if html_safe?
new_safe_buffer = super

if new_safe_buffer
new_safe_buffer.instance_variable_set :@html_safe, true
end
elsif html_safe?
new_safe_buffer = super

new_safe_buffer
else
to_str[*args]
if new_safe_buffer
new_safe_buffer.instance_variable_set :@html_safe, true
end

new_safe_buffer
else
to_str[*args]
end
end

Expand Down

0 comments on commit 8e2feed

Please sign in to comment.