Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error force encoding #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix error force encoding
  • Loading branch information
clalcantara committed Sep 10, 2021
commit 017f7ae3478a0b1fa4c13060faea1e65e132bfba
2 changes: 1 addition & 1 deletion lib/correios/cep/parser.rb
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ def find_node(nodes, name)
end

def text_for(element)
element.text.nil? ? "" : element.text.force_encoding(Encoding::UTF_8)
element.text.nil? ? "" : element.text.dup.force_encoding(Encoding::UTF_8)
end

def join_complements(address)