#ruby-lang - Wed 14 Mar 2007 between 12:25 and 12:38

NY Lost Funds



Tekhnei actually have this problem with a number of classes and methods
stousetI'm overriding require with my own version for something, but I'd like those changes to _only_ apply to this one file. Is there any way of accomplishing that?
ComaVNstouset: create a new method "myrequire" for this purpose?
stousetComaVN: Not entirely an acceptable option.
ComaVNTekhne: no idea. I can't get 1.8.6 to build on my machine, and there's no binary available yet
Tekhnewell, i had this problem with 1.8.5 too
ComaVNstouset: I'm not sure I get what you're trying to accomplish
Tekhnei just upgraded yesterday
ComaVNTekhne: any special values in RUBYOPT or RUBYLIB env variables?
Tekhnechecking...
ComaVN: no RUBY* env vars set
stousetComaVN: I need to overload the require method for a single source file, so that my changes _don't_ get propagated to every require in the entire project.
ajehow can i make RoR scaffold a custom database table name?
chris2-> #rubyonrails
stousetComaVN: I may end up going with your original suggestion, but if it's at all possible to do it elsewise, I'd prefer that.
ComaVNbut... why? is that single source file not under your control?
Tekhne: does irb show two versions of included too? -> irb --readline -r irb/completion
TekhneComaVN: i'm not sure i know what you mean. how would i check?
maybe this has something to do with facets
i'm going to try uninstalling facets and see what happens
hmm, now it works
it's facets
ComaVNstart irb with autocompletion, and see if it shows Module.included twice
stousetComaVN: Exactly :)
TekhneComaVN: so, i just hit tab to complete like in bash?
ComaVNTekhne: yes
irb --readline -r irb/completion
Tekhnetab doesn't complete anything
wait
sorry
haha
i typed # instead of .
now it works
ComaVNstouset: I think you can redefine Kernel#require before your call to require 'mysinglespecialfile'
Tekhnebut it doesn't complete with included
Boungahi
ComaVNand then remove your definition after it
stousetComaVN: Right, but again, I don't want that being propagated out.
ComaVNTekhne: Module.included
zwergIs it possible to use irb as a bash-substitute? :)

Page: 2 9 16 23 30 37 44 51 

IrcArchive

NY Lost Funds