Posted by
Liguo Song on
Nov 04, 2003; 10:45pm
URL: http://quantlib.414.s1.nabble.com/More-problems-with-QuantLib-Ruby-tp10416p10419.html
It just became a fashion for me to reply myself. A bad habit. :(
This turn out to be another bug report.
In ruby-1.8 and later (if there is), string and regex pattern cannot
mix together any more in the gsub(). So, please replace the following
two lines in setup.rb:
archDir = Prefix + \
Config::CONFIG["archdir"].gsub("^#{oldPrefix}","")
libDir = Prefix + \
Config::CONFIG["rubylibdir"].gsub("^#{oldPrefix}","")
with the following:
archDir = Prefix + \
Config::CONFIG["archdir"].gsub(/^#{oldPrefix}/,"")
libDir = Prefix + \
Config::CONFIG["rubylibdir"].gsub(/^#{oldPrefix}/,"")
The latter format is support by both ruby 1.6 and 1.8. I hope this would
solve the last problem with QuantLib-Ruby.
Thanks for your guys' patience. :)
Liguo (Leo)
On Wed, 5 Nov 2003, Liguo Song wrote:
> I encountered another problem with QuantLib-Ruby with ruby-1.8.
>
> In the setup.rb, there is
> Config::CONFIG["rubylibdir"].gsub("^#{oldPrefix}","")
> This line of code will give the following warning during the
> installation process:
> warning: string pattern instead of regexp; metacharacters no
> longer effective
>
> The effect of this problem is that the oldPrefix is not cleared as
> intended. It works OK with ruby-1.6 but not ruby-1.8. Some changes in
> ruby must caused this problem. Can any experts in ruby offer any
> solution for this?
>
> Thanks.
>
>
> Liguo (Leo)
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive? Does it
> help you create better code? SHARE THE LOVE, and help us help
> YOU! Click Here:
http://sourceforge.net/donate/> _______________________________________________
> Quantlib-dev mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/quantlib-dev>