Base#adapt_source modifies input string in-place #40

Closed
ddfreyne opened this Issue Mar 11, 2013 · 1 comment

Comments

Projects
None yet
2 participants

Kramdown::Parser::Base#adapt_source modifies the encoding of the input string in-place (source). I don’t believe it should; input arguments should not be touched.

Possible fix: replace

source.encode!('UTF-8')

with

source = source.encode('UTF-8')

(Related nanoc issues: nanoc/nanoc#276, nanoc/nanoc#277)

@ghost ghost assigned gettalong Mar 11, 2013

Owner

gettalong commented Mar 11, 2013

Yep, you are right.

@gettalong gettalong closed this Mar 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment