Keep magic comments at the top of generated files #30

Merged
merged 1 commit into from Feb 3, 2013

Projects

None yet

2 participants

@kemitchell

At present the comments are preserved, but the auto-generation notice bumps them down below line 1 where they've no effect.

The documentation comment on the syntax of magic comments is:

https://github.com/ruby/ruby/blob/7ea675732ac1dac72f07756498706678d8725719/encoding.c#L1697

The added regex test tracks the doc comment, except I don't bother checking the encoding string (say, with Encoding.find($2)), as I figure that's Ruby's business and users will find out soon enough if they've botched an encoding string.

@cjheath cjheath merged commit 5ecfa5e into nathansobo:master Feb 3, 2013
@cjheath
Collaborator
cjheath commented Jun 4, 2013

Apparently I pushed this to nathansobo's repo, not to mine - which is where I release from. Sorry. By today I'd forgotten that your patch existed, needed it, wrote it, republished the gem, and only found your pull request when I went to the mailing list archive to notify interested parties that 1.4.14 now has a fox for this. D'oh! But anyhow, it's fixed, and the new gem is released.

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