specify source encoding for a test file with a snowman in it #987

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

djmitche commented Jul 31, 2012

As part of my quest to get the tests running, I ran into

 /Users/dustin/.rvm/gems/ruby-1.9.3-p194@puppetlabs/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load': /Users/dustin/code/moz/t/puppetlabs/puppet/spec/unit/ssl/certificate_authority_spec.rb:502: invalid multibyte char (US-ASCII) (SyntaxError)

It seems like my default source encoding is UTF-8:

dustin@Lorentz ~/code/moz/t/puppetlabs/puppet [set-source-encoding] $ ruby
p __ENCODING__
#<Encoding:UTF-8>

but at any rate this change fixed things, and would certainly be required for anyone with a different default source encoding.

Contributor

zaphod42 commented Aug 1, 2012

2.7 doesn't fully work with ruby 1.9, so you might have an uphill battle getting these all to work. I can pull this in for 3.x, which does fully support ruby 1.9.3.

Contributor

djmitche commented Aug 1, 2012

Ah, I'll see if I can get 1.8 installed - thanks.

Contributor

pcarlisle commented Aug 2, 2012

This is in 3.x in a different form. We should backport 614ee9c to 2.7.x

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