tpope / pickler

PIvotal traCKer Liaison to cucumbER
MIT License
299 stars 23 forks source link

The header # -*- coding: utf-8 -*- is removed by git pull #5

Closed claudiob closed 14 years ago

claudiob commented 14 years ago

Some of my features contain Unicode characters. For Ruby 1.9 compatibility, these files should begin with the line:

# -*- coding: utf-8 -*-

However, if I write this line above the line: @https://www.pivotaltracker.com/story/show/... introduced by the pickler pull command, the line gets removed once I pickler push and pickler pull.

tpope commented 14 years ago

I've done this before and only needed a header in the step definition, not the feature. I'm assuming something has changed. Apparently my 1.9 environment is now broken so I can't confirm. While I work on rectifying that, can you link me to some sort of explanation of how this header works? I can't find the magic Google query.

mguterl commented 14 years ago

They call them "magic comments", you can find out more here: http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings

tpope commented 14 years ago

Okay, I took a crude stab at solving this. It should automatically add the magic comment when necessary.