On 2013/03/26 09:21, Jeremy Evans wrote:
> On 03/26 10:02, Stuart Henderson wrote:
> > My thought is not so much about speed, it's about patching unexpected
> > instances of the text. I do wonder why it isn't restricted to #! lines too
> > actually.
> 
> FWIW, sthen, you did OK it when it went in (ruby.port.mk r1.28). :)

The difference is that r1.28 is when this was first added, so there
are no surprises, if you pass a file through MODRUBY_RUBY_ADJ you know
what you're getting and can test it during porting - whereas changing
the behaviour of an existing fragment needs more attention ;)

> I'm concerned about unexpected changes as well.  python.port.mk
> restricts the change to the first line, and that is probably a wise
> decision.  Maybe we should make ruby.port.mk more similar to
> python.port.mk:
> 
> MODRUBY_RUBY_ADJ =        perl -pi \
>                 -e '$$. == 1 && s|^.*env ruby.*$$|\#!${RUBY}|;' \
>                 -e '$$. == 1 && s|^.*bin/ruby.*$$|\#!${RUBY}|;' \
>                 -e 'close ARGV if eof;'
> 
> I looked at tcl.port.mk, and they have something slightly more complex,
> which does not change just the shebang lines, but also some exec calls
> in the first 30 lines.  I don't think we want that for ruby.

agreed.

Reply via email to