From: Albert Schlef Date: 2011-04-05T23:13:53+09:00 Subject: Re: Tk and Tile with Tk8.5 Hidetoshi NAGAI wrote in post #990904: > The following depend on an unofficial feature of ruby's dll loading. > At present, it will work. But I don't recomment it. > [...] > (2) Create loader script "tcltklib.rb" at ruby's library directory > (.e.g /usr/lib/ruby/1.8). > For example, > ----- tcltklib.rb ----------------------------------------- > ver = ENV['RUBYTK_VERSION'] > if ver && !ver.empty? > require "tcltklib.#{ver}.so" > else > require "tcltklib.so" > end Hey, that's a nice trick. Thanks! > The following depend on an unofficial feature of ruby's dll loading. > At present, it will work. But I don't recomment it. BTW, what's here isn't an official feature? I do "ri Kernel#require" and (I think) it describes everything needed to make this work: Ruby first looks for an .rb file (this enables us to inject our loader script), and then it's possible to explicitly load a .so (or .dll). So why isn't your trick future-proof? -- Posted via http://www.ruby-forum.com/.