Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
<erikh> imperator: hey
NinoScript [NinoScript!~anonymous@pc-50-243-241-201.cm.vtr.net] has joined #ruby-lang
tommyvyo_ [tommyvyo_!~tommyvyo@38.123.129.115] has joined #ruby-lang
<jredville> erikh: doesn't 93 need to not have the array brackets?
<erikh> oh, derp
<erikh> thanks
<jredville> np. i agree that this api is much better than the multi-method one earlier
<erikh> cool.
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby-lang
<Rich_Morin> I need a reliable cross-network locking mechanism to keep some Ruby scripts from colliding. Something like http://code.activestate.com/recipes/252495-gentlemans-locking-simple-cross-thread-and-process/ would be fine, but I'd rather not translate it from Python. Suggestions?
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:1:225:bcff:fedc:e1fe] has joined #ruby-lang
dejongge1 [dejongge1!~jonke@pD9E0DF08.dip0.t-ipconnect.de] has joined #ruby-lang
<hackeron> hey, I have a serial device, I'm trying to open it, I can do sp.readchar to read 1 character at a time, but if I do sp.read it just hangs there - the data from the device always ends with "\u0000" - maybe I'm opening the serial device wrong? any suggestions?
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
<erikh> IO#read reads until eof
<erikh> you're probably never getting an EOF
<injekt> :)
<hackeron> erikh: why would a serial device send EOF?
<erikh> it won't most likely.
<erikh> point is, use a buffer.
<erikh> find a demarcation point (probably that last NULL you're getting) to stop reading.
<hackeron> erikh: it works as expected with other serial devices, but with this one it doesn't seem to understand when it's finished reading
<hackeron> erikh: anyway to specify to read until "\u0000"?
<erikh> not afaik. you'll have to read it n bytes at a time
<erikh> do you know what the structure of the messages you're getting from it are?
<erikh> are they fixed length, null terminated, ?
<hackeron> erikh: I'm trying to create linux software for the device - I've dumped what the windows software does, it looks like this: http://pastie.org/3210765
<erikh> yeah that looks null terminated
<erikh> basically, this is what I'd do, and it's naive at best
<hackeron> erikh: so I just do sp.readchar until the last char is a "\u0000"?
<erikh> read one byte at a time; stop reading when you receive a null
<erikh> right
<hackeron> right, ok, heh
<drbrain> or "\x00" if you don't want to type as much
<erikh> hackeron: what device is this? I'm curious now
<hackeron> drbrain: thanks :)
<erikh> neat!
<drbrain> hackeron: it's more likely the device is 7 bit ASCII than UTF-8
<erikh> ^
<hackeron> erikh: I want to make a web interface for it, so patients take a little mini PC and that device with them - they plug it in every morning and the doctor opens a Web site to diagnose remotely :P -- the windows software for it is kinda shitty and doesn't let you get the actual figures, just ready reports and charts
<hackeron> drbrain: hmm, does it mean I need to open the serial device differently?
<drbrain> hackeron: no
<erikh> hackeron: have you considered a signed java applet?
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
<hackeron> erikh: signed java applet?
<erikh> yes, something that executes on the local machine but without installing any extra software
Xzyx987X_ [Xzyx987X_!~Xzyx987X@c-75-72-121-187.hsd1.mn.comcast.net] has joined #ruby-lang
<erikh> dunno, just seems like a great application for something like that.
<erikh> you hit the site, little window pops up, does the read, fires it off to a server, done
<erikh> user experience is relatively painless
<drbrain> hackeron: if you were comparing a character past 128 like é ruby 1.9 may complain
<drbrain> but 7-bit ascii won't have an é
<hackeron> erikh: most of the patients are pretty old and don't have PCs - thing thing auto switches on when you put it on your finger and when you plug it in, I want a ruby script to fetch the data and upload - I'm thinking a tiny box with 3g :P
<erikh> ah ok
<erikh> sorry to distract ... my brain is just moving at ludicrous speed today
<hackeron> erikh: would a java applet even work? -- it would need to install serial to usb drivers and what not - can't even find a driver for mac
<erikh> /dev/ttyUSB0 should work shouldn't it?
<erikh> err, ttysxxx
<erikh> anyhow
<hackeron> erikh: the device isn't recognised at all on mac and the naming conventions are different so no /dev/ttyUSB even for supported devices - also what if it's a windows box
<erikh> right
<erikh> I get ya
<injekt> hmm
<hackeron> erikh: java applet may be good for facebook mass photo upload, but don't think it would work here
<erikh> sure, I can dig it.
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
<hackeron> erikh: thanks for the serial help, off I go to try to get it working, heh
<erikh> enjoy, and good luck
<hackeron> one more question before I go
<hackeron> this is what it looks like when patient data is downloaded: http://pastie.org/3210828
<hackeron> the binary data is in edf format, so I know how to decode that - but will just reading 1 char at a time work for binary data?
<drbrain> hackeron: yes
<erikh> just keep a buffer
<drbrain> hackeron: if you implement EDF you can have it read intelligently
<drbrain> if a field type is one byte, and type \x01 has a two-byte length you could do something like
<drbrain> type = io.read 1; case type; when '\x01' then len = len_for io.read(2); do_stuff_with io.read len when … end
<drbrain> I might have an example...
<drbrain> hackeron: here's a super-simple binary format: https://github.com/drbrain/temperature_monitor/blob/master/lib/watcher.rb#L41
<hackeron> drbrain: interesting :) - I was planning to just use something like: http://www.teuniz.net/edf2ascii
<drbrain> ah, cool
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-skjjyobjpcywkiro] has joined #ruby-lang
<hackeron> drbrain: thanks for that - I'll have a read through the spec, maybe I'll just implement edf myself. You have any experience with edf? - any ruby code? :P
<drbrain> I don't, but I have experience with reading (and writing) binary data formats
<drbrain> the example I linked comes from an arduino-based temperature monitor I built
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<hackeron> nice :) - guess this should be quite similar
<hackeron> I'll have a look at the spec - guess shouldn't be hard to optimise things a litle even without implementing edf
<erikh> I keep meaning to get arduino stuffs
<drbrain> the fields are SYNC, STATUS, [INT, INT]
<drbrain> where [INT, INT] appears if the STATUS field is "OK"
senj [senj!~senj@S01060026f323bcdf.ed.shawcable.net] has joined #ruby-lang
<drbrain> the SYNC field allows the program to attach to the IO and synchronize at any point in the output
<drbrain> so if you attach during the middle of some bytes appearing it'll wait until the next packet
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<hackeron> it says Signals in EDF(+) are 2-byte integers and this is the full spec http://www.edfplus.info/specs/edfplus.html - will experiment - don't have much experience with binary data formats
<imperator> gem search -r serial
<erikh> a lot of times you can read good formats with String#unpack
<hackeron> drbrain: I guess at least in my case it should never attach in the middle of anything as it always starts with a handshake
<drbrain> hackeron: it shouldn't be too hard since you have a spec
<drbrain> hackeron: yeah, my thermometer constantly streams data
<drbrain> I didn't want to bother with bidirectional communication
<hackeron> drbrain: so those thermometers don't use ascii? - I have a DSC alarm with thermometers - it has an ascii format where it's "checksum command value\r\n" - so I just ignore if I can't verify the checksum if I attach in the middle of a command
<drbrain> I wrote my own protocol to minimize communication time
<hackeron> ah, ok :)
<hackeron> what was the project? home automation or something?
<drbrain> the data is transferred over XBee
<drbrain> yeah
<drbrain> there's a README that describes all the parts at the root
<imperator> Rich_Morin, perhaps the lockfile gem
<drbrain> since I only have three values it wasn't hard
<hackeron> drbrain: hmm, how much did that cost to make?
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
<hackeron> drbrain: oh wait, it says, heh
<drbrain> nothing commercially available met my needs ☹
<hackeron> drbrain: so the xbee receiver is plugged into the arduino uno and then you use a serial to usb to read from it?
<drbrain> temperature sensor + xbee are plugged into the arduino uno
<drbrain> and an xbee on a USB explorer is plugged into a Mac Mini
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
<hackeron> ah, I see
vbatts [vbatts!~vbatts@hashbangbash.com] has joined #ruby-lang
<drbrain> no need for an arduino on the receiving end
<hackeron> is xbee secure communication?
<drbrain> I think the ZigBee protocol has security options
<drbrain> but I'm not seeing any encrypted communication data on the xbee page or on wikipedia
<drbrain> ah, looks like the 802.15.4 has symmetric encryption options too
<drbrain> I'm going to shovel some snow now
jmontross [jmontross!~Adium@static-96-236-65-137.snfcca.dsl-w.verizon.net] has quit [#ruby-lang]
<Rich_Morin> imperator: that looks very promising; tnx!
<hackeron> drbrain: heh, make an adruino snow shoveler thingie ;)
<zenspider> drbrain: hah! beat you!
vbatts [vbatts!~vbatts@hashbangbash.com] has joined #ruby-lang
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
<erikh> someone did that a few years ago in philly
<erikh> let me see if I can find the video
<hackeron> erikh: neat, need to get myself an arduino
<erikh> bah, no dice... but there are plenty of others on youtube
<erikh> this one was the roomba of snowblowers
<erikh> pretty awesome really
<hackeron> link?
<erikh> yeah I can't seem to find it
drdr [drdr!d059b08f@gateway/web/freenode/ip.208.89.176.143] has joined #ruby-lang
<hackeron> hmm, I'm reading from the serial device and doing a sanity check - I'm doing if not o == "Handshake" raise 'Expected "Handshake" got "%s"' % o
<hackeron> and I'm getting: test_spo.rb:20:in `<main>': Expected "Handshake" got "Handshake" (RuntimeError)
<hackeron> hmmm???
<zenspider> not all handshakes are the same
<zenspider> switch to %p and nuke your quotes
<zenspider> if not o == ?
<zenspider> either do unless o == or if o !=
<hackeron> ahhh: "Expected Handshake got Handshake\x00"
<zenspider> there ya go
<zenspider> %p is basically inspect. quite nice
<hackeron> :)
<jaafar> Anyone ever made an "each" method in the Embedded API?
<zenspider> meaning an iter function?
<jaafar> I'm not quite sure how it should work
<jaafar> zenspider: that's right
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has quit [#ruby-lang]
<zenspider> jaafar: have you taken a look at README.EXT?
<jaafar> Tried to get SWIG to do it, but that wants to make C++ (STL) style iterators
<hackeron> seems a bit unreliable - sometimes I get "andshake\x00" -- maybe I'm opening the serial device wrong? :/
<jaafar> zenspider: not lately. was looking at pickaxe
<zenspider> not much difference between the two honestly
<zenspider> but between that and looking at the C code calling rb_iterate, it isn't hard to figure out
<jaafar> zenspider: OK, that's in the Ruby source I guess?
<jaafar> I can see that on a given iteration I have to call rb_yield. Just not sure how to structure the code, how I know when I'm on the first call (to init stored data etc.)
<drdr> jaafar you trying to get ruby to work with the arduino?
<jaafar> drdr: no, different application - C++ bindings. Just want it to look Ruby-like, so "each" instead of begin/end etc.
<drdr> ah
* jaafar cruises the source code
<drdr> hmm
<drdr> you could always have a ruby layer on top of the begin end stuff
<jaafar> true
<jaafar> If I can figure out how the Array primitive does it I should be golden
<zenspider> jaafar: first call? if you're worried about knowing which is the first iteration, you're doing something wrong
<zenspider> I have to bounce... bbiab
<drdr> jaafar ide recomend looking at the source code
<drdr> that or canabalizeing it from tinyruby
RomD [RomD!~Roman@nrbg-4d0760c5.pool.mediaWays.net] has joined #ruby-lang
<jaafar> oh hey, this looks easy actually
<jaafar> each only gets called once
<jaafar> I thought there was some magic
<jaafar> rb_yield calls the block
<jaafar> and you're done
<jaafar> I can do this
lightcap [lightcap!~lightcap@97-115-90-91.ptld.qwest.net] has joined #ruby-lang
<shevy> hehe
* shevy puts jaafar into a red tank.
<shevy> drive, ruby warrior, drive!
redruby1 [redruby1!~Adium@116-90-136-55.static.dsl.unleash.net.nz] has joined #ruby-lang
redruby1 [redruby1!~Adium@116-90-136-55.static.dsl.unleash.net.nz] has joined #ruby-lang
redruby1 [redruby1!~Adium@116-90-136-55.static.dsl.unleash.net.nz] has joined #ruby-lang
redruby1 [redruby1!~Adium@116-90-136-55.static.dsl.unleash.net.nz] has quit [#ruby-lang]
<hackeron> how would I write hex to a serial device? -- I want to write 18:43
<drbrain> hackeron: "\x18\x43"
<drbrain> ?
<hackeron> drbrain: hmm, it's not responding
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
<drbrain> do you need to write "18:43" or ?
<hackeron> I'm stuck on this bit: http://pastie.org/3211074
<hackeron> I write m, I get \x00
<hackeron> but then it's 18:43 or .C whatever that is - I tried ?C and now "\x18\x43" but I don't get the binary data
<drbrain> hackeron: "\x43" == "C"
<drbrain> `man ascii`
<drbrain> write "\x6d" followed by write "\x18\x43" should be the right thing to do
<hackeron> so I'm writing "m" then "\x6d" then "\x18\x43" and it hangs on the last one, hmmm
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
<hackeron> or rather I get "\u0003" and then nothing, hmmm
<erikh> probably a status code
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
<drbrain> hackeron: how do you open the socket?
<hackeron> drbrain: sp = SerialPort.new "/dev/ttyUSB0", 9600, 8, 1
<drbrain> if you get back "\u0003" it may be writing funny
<drbrain> hackeron: if you add sp.set_encoding Encoding::BINARY, do you get "\x03" instead?
<hackeron> I get "\x04"
<hackeron> "\x05"
<drbrain> ok, better
<drbrain> now you'll read and write individual bytes instead of UTF-8 codepoints
<drbrain> it may not fix it, but it will probably help
Karmaon [Karmaon!~john@gateway/tor-sasl/karmaon] has joined #ruby-lang
elux [elux!~peter@bas17-toronto63-1128670639.dsl.bell.ca] has joined #ruby-lang
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
<hackeron> drbrain: hmm, I get "\x04!" if I write "\x06" - weird. I suspect it's possible the binary data can only be read once - the windows software doesn't allow you to do anything once you import the data, only to wipe the device and create a new study
ilyam [ilyam!~ilyam@c-67-188-113-128.hsd1.ca.comcast.net] has joined #ruby-lang
snuxoll [snuxoll!~stefan@63.227.129.124] has joined #ruby-lang
<drbrain> hackeron: if the entire exchange with the device is this EDF format, perhaps the documentation will explain what's going on?
<hackeron> drbrain: what documentation, heh?
<drbrain> heh
<shevy> :(
<hackeron> it's so annoying- for some things it ends with \x00 - for others it ends with your string
<hackeron> echoing back what you sent it, grr
fritzek__ [fritzek__!~fritzek@p5DDB55E3.dip.t-dialin.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
neuro_damage [neuro_damage!~neuro@c-98-234-184-142.hsd1.ca.comcast.net] has joined #ruby-lang
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
snuxoll [snuxoll!~stefan@2001:470:8077:817c:10d5:9b3f:7636:527f] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-185-93.lnse4.cht.bigpond.net.au] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
<jaafar> my "each" works. maniacal laugh, maniacal laugh
JoelMcCr` [JoelMcCr`!~user@pool-74-98-40-247.pitbpa.east.verizon.net] has joined #ruby-lang
JoelMcCracken [JoelMcCracken!~user@pool-74-98-40-247.pitbpa.east.verizon.net] has joined #ruby-lang
<drbrain> jaafar: but can you .each.with_index.map ?
JoelMcCracken [JoelMcCracken!~user@pool-74-98-40-247.pitbpa.east.verizon.net] has joined #ruby-lang
<jaafar> drbrain: that's an excellent question, and as soon as I figure out what that means I'll answer it :)
<drbrain> jaafar: many enumerables return an enumerator when no block is given
<drbrain> this allows you to chain them together in various handy ways
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
<drbrain> or, use enumerable methods based off other methods than #each
<drbrain> jaafar: there's an easy way to create it: return enum_for __method__ unless block_given?
<drbrain> if you have arguments to each: return enum_for __method, arg1, arg2 unless block_given?
<jaafar> drbrain: thanks, I will check that out. enabling chaining sounds like a good idea
<zzak> so does rb_load_internal(path, 0) _not_ wrap the required source file in an anonymous module?
<zzak> rb_load_internal(VALUE fname, int wrap)
<drbrain> zzak: coorrect
<drbrain> if (!wrap) { … } else { /* load in anonymous module as top-level */ … }
<zzak> so require should leak local vars to the global namespace?
<drbrain> zzak: no
<drbrain> this is for constant scoping, not liar scoping
<drbrain> if x.rb has class X and you load 'x.rb', true then you won't be able to access X from top-level
<drbrain> local variables are never shared between files
<zzak> so its not fair to say that "requiring a file gets executed under an anonymous module" then?
<drbrain> no
<zzak> and only the constants can leak?
<drbrain> Kernel#require never wraps, Kernel#load can wrap
<drbrain> well, and globals
<drbrain> but that's a given
<zzak> beautiful
<zzak> thanks eric
<drbrain> top-level instance variables are shared (and probably class variables)
<drbrain> echo '@x = 1' > t.rb; ruby -I. -e 'require "t"; p @x'
jaisoares [jaisoares!~jsoares@bl13-197-21.dsl.telepac.pt] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
<jaafar> drbrain: so I need to do this in C btw
<drbrain> jaafar: hrm...
<jaafar> maybe I'll look at enumerator.c
<drbrain> jaafar: hrm, there's RETURN_ENEUMERATOR() but that's in intern.h, not ruby.h
<drbrain> there's also rb_enumeratorize in intern.h
<drbrain> jaafar: you can make the C method be _each and have a ruby method: def each; return enum_for _each unless block_given?; _each; end
<jaafar> drbrain: thanks for the tips!
StevenRingo [StevenRingo!~nevets@203.41.237.118] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
ryanf [ryanf!~rfitz@ec2-50-18-158-149.us-west-1.compute.amazonaws.com] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
<zzak> drbrain: ping
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<zzak> drbrain: nvm, just sent a doc patch. gotta run. pzpz
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@117.195.96.90] has joined #ruby-lang
punknology [punknology!~textual@190.201.108.19] has joined #ruby-lang
cczona_ [cczona_!~cczona@108-75-73-197.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
cczona_ [cczona_!~cczona@108-75-73-197.lightspeed.sntcca.sbcglobal.net] has quit [#ruby-lang]
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
replore [replore!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
jfelchner [jfelchner!~jfelchner@c-69-138-35-223.hsd1.tn.comcast.net] has joined #ruby-lang
kain [kain!~kain@151.64.210.200] has quit ["Sto andando via"]
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
sora_h [sora_h!~sora_h@mayfield.privs.net] has joined #ruby-lang
ryanf [ryanf!~ryanf@207.sub-174-253-243.myvzw.com] has joined #ruby-lang
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
rknLA [rknLA!~rknLA@76-218-76-57.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-85-82.a212.priv.bahnhof.se] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
Filuren [Filuren!~Filuren@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<shevy> hmm
<shevy> is there a simple way to un-include a module? The module in question only has 3 CONSTANTS defines, which are mixed into a class. I wonder if it is easy to remove that module again
<ryanf> shevy: not without a C extension
<shevy> ok
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
Natch| [Natch|!~natch@178.73.218.129] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
thone_ [thone_!~thone@g226048136.adsl.alicedsl.de] has joined #ruby-lang
heftig [heftig!~Jan@archlinux/developer/heftig] has joined #ruby-lang
<josh9> http://blog.steveklabnik.com/posts/2012-01-17-moving-from-sinatra-to-rails I am looking for someone to write the opposite - moving from rails to sinatra
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
Tanaka [Tanaka!c1342d0d@gateway/web/freenode/ip.193.52.45.13] has joined #ruby-lang
jordan` [jordan`!~gromit@posteauge.rsr.lip6.fr] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
jordan` [jordan`!~gromit@posteauge.rsr.lip6.fr] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
snuxoll [snuxoll!~stefan@2001:470:8077:817c:10d5:9b3f:7636:527f] has quit [#ruby-lang]
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@dsl-static-173.212-5-200.telecom.sk] has joined #ruby-lang
<shevy> yeah we all do mistakes
rpowell [rpowell!~rpowell@CPE-121-218-185-93.lnse4.cht.bigpond.net.au] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.224.153] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
StevenRingo [StevenRingo!~nevets@ppp121-44-25-1.lns20.syd6.internode.on.net] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@188.162.162.191] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
timbleck [timbleck!u3835@gateway/web/irccloud.com/x-ihlznjgexzlurxfy] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.224.153] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
shevy2 [shevy2!~shevy@93-82-137-108.adsl.highway.telekom.at] has joined #ruby-lang
_ko1 [_ko1!~ko1@atdot.nue.ci.i.u-tokyo.ac.jp] has joined #ruby-lang
rob___ [rob___!~rob@dust.cx] has joined #ruby-lang
<rob___> hi hi
<rob___> i'm using sinatra and have included a ruby file that defines a class, in this class i'm trying to access sinatras 'halt' function but it seems i can only access that function in a route or in a helper method. how would i go about giving access to the halt method to my class?
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
<rob___> can i somehow require my include inside the 'helper' block?
workmad3 [workmad3!~workmad3@vpn146.its.manchester.ac.uk] has joined #ruby-lang
Guest52033 [Guest52033!~davidw@host228-251-static.95-94-b.business.telecomitalia.it] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby-lang
burgestrand1 [burgestrand1!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby-lang
<injekt> rob___: you would use the 'helpers' method which would include a module
<kke> Hash doesn't have anything like #only? like  {:a => 1, :b => 2, :c => 3}.only(:a, :b)
<rippa> what should that do?
<injekt> which would do what? return {:a => 1, :b => 2} ?
<kke> yeah
<kke> there's select but it's ugly for that
<injekt> why is it ugly? because you have to provide a block?
<whitequark> er
<whitequark> try .fetch
<rippa> if you want values
<kke> fetch only gives values
<rippa> {:a => 1, :b => 2, :c => 3}.values_at(:a, :b)
<injekt> that'll return the values at
<whitequark> ah, you need a sub-hash
<rippa> keys you already have
<injekt> that still doesn't do what he wants, though
<whitequark> the problem with select is that it's an Enumerable method
<whitequark> and it returns an array of arrays, not a hash
<rippa> it returns hash
<rippa> actually
<injekt> ^
<whitequark> hm
<whitequark> let me check
<molgrew> whitequark: that changed between versions
<manveru> rippa: in 1.9
<manveru> i think 1.9.2 only, even
<rippa> Hash[[:a,:b].zip({:a => 1, :b => 2, :c => 3}.values_at(:a, :b))]
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
<injekt> that looks better than select?
<whitequark> hm, it returns hash in 1.9.2 and 1.9.3
<injekt> :D
<rippa> that works better
<injekt> 'better' than what?
<rippa> monkeypatch that bastard
<injekt> heh
<rippa> or not
<injekt> updated version for pre 1.9.2 https://gist.github.com/c92567ad369a693af81d
<manveru> heh
<manveru> i even made a subset method somewhere
<rippa> injekt: select iterates hash
<rippa> sure, doesn't matter with small sizes
<rippa> but still
<manveru> i used reject, because that returns an Hash on 1.8 and 1.9
<manveru> keys = [:a, :b]; {:a => 1, :b => 2, :c => 3}.reject{|k,v| not keys.include?(k) }
<manveru> but hey, nobody uses 1.8 anymore anyway :)
<rob___> injekt: so do i need to include the module into my class? is that what you're saying?
<manveru> rob___: do you need it in many places?
<rob___> manveru: no, not many
<rob___> should i just access it directly?
<manveru> well, it depends on your usage pattern
<bnagy> anyone happen to have done much with the AWS Ruby SDK?
<manveru> injekt: the problem with your code is that the resulting instance won't have SelectHash anymore
<rob___> can you give me an example of how i should include the module or how i should access it directly?
<manveru> well, i usually make functions instead of methods to avoid monkeypatching
<manveru> something like MyModule.hash_with_keys(hash, :a, :b, :c)
davidw [davidw!~davidw@apache/committer/davidw] has joined #ruby-lang
<manveru> that way even if the insane activesupport is required, it won't totally obliterate my stuff
jayeola [jayeola!~jmaclean@ldn-office.youdevise.com] has joined #ruby-lang
antinitro___ [antinitro___!~adam@93-97-23-188.zone5.bethere.co.uk] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
rolfb [rolfb!~rolfb@77.94.232.40] has joined #ruby-lang
<injekt> manveru: heh yeah
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<rue> bnagy: Not I! Planning something exciting?
<rue> I got the impression many used Fog for all that stuff
Foxmaster [Foxmaster!~root@c-83-219-199-232.cust.bredband2.com] has joined #ruby-lang
retro|cz [retro|cz!~retro@137.174.broadband15.iol.cz] has joined #ruby-lang
<bnagy> rue: actually it's quite boring, the ruby bit anyway, I just need to DL a file from a bucket
<bnagy> but the bucket is requester pays
<bnagy> which the SDK does not support, I think it might be simple to hack it in, but I know almost nothing about webstuff
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
kain [kain!~kain@151.64.210.200] has joined #ruby-lang
NARKOZ [NARKOZ!~NARKOZ@46.228.177.254] has joined #ruby-lang
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby-lang
gix [gix!~gix@e180023011.adsl.alicedsl.de] has joined #ruby-lang
RomD [RomD!~Roman@nrbg-d9323031.pool.mediaWays.net] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@85.248.11.120] has joined #ruby-lang
Im_handsome1984 [Im_handsome1984!~shakiraar@130.193.147.133] has joined #ruby-lang
Im_handsome1984 [Im_handsome1984!~shakiraar@130.193.147.133] has quit [#ruby-lang]
judofyr [judofyr!~judofyr@195.159.219.65] has joined #ruby-lang
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
RomD [RomD!~roman@nrbg-d9323031.pool.mediaWays.net] has joined #ruby-lang
RomD [RomD!~roman@nrbg-d9323031.pool.mediaWays.net] has joined #ruby-lang
esad [esad!~esad@212-17-107-66.static.inode.at] has joined #ruby-lang
<esad> Help! Help!
<esad> It seems that exceptions raised in files referenced by -r (when executing ruby/irb) are just printed and execution doesn't stop
<esad> is there a way to override this behavior?
<darix> esad: maybe ... just call irb
<darix> and require your libraries in the shell?
<esad> well, it's rails :(
<manveru> something is rescuing
<esad> and rails/console does -r with your environment...
<manveru> ι /tmp % echo 'raise "oh noes"' > foo.rb; irb -r ./foo
<manveru> /tmp/foo.rb:1:in `<top (required)>': oh noes (RuntimeError)
<manveru> zsh: exit 1 irb -r ./foo
qwert666 [qwert666!~m1d4s@81.219.87.113] has joined #ruby-lang
<qwert666> did anyone use parslet ? i`m starting to learn the gem and i have some problems with the basics http://pastie.org/3212975
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
<manveru> qwert666: i've used it a bit
<manveru> there's also the #parslet channel
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
<manveru> parser for irc protocol
<manveru> might have some pointers if you need examples later
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
<qwert666> manveru: thx i`ll check the code
<qwert666> manveru: #parslet is a little bit 'unactive' ;)
<manveru> yeah, i know
<manveru> hmm
<manveru> it parses fine here
<qwert666> my code ?
<manveru> yeah
<manveru> ruby 1.9.3 and parslet 1.2.3
<qwert666> with the first rule "Number RCiWN" ?
vdrab [vdrab!~vdrab@p922ecb.kyotnt01.ap.so-net.ne.jp] has joined #ruby-lang
<manveru> yes
<qwert666> thx its a big hint for me
<manveru> output here is {:number=>"123/32"@14}
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
<qwert666> hmm you`r right its working under 1.9.3 , need to debug the problem
Filuren [Filuren!~Filuren@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<solars> can anyone recommend a ruby lib for creating .xls files?
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
yalue [yalue!yalue@nat/ibm/x-nvzxzrertjlpfqdl] has joined #ruby-lang
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
joast [joast!~rick@76.178.187.164] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@dhcp-191066.eduroam.chalmers.se] has joined #ruby-lang
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-197-21.dsl.telepac.pt] has quit [#ruby-lang]
empity [empity!~user@mail2.xype.com] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
SteveG [SteveG!~steve@pdpc/supporter/21for7/steveg] has joined #ruby-lang
yalue [yalue!yalue@nat/ibm/x-ygeefdtetcmkqqrn] has joined #ruby-lang
publicvoid_ [publicvoid_!~publicvoi@p5DC15161.dip.t-dialin.net] has joined #ruby-lang
dave_miles [dave_miles!~davemiles@gatej.thls.bbc.co.uk] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
kleech [kleech!~kleech@cpc18-mapp10-2-0-cust39.12-4.cable.virginmedia.com] has joined #ruby-lang
lele|w [lele|w!~Lele@2a01:2d8:0:cafe:218:f3ff:fece:a48] has joined #ruby-lang
robotmay_ [robotmay_!~robotmay@94.30.13.228] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
Pip [Pip!~Pip@188.134.46.173] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
michael_mbp [michael_mbp!~Marin@62.215.214.4] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
babinho [babinho!~babinho@babinho.net] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@186.220.217.229] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B3109E4.dip0.t-ipconnect.de] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
publicvoid_ [publicvoid_!~publicvoi@p5DC15161.dip.t-dialin.net] has joined #ruby-lang
kookwekker [kookwekker!kookwekker@2a02:2308::216:3eff:feb8:af22] has quit [#ruby-lang]
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
elux [elux!~peter@96.45.198.150] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
Sailias [Sailias!~jonathan@bas8-toronto01-1279462027.dsl.bell.ca] has joined #ruby-lang
SkramX [SkramX!~SkramX@pool-173-73-134-143.washdc.east.verizon.net] has joined #ruby-lang
elux [elux!~peter@96.45.198.150] has joined #ruby-lang
csherin [csherin!~csherin@61.11.47.189] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
rippa [rippa!~rippa@109-161-120-219.pppoe.yaroslavl.ru] has joined #ruby-lang
fritzek [fritzek!~fritzek@i59F7B502.versanet.de] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
MistyM [MistyM!~mistym@50.museumforhumanrights.com] has joined #ruby-lang
<qwert666> manveru: can i ignore a whole part of a document when i`m parsing it with parslet ?
tekin [tekin!~tekin@host-78-151-28-217.as13285.net] has joined #ruby-lang
<manveru> qwert666: you can match it and throw the match away
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<manveru> or cut the part out before you use parslet
csherin [csherin!~csherin@61.11.47.189] has joined #ruby-lang
Defusal_ [Defusal_!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
qwert666_ [qwert666_!~m1d4s@178-37-171-87.adsl.inetia.pl] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
csherin [csherin!~csherin@61.11.47.189] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
dfr|mac [dfr|mac!dfr|work@nat/google/x-jiqqfsfcflgznpau] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
gaveen [gaveen!~gaveen@unaffiliated/gaveen] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@177.33.17.13] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<imperator> can't say i've ever understood spreadsheets with massive numbers of rows
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
<imperator> is a manager really going to scan over 20k+ rows? no
<imperator> i suppose they can then summarize them as they see fit
<imperator> but why not just do that up front?
<imperator> anyhoo
quatauta [quatauta!~quatauta@91-67-202-38-dynip.superkabel.de] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@unaffiliated/steven] has joined #ruby-lang
<rue> Hooo
<rue> imperator: They're databases that people who can't use Access (theoretically) can
<rue> …use
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
dbernar1 [dbernar1!~dbernar1@S0106c03f0ed8678b.wp.shawcable.net] has joined #ruby-lang
<dbernar1> Hello. I've got a method that needs to delegate to another method of same object under a certain condition. I want to unit test that method. Using rspec, I know how to set up the condition, but how do I set up an expectation that the method is calling another method of the same object?
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
<dbernar1> Syntactically.
<robgleeson> dbernar1: use a mock
<dbernar1> Can you please show me the exact syntax?
<dbernar1> Cause I do need to call the real method of that object...
<dbernar1> But I also want to have expectations, which seem to be for mocks.
<robgleeson> I don't use RSpec, but I think it is: .should_receive(:foo)
<dbernar1> Do I first instantiate, then mock, set expectations, then call the method on the object, which will be the real method, and the mock will catch the expectation...
<dbernar1> That's kind of what I don't get
<dbernar1> I'd need an actual gist kind of a thing to really get it. I get it conceptually...
<robgleeson> you setup the expectation at the start of your test, yeah
tekin [tekin!~tekin@host-78-151-28-217.as13285.net] has joined #ruby-lang
<dbernar1> Do you agree that if I mock at the beginning, then instantiate, I won't be able to really call the method I am unit testing?
<robgleeson> not if you mock the method only
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
<robgleeson> i'm not sure how RSpec does it, tbh
<dbernar1> Oh, OK, you think you could just mock one method of a class/object
<robgleeson> you should yeah
<dbernar1> OK, i'll do both of those test cases.
<dbernar1> Thank you.
<dbernar1> I might let you know how it goes.
<robgleeson> yeah please do
<robgleeson> there is also #rspec for rspec help btw
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
<dbernar1> Oh, cool!
<dbernar1> One should never stop trying to long-tail on freenode like I did.
<robgleeson> yeah but it's a low traffic channel, you're not ensured to get help ;)
<robgleeson> worth a shot though
<dbernar1> Exactly
<robgleeson> i'm sure there is rspec users lurking here as well
<dbernar1> Yeah
<judofyr> even though we're doing our best
spectra [spectra!~spectra@debian/developer/spectra] has joined #ruby-lang
MistyM [MistyM!~mistym@50.museumforhumanrights.com] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has quit [#ruby-lang]
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby-lang
rushed [rushed!~rushed@99-73-225-9.lightspeed.austtx.sbcglobal.net] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DF08.dip0.t-ipconnect.de] has joined #ruby-lang
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
pvh [pvh!u717@gateway/web/irccloud.com/x-cqvmkpvolztsupeo] has joined #ruby-lang
timbleck [timbleck!u3835@gateway/web/irccloud.com/x-azwemrmkgternyzd] has joined #ruby-lang
<vereteran> is there something like respond_to_instance_method? to check does instance method exists
<vereteran> ?
<apeiros_> method_defined?
<vereteran> apeiros_, thank you!
<apeiros_> yw
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-gyzhtrqggojhlfnp] has joined #ruby-lang
<ReinH> sigh
<apeiros_> ReinH: wuzzaaah?!
<ReinH> so much metaprogramming
charper [charper!u1691@gateway/web/irccloud.com/x-iqssgyqjqepzhcwt] has joined #ruby-lang
<ReinH> it makes me sad
<ReinH> in my day, all we needed was programming
<rippa> metametaprogramming
<rippa> code that writes code that writes code
longtheta [longtheta!u4275@gateway/web/irccloud.com/x-hnnncncghnusxgrf] has joined #ruby-lang
<apeiros_> rippa: don't start with quines…
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-ocshmnzvlvwoztnq] has joined #ruby-lang
<zzak> is there a way to run a specific test in ruby?
<zzak> make test is too long
<imperator> zzak, with test-unit i think it's --n name_of_test
<imperator> do gists have lifespans?
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
<zzak> imperator: you mean with testrb?
<imperator> zzak, dunno testrb
<imperator> fucking markdown, how does it work?
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby-lang
savage-_ [savage-_!~savage-@209.118.197.220] has joined #ruby-lang
<zzak> imperator: yarp, testrb is the runner for minitest
<imperator> wow, manually spacing code in 4 spaces, that's awesome; someone kill me
<imperator> zzak, i think it's the same, --n
<darix> imperator: sorry. that wish is denied. we still need you. :)
<imperator> but i haven't read the docs
Mchl [Mchl!~Mchl@188.116.55.60] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-zjmmwhdqiaixmnyk] has joined #ruby-lang
sdegutis_ [sdegutis_!~sdegutis@38.98.177.253] has joined #ruby-lang
sdegutis_ [sdegutis_!~sdegutis@unaffiliated/steven] has joined #ruby-lang
ricardov_ [ricardov_!~ricardova@177.9.136.36] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-vzmswvlcwuogkugj] has joined #ruby-lang
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
<imperator> i laughed: http://i.imgur.com/VhlQK.gif
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
Fullmoon [Fullmoon!~Fullmoon@dsl-stat-43-17.mmc.at] has joined #ruby-lang
csherin [csherin!~csherin@61.11.47.189] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-oipsccmbvriyfmum] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-zqnsbsluxsffdmdu] has joined #ruby-lang
akahn [akahn!u2243@gateway/web/irccloud.com/x-oqhwqpuccvwprbul] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-roqbexwztajfsydu] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DF08.dip0.t-ipconnect.de] has joined #ruby-lang
zvrba [zvrba!96456@diamant.ifi.uio.no] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
publicvoid [publicvoid!~publicvoi@p5DC15161.dip.t-dialin.net] has joined #ruby-lang
cldwalker [cldwalker!u2984@gateway/web/irccloud.com/x-eoknvryzlvaehpdq] has joined #ruby-lang
Mchl [Mchl!~Mchl@188.116.55.60] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@108-75-173-162.lightspeed.cicril.sbcglobal.net] has joined #ruby-lang
scampbell [scampbell!~scampbell@c-98-224-240-62.hsd1.mi.comcast.net] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-219-25.ssp.dialog.net.pl] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
saLOUt_ [saLOUt_!~rriemann@77.245.32.179] has joined #ruby-lang
Jarred [Jarred!~Administr@c-71-198-139-210.hsd1.ca.comcast.net] has joined #ruby-lang
<Jarred> What's a shim?
<Jarred> (with rbenv)
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
<deryl> what mpapis in #rvm just told you
longtheta [longtheta!u4275@gateway/web/irccloud.com/x-datclyflgrlvjsce] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@38.98.177.253] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-vrkipqtwhgtsbxxi] has joined #ruby-lang
<apeiros_> oh, cross-posting. lovely. thanks deryl.
agib [agib!u781@gateway/web/irccloud.com/x-iaovcojsvdvbidfk] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
antinitro_ [antinitro_!~adam@cpc1-stap4-0-0-cust418.12-2.cable.virginmedia.com] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@80.252.215.26] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
davidw [davidw!~davidw@adsl-ull-122-110.51-151.net24.it] has joined #ruby-lang
wdperson [wdperson!~wdperson@cpe-173-89-163-182.neo.res.rr.com] has joined #ruby-lang
pxjorge [pxjorge!~pxjorge@a79-168-9-12.cpe.netcabo.pt] has joined #ruby-lang
davidw [davidw!~davidw@apache/committer/davidw] has joined #ruby-lang
davidw [davidw!~davidw@apache/committer/davidw] has quit [#ruby-lang]
<deryl> apeiros_: welcome
SuperTaz_work [SuperTaz_work!~supertaz_@c-24-130-115-179.hsd1.ca.comcast.net] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@vpn.lax.truecarcorp.com] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
nofxx__ [nofxx__!~nofxx@177.106.91.211] has joined #ruby-lang
dustin_ [dustin_!~ddeyoung@99-7-24-156.lightspeed.iplsin.sbcglobal.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
spinagon [spinagon!~rippa@109-161-120-219.pppoe.yaroslavl.ru] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@38.98.177.253] has quit [#ruby-lang]
indeterminate [indeterminate!sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-31-83.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
vbatts [vbatts!~vbatts@hashbangbash.com] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@80.252.215.26] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@216.199.155.226.nw.nuvox.net] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has joined #ruby-lang
* muzone is now playing: Muzone - Dingeling (http://home.no/dwaynie/dingeling.mp3)
nofxx__ [nofxx__!~nofxx@177.106.91.211] has joined #ruby-lang
<shevy> muzone please
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
<wmoxam> lol, treat IRC like facebook ftl
_darkside_ [_darkside_!~darkside@187.45.255.123] has joined #ruby-lang
senj [senj!~senj@S01060026f323bcdf.ed.shawcable.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.229.185] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@177.9.136.36] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
<ReinH> fail
ricardovaleriano [ricardovaleriano!~ricardova@177.9.136.36] has joined #ruby-lang
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
dre [dre!5341dce3@gateway/web/freenode/ip.83.65.220.227] has joined #ruby-lang
<dre> hi there. is anybody here familiar with starling?
<rue> The map/reduce thing?
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<ttilley> the queue system twitter wrote in scala instead of just using a real queueing system and i think later abandoned?
<dre> ttilley: exactly
<dre> i cant get it running. but i'm not really sure if i really need it. so i wanted to ask: which datatypes can i use for my messages?
<dre> is it just about strings or can i pass ruby objects?
<ttilley> dunno what it uses natively, but is it all that important when you can serialize anything to a string?
<muzone> sorry my people
<muzone> i just switched boxes and this one still had shameless_plug.rb playing
ricardovaleriano [ricardovaleriano!~ricardova@177.33.18.164] has joined #ruby-lang
<ttilley> considering that it's written in scala, it will not be able to just de-marshall ruby objects if that's what you mean. you won't be able to avoid encoding overhead of some kind, even if it's hidden from you.
ylluminate [ylluminate!~ylluminat@rrcs-24-123-53-166.central.biz.rr.com] has joined #ruby-lang
<ttilley> dre: though, really... if you're looking at a queue/message system and don't have one in place already... pick one that doesn't suck. RabbitMQ perhaps.
<dre> okey, i'm kind of confused with it. probably i'll do best by leaving it alone ;)
Austin__ [Austin__!~austin@96.45.197.22] has joined #ruby-lang
<dre> thanks for the tip i'll have a look at it
<dre> ttilley: ty!
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
dfr|mac [dfr|mac!dfr|work@nat/google/x-mmropgisveeiewvc] has joined #ruby-lang
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby-lang
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
InfiniteJest [InfiniteJest!~InfiniteJ@dynamic-adsl-78-12-91-46.clienti.tiscali.it] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has quit [#ruby-lang]
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
crudson [crudson!~doug@static-96-227-79-15.phlapa.fios.verizon.net] has joined #ruby-lang
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
boxmo [boxmo!~box@177.106.91.211] has joined #ruby-lang
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
benanne [benanne!~rijdier@ip-213-49-83-219.dsl.scarlet.be] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-218-185-93.lnse4.cht.bigpond.net.au] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@216.199.155.226.nw.nuvox.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
pablo_ [pablo_!~pabloh@186.22.82.39] has joined #ruby-lang
geo1 [geo1!~Adium@adfb12c6.cst.lightpath.net] has joined #ruby-lang
<geo1> Howdy. So I seem to lack a certain understanding about threads in ruby
<geo1> Threads aren't new to me, just ruby
<drbrain> geo1: ok...
<geo1> I create a thread with an infinite loop in it
<geo1> and then run then thread with t.join
<geo1> but once I do that, I can't continue in my sequence of logic
<geo1> I am stuck in that loop, as if it's not in a separate thread at all
<geo1> what am I missing?
<rue> Sounds like fun
<drbrain> geo1: t.join says "wait for t to finish"
<drbrain> geo1: the thread starts running as soon as you create it
<geo1> ah, excellent! how dumb of me
<geo1> thank you sir
<drbrain> geo1: you can also use Thread.pass to ask ruby to run another thread
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<zzak> drbrain got a sec to review a patch for me?
<drbrain> zzak: sure
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
<drbrain> zzak: looks good to me
<zzak> woot
<drbrain> zzak: I'll probably commit it next week
<zzak> thanks eric
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<zzak> will bin/testrb use the local ruby's lib, or env?
<zzak> or do i need to make install to run the tests for that ruby
<drbrain> zzak: make test-all
lightcap [lightcap!~lightcap@97-115-90-91.ptld.qwest.net] has joined #ruby-lang
<zzak> what about testing a specific lib?
<drbrain> make test-all TESTS=rubygems to run everything in test/rubygems
<drbrain> or you can name a specific file like TESTS=rubygems/test_gem.rb
<zzak> that seems to work great, but "cannot load such file -- date"
<zzak> TESTS=csv
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<drbrain> hrm
RomyRomy [RomyRomy!~stickycak@64.134.99.28] has joined #ruby-lang
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<zzak> i did autoconf; make test; and ran a few tests with my system's (1.9.3-p0) testrb
<zzak> autoconf && ./configure
<drbrain> you only have to autoconf once
<drbrain> and, usually, only have to ./configure once
<drbrain> unless something you need changed in configure.in
<zzak> nope, only once for each of thsoe
<zzak> s/thsoe/those
<drbrain> zzak: I don't have the problem on trunk
<zzak> why are gems disabled, is that why?
<zzak> here's the whole shebangity: https://gist.github.com/1643088
<drbrain> disable gems allows ruby to test the proper things better
<drbrain> zzak: what does ./miniruby -v say?
<drbrain> I get: http://paste.segment7.net/qj.html from TESTS=csv/test_data_converters.rb
<drbrain> you did run make first, right?
lightcap [lightcap!~lightcap@174-25-186-227.ptld.qwest.net] has joined #ruby-lang
<zzak> ruby 2.0.0dev (2012-01-19) [x86_64-linux]
<zzak> all i did was: autocong && ./configure && make test
<drbrain> which rev?
<drbrain> ah, run make, then make test should work
<zzak> trunk@34340
<drbrain> for whatever reason test and test-all don't compile everything, they just try to run the tests
<zzak> well that makes sense haha
<zzak> thanks for clearing that up
<zzak> i couldnt find any docs on this anywhere, perhaps core needs some outlines for better contributing guies
<zzak> s/guies/guides
livinded [livinded!~lolwut@76-232-200-80.lightspeed.irvnca.sbcglobal.net] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
<zzak> must have missed these, thanks
pandora17 [pandora17!~pandora17@p508D518C.dip.t-dialin.net] has joined #ruby-lang
retro|cz [retro|cz!~retro@ip-86-49-73-114.net.upcbroadband.cz] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
rtmex [rtmex!~rtmex@189.130.195.71] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
<rtmex> hola, alguien sabe si la gema calendar_helper se puede modificar para que presente los nombres de los meses en espa
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby-lang
spyvsspy [spyvsspy!~nonenone@209.145.177.162] has joined #ruby-lang
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<drbrain> I could answer rtmex in English, but I don't know if they would understand ☹
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
naz [naz!~n@70.44.2.190.res-cmts.bus.ptd.net] has joined #ruby-lang
kylemcgill [kylemcgill!~kylemcgil@static-ip-202-90-56-14.watchdog.net.nz] has joined #ruby-lang
wwalker [wwalker!~wwalker@208.92.232.27] has joined #ruby-lang
<wwalker> is there a reliable way to get the class of the calling method?
Austin__ [Austin__!~austin@96.45.197.22] has quit [#ruby-lang]
zenspider [zenspider!~user@envy.zenspider.com] has joined #ruby-lang
<drbrain> wwalker: why do you need to know this information?
<zenspider> what'd I miss?
<zenspider> ged: ping
<drbrain> … there's binding_of caller, but needing such information is generally frowned upno
<zenspider> ged: #seattle.rb
<zenspider> wow. it took me a good 10 seconds to realize that upno is NOT an acronym :P
<drbrain> damn you (lack of) autocorrect
<wwalker> drbrain: policy, which I just failed to change, is that any component that logs anything will write to it's own log file
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<zenspider> you know... universal patrol naval officer...
<wwalker> I was trying to make a logger class that would automatically name the log file after the class that created it (unless the constructor is passed a filename)
spyvsspy [spyvsspy!~nonenone@209.145.177.162] has joined #ruby-lang
<drbrain> wwalker: make a logger module that you can include anywhere
<wwalker> s/own log file/own separate log file/
<drbrain> then self.class.name is all you need
<wwalker> drbrain: thank you
<zenspider> heh. if a logger class has to use binding_of, it shouldn't be used
<wwalker> what I really love is the concept of having to look through 50 separate log files to see the action of one application.... :(
<zenspider> tail -f *.log is awesome :P
<drbrain> wwalker: can you use syslog?
<drbrain> you can have the best of both worlds!
tester [tester!d8ac1410@gateway/web/freenode/ip.216.172.20.16] has joined #ruby-lang
Transformer [Transformer!~Transform@ool-4a59e397.dyn.optonline.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
mztriz [mztriz!~mztriz@74-136-75-114.dhcp.insightbb.com] has joined #ruby-lang
<wwalker> drbrain: drbrain no syslog
<drbrain> wwalker: aww ☹
<wwalker> drbrain: a module won't work in a slass method in the including class?
<wwalker> class
<wwalker> module methods only add function to instance variables ?
<drbrain> wwalker: right, only instance variables
<injekt> then there's extend
<drbrain> or, you can include your Logging module in Kernel
<wwalker> many of my components have class methods that might need to log (though most are instance methods)
<drbrain> … but don't do that in a library
<wwalker> no monkey patching. Rails creates enough unexpected behaviors :)
jaisoares [jaisoares!~jsoares@bl13-197-21.dsl.telepac.pt] has joined #ruby-lang
ivanoats [ivanoats!~ivanoats@pdpc/supporter/active/ivanoats] has joined #ruby-lang
tester [tester!d8ac1410@gateway/web/freenode/ip.216.172.20.16] has quit [#ruby-lang]
havenn [havenn!~skipper@rrcs-76-79-113-21.west.biz.rr.com] has joined #ruby-lang
brmouzone [brmouzone!~brmouzone@108-90-18-133.lightspeed.cicril.sbcglobal.net] has joined #ruby-lang
<zzak> why is openssl the way that it is: https://gist.github.com/1643808
<wwalker> extend looks like it'll work. Thank you drbrain, injekt .
<zzak> anyone remember this one? OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
<drbrain> I need to figure out how to get VCR and net-http-persistent to play well with each other
<drbrain> I think you can do that with mechanize with this horrible incantation:
<drbrain> wait, let me check
<drbrain> @agent.agent.http.reuse_ssl_sessions = false
<injekt> :)
<zenspider> @agent.agent? blech
<injekt> @agent.agent.agent
<drbrain> that's what zzak called it
<zenspider> def agent; self; end
<injekt> tehe
<injekt> lol zenspider
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<drbrain> it's not his fault he picked the same name as the hidden internal details of mechanize
<injekt> zenspider: question, for what reasons would `rake` and TESTOPTS not work in minitest?
<injekt> I haven't looked into it
<injekt> drbrain: pretty sure that's the same name mech uses in most of its examples?
<drbrain> yeah
<injekt> agent is pretty applicable, I guess
<drbrain> attr_reader :agent on Mechanize is nodoc, so it's a good warning of "thar be dragons"
<injekt> heh