Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
newbold [newbold!~adam@74-134-27-218.dhcp.insightbb.com] has joined #ruby
<newbold> does "uninitialized constant Net::IMAP" mean that I need to download or install something for the IMAP functions?
regedarek [regedarek!regedarek@gateway/shell/bshellz.net/x-nbpownrdqgudobsi] has joined #ruby
<newbold> oh, duh, neverminsd
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<regedarek> Hi, anybody here?? how to setup in sinatra LOAD_PATH becose when i have require 'filename' and filename in the same directory i recieve no such file to load
<deryldoucette> require_relative not require if its in the same dir
<regedarek> ok and this is consistent with convention?
kerframil [kerframil!~kerframil@gentoo/user/kerframil] has joined #ruby
roolo [roolo!~roolo@113-99-243-80.cust.centrio.cz] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
quest88 [quest88!~quest88@12.181.53.123] has joined #ruby
<richo> not all rubies have require_relative tho
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-bpklpbjilmjejium] has joined #ruby
geef [geef!~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has joined #ruby
sts [sts!~sts@hmm.ono.at] has joined #ruby
nari [nari!~nari@raichu.netlab.jp] has joined #ruby
apow [apow!~wopa@177.17.127.74] has joined #ruby
baroquebobcat [baroquebobcat!~nick@70-90-113-174-co.denver.hfc.comcastbusiness.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
csavola [csavola!~csavola@CPE0021e9f7ea74-CM001404933e00.cpe.net.cable.rogers.com] has joined #ruby
tmchaves [tmchaves!~tchaves@201.22.217.152.dynamic.adsl.gvt.net.br] has joined #ruby
randym [randym!~randym@113x33x226x118.ap113.ftth.ucom.ne.jp] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
bigkm [bigkm!~bigkm@203-206-185-71.perm.iinet.net.au] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
fred [fred!~fred@slamd64/fred] has joined #ruby
<regedarek> ok thx
csavola_ [csavola_!~csavola@CPE0021e9f7ea74-CM001404933e00.cpe.net.cable.rogers.com] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<regedarek> and another question how shuld i setup root path in config.ru becose in production(heroku) i get require_relative 'hkshop'
<regedarek> sory
<regedarek> 2012-02-01T00:38:35+00:00 app[web.1]: config.ru:5:in `require_relative': cannot infer basepath (LoadError)
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
flagg0204 [flagg0204!~ianderson@sea02-v600-nat.marchex.com] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
skaczor [skaczor!~shogun@mail.prognosoft.biz] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-sibcacauqvwayjcl] has joined #ruby
<waxjar> i set up a Procfile that does bundle exec ruby -I ./ app.rb, maybe that'll work for you regedarek
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
ben_alman [ben_alman!~cowboy@awesome.benalman.com] has joined #ruby
advorak [advorak!~advorak@158.59.127.88] has joined #ruby
tymat [tymat!~starburst@ec2-107-22-125-163.compute-1.amazonaws.com] has joined #ruby
tymat [tymat!~starburst@ec2-107-22-125-163.compute-1.amazonaws.com] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
cmasseraf [cmasseraf!~cmasseraf@186.223.223.160] has joined #ruby
LiquidIn1ect [LiquidIn1ect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
tomzx [tomzx!~tomzx@66-77.162.dsl.aei.ca] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
badabim [badabim!~badabim@17.212.166.202] has joined #ruby
samsonjs [samsonjs!~samsonjs@184.66.154.246] has joined #ruby
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
googya [googya!~Adium@221.133.241.50] has joined #ruby
ckrailo [ckrailo!~ckrailo@leotoughbks.utdallas.edu] has joined #ruby
nyuszika7h [nyuszika7h!nyuszika7h@unaffiliated/nyuszika7h] has joined #ruby
codefriar [codefriar!~CodeFriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<codefriar> so, this is probably a stupid question, but are there any known issues with itteratting over an array knowing that the block executed will most likely add to the array ?
straind` [straind`!~stupidper@204.111.240.87] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@28-73-252-216.dsl.colba.net] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
<savage-> codefriar: yes, that's not safe and can mess up the ordering
<codefriar> savage-: what if I don't care about the ordering ?
<codefriar> I could use a set
<codefriar> er
<codefriar> an array
<savage-> codefriar: do not modify the data structure while iterating
<banister`sleep> codefriar: y not just iterate over a dup
<savage-> codefriar: you could iterate over a dup
<savage-> banister`sleep: i still owe you a stack explorer!
<codefriar> I tried doing it with dispatch (macruby) with queues and jobs but it segfaults
<banister`sleep> savage-: just when you're ready
<savage-> you bet!
<savage-> good night guys! smell ya later.
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
Jarred [Jarred!~Administr@c-71-198-139-210.hsd1.ca.comcast.net] has joined #ruby
<Jarred> Hi all
CreativeEmbassy [CreativeEmbassy!~CreativeE@67.22.20.181] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
soh_cah_toa [soh_cah_toa!~soh_cah_t@ool-45722d91.dyn.optonline.net] has joined #ruby
zwevans [zwevans!~zwevans@99-127-40-79.lightspeed.rlghnc.sbcglobal.net] has joined #ruby
* mythmon waves
<Jarred> I have a state machine. The state machine itself is very simplistic. But, the mechanism that defines what to switch to, and when isn't. Every couple minutes it gets new data that could result in it needing to change state. It could be getting this data at any time, and should perform at least one action on it always. I need something to manage the state. The thing is, I don't know that much about state machines, or design patterns. Is
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
maedi_ [maedi_!~maedi@mail.digitalink.com.au] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
amerine [amerine!~mturner@67.204.184.82] has joined #ruby
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
_kinderman [_kinderman!~kinderman@c-98-223-146-252.hsd1.in.comcast.net] has joined #ruby
maedi [maedi!~maedi@mail.digitalink.com.au] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
taipres [taipres!~taipres@2001:5c0:1400:a::125] has joined #ruby
redgetan [redgetan!~reg@user129-244.wireless.utoronto.ca] has joined #ruby
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-67.cable.teksavvy.com] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
josefig [josefig!~josef@187.156.91.147] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-wfvsjlexckrmvvln] has joined #ruby
mikeric [mikeric!~mike@S0106c03f0e8b23f3.vc.shawcable.net] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
zakwilson [zakwilson!~quassel@adsl-072-149-089-151.sip.asm.bellsouth.net] has joined #ruby
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
Tronic_ [Tronic_!4b48ea9f@gateway/web/freenode/ip.75.72.234.159] has joined #ruby
jesseangell [jesseangell!~jesseange@h211.147.28.71.dynamic.ip.windstream.net] has joined #ruby
<jesseangell> I can't for the life of me figure out why gem install ffi works fine..but bundle install rvm blows up with extconf.rb errors. using rvm ..ruby 1.9.3 in a gem set.. any ideas? http://pastebin.com/W1uXmxXX
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@28-73-252-216.dsl.colba.net] has joined #ruby
banister`sleep [banister`sleep!~baniseter@118.82.185.158] has joined #ruby
<wallerdev> jesseangell did you look at the log file?
ohcibi [ohcibi!~quassel@thisdone.de] has joined #ruby
<jesseangell> wallerdev: all it says is /var/lib/jenkins/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb which executes fine if I run it like that
Y_Ichiro [Y_Ichiro!~yichi@S0106d8a25e7ab2c0.ed.shawcable.net] has joined #ruby
rsaaguy_ [rsaaguy_!96cb582c@gateway/web/freenode/ip.150.203.88.44] has joined #ruby
godmother [godmother!~user@rrcs-24-43-23-140.west.biz.rr.com] has joined #ruby
ohcibi [ohcibi!~quassel@thisdone.de] has joined #ruby
nopper [nopper!~nopper@ns.patched.biz] has joined #ruby
<regedarek> hi i have big problem with data format
<regedarek> = DateTime.parse(r.reserv_from)
<regedarek> = Date::strptime(r.reserv_from, "%m-%Y")
<regedarek> this always gives me error: undefined method `sub!' for 2011-02-21 00:00:00 +0100:Time
rsaaguy [rsaaguy!96cb582c@gateway/web/freenode/ip.150.203.88.44] has joined #ruby
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
<shevy> regedarek perhaps because .sub does not work on Time object
richo [richo!~richo@unaffiliated/richohealey] has quit [#ruby]
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
helloDennis [helloDennis!~Dennis@pool-173-72-191-216.clppva.fios.verizon.net] has joined #ruby
pac1 [pac1!~pac1@pool-96-233-75-235.bstnma.fios.verizon.net] has joined #ruby
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
seivan [seivan!~seivan@bb121-6-236-4.singnet.com.sg] has joined #ruby
Know1edge [Know1edge!~Know1edge@c-69-247-141-247.hsd1.tn.comcast.net] has joined #ruby
Know1edge [Know1edge!~Know1edge@unaffiliated/know1edge] has joined #ruby
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
hyperbor1ean [hyperbor1ean!~none@unaffiliated/hyperboreean] has joined #ruby
ilyam [ilyam!~ilyam@2620:65:0:281:8c88:d216:7f1c:a2e] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
radic [radic!~radic@dslb-178-002-220-198.pools.arcor-ip.net] has joined #ruby
indstry [indstry!~indstry@99-55-241-142.lightspeed.gdrpmi.sbcglobal.net] has joined #ruby
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has quit [#ruby]
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
jaywastaken_ [jaywastaken_!~jaywastak@207-181-243-225.c3-0.lem-ubr1.chi-lem.il.cable.rcn.com] has joined #ruby
tomzx_ [tomzx_!~tomzx@dsl-199-102-157-102.aei.ca] has joined #ruby
tectonic [tectonic!~tectonic@c-67-164-98-164.hsd1.ca.comcast.net] has joined #ruby
<shevy> Anyone familiar with FFI? I just started to dive into it. Hello world example: http://pastie.org/3293406 I am wondering if it is possible to use default arguments to functions such as #puts though
MissionCritical [MissionCritical!~MissionCr@unaffiliated/missioncritical] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279600344.dsl.bell.ca] has joined #ruby
CreativeEmbassy [CreativeEmbassy!~CreativeE@pool-71-162-39-182.altnpa.east.verizon.net] has joined #ruby
<banisterfiend> shevy: just FFXII i played on ps3 a few years ago
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
<banisterfiend> shevy: isn't FFI a text adventure
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
Jedi_SCT1 [Jedi_SCT1!~j@c-98-234-85-144.hsd1.ca.comcast.net] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
lorandi [lorandi!~lorandi@201-1-138-249.dsl.telesp.net.br] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
seivan [seivan!~seivan@bb121-6-236-4.singnet.com.sg] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
panpainter [panpainter!~panpainte@c-71-231-141-181.hsd1.wa.comcast.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<shevy> hmmm for now I'll assume that it is not possible to use default arguments in FFI
<shevy> attach(mod, name)
ckrailo [ckrailo!~ckrailo@pool-71-97-77-8.dfw.dsl-w.verizon.net] has joined #ruby
<banisterfiend> shevy: join #pry
<banisterfiend> shevy: i'll give u ops
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.40] has joined #ruby
<Banistergalaxy> Shevy....
gokul [gokul!~gokulnath@115.111.177.122] has joined #ruby
<shevy> one thing after the other!
<shevy> I am now on the new ruby-gnome
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
<shevy> stupid gtksourceview2 ...
ksinkar [ksinkar!~ksinkar@117.195.109.48] has joined #ruby
<redgetan> is there a way to get the string in the current line of STDOUT?
Onionnion [Onionnion!~ryan@adsl-76-230-150-45.dsl.milwwi.sbcglobal.net] has joined #ruby
seivan [seivan!~seivan@bb121-6-236-4.singnet.com.sg] has joined #ruby
Animawish [Animawish!~Adium@71-35-233-6.slkc.qwest.net] has joined #ruby
<Animawish> what does this error mean?
<Animawish> in `index': type mismatch: NilClass given (TypeError)
ilyam [ilyam!~ilyam@c-67-188-113-128.hsd1.ca.comcast.net] has joined #ruby
<shevy> Animawish the argument is probably nil
<shevy> to .index
<shevy> check it
<shevy> or perhaps the object on which #index is called
<shevy> one of these two :)
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
sdeobald [sdeobald!~steven@122.167.116.57] has joined #ruby
test [test!~test@129.74.115.11] has joined #ruby
c0rn [c0rn!~c0rn@adsl-69-110-5-180.dsl.pltn13.pacbell.net] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<Animawish> is there an opposite for .include?
<Animawish> .exclude?
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
ranjan [ranjan!~538547@115.111.178.162] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
booginga [booginga!~booginga@cpe-69-206-151-178.hvc.res.rr.com] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@eth3258.qld.adsl.internode.on.net] has joined #ruby
<rippa> Animawish: !foo.include?
joast [joast!~rick@98.145.65.117] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-61-129.albq.qwest.net] has joined #ruby
<Animawish> well it's an array
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<Animawish> I've got
<Animawish> array.include? item
jds [jds!~jds@188-220-60-85.zone11.bethere.co.uk] has joined #ruby
duey [duey!~duey@thecakeisalie.co] has joined #ruby
voodoofish430 [voodoofish430!~mtorres@208.76.2.200] has joined #ruby
<shevy> Animawish .reject
<shevy> though
<shevy> that would give you only the non included ones
<shevy> puts 'Yup is not included' unless %w( abc def ghi ).include? 'abc' # => nil
<shevy> and no output!
duey [duey!~duey@thecakeisalie.co] has quit ["Leaving"]
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-ygljzbimpygizkfs] has joined #ruby
danishkhan [danishkhan!~danishkha@2002:47c6:f8ea:1234:89d1:39ce:6224:4404] has joined #ruby
Animawish [Animawish!~Adium@71-35-233-6.slkc.qwest.net] has quit [#ruby]
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
a_a_g [a_a_g!~aag@203.123.164.34] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279598931.dsl.bell.ca] has joined #ruby
kreantos [kreantos!~kreantos@178.114.222.23.wireless.dyn.drei.com] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby
Seppman [Seppman!~sepp@cpe90-146-41-35.liwest.at] has joined #ruby
tomsthumb [tomsthumb!~tomsthumb@cpe-72-182-43-224.austin.res.rr.com] has joined #ruby
booginga [booginga!~booginga@cpe-69-206-151-178.hvc.res.rr.com] has joined #ruby
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
<jesseangell> I'm having a hell of a time with segmentation faults using ruby 1.9.3-p0 on Ubuntu. Happens about 50% of the time when I run rspec
<jesseangell> Anyone have a clue? Been chasing this for hours..
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
danishkhan [danishkhan!~danishkha@c-71-198-248-234.hsd1.ca.comcast.net] has joined #ruby
<shevy> No idea. I am still on 1.8.7. 1.9.x is annoying me way too much in general
<banisterfiend> jesseangell: give a backtrace
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<jesseangell> banisterfiend: happens about 50% of the time I run rspec in the exact same way
<banisterfiend> jesseangell: look at this line: /var/lib/jenkins/.rvm/gems/ruby-1.9.3-p0/gems/yard-0.7.5/lib/yard.rb:46
<jesseangell> banisterfiend: require file seems to have nothing to do with yard though. if i get yard out of the picture then it blows up on back ports.rb line 5 or something
<jesseangell> about 50% of the time for that too
zenergi_ [zenergi_!~zenergi@137.110.41.255] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
<banisterfiend> jesseangell: weird, sounds like your 1.9.3 build is broken
<banisterfiend> jesseangell: try reinstalling it
<jesseangell> banisterfiend: I keep rebuilding it every which way I can think of .. and it does that
<jesseangell> i've tried gcc 4.4….gcc 4.3..etc
<banisterfiend> jesseangell: stick to 1.9.2 then ;)
<banisterfiend> hehe
<banisterfiend> sorry i cant be of more help
<banisterfiend> jesseangell: try asking on the ruby-forum
<banisterfiend> core members hang there
<banisterfiend> and probalby have an answer for oyu
sleetdrop [sleetdrop!~sleetdrop@61.135.152.211] has joined #ruby
jgrevich [jgrevich!~jgrevich@137.110.41.255] has joined #ruby
lkba [lkba!~AndChat@afst23.neoplus.adsl.tpnet.pl] has joined #ruby
banseljaj [banseljaj!~Imami@182.186.18.216] has joined #ruby
porco [porco!~porco@222.130.130.151] has joined #ruby
jgrevich [jgrevich!~jgrevich@137.110.41.255] has joined #ruby
michael_mbp [michael_mbp!~Marin@149.147.240.209] has joined #ruby
indstry [indstry!~indstry@99-55-241-142.lightspeed.gdrpmi.sbcglobal.net] has joined #ruby
jgrevich [jgrevich!~jgrevich@137.110.41.255] has joined #ruby
indstry [indstry!~indstry@99-55-241-142.lightspeed.gdrpmi.sbcglobal.net] has joined #ruby
DeeJayTwo [DeeJayTwo!~deejay2@office.abi.ca] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<shevy> rvm ... builder ... segfaults
<shevy> It all scares me
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
ilyam [ilyam!~ilyam@c-67-188-113-128.hsd1.ca.comcast.net] has joined #ruby
michael_mbp [michael_mbp!~Marin@149.147.240.209] has joined #ruby
<jesseangell> shevy: tell me about it. been fighting this for …well way too long
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
<jesseangell> and every time I think I fixed it
<jesseangell> i realize the problem is deeper and worse
<shevy> hehe
yxhuvud [yxhuvud!mongo@h-225-165.a212.priv.bahnhof.se] has joined #ruby
enherit [enherit!~enherit@66-214-13-183.dhcp.lnbh.ca.charter.com] has joined #ruby
DarthGandalf [DarthGandalf!~Vetinari@znc/developer/DarthGandalf] has joined #ruby
trivol [trivol!~aurelien@81.57.175.21] has joined #ruby
lkba [lkba!~AndChat@afst23.neoplus.adsl.tpnet.pl] has joined #ruby
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
panpainter [panpainter!~panpainte@c-71-231-141-181.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
enherit [enherit!~enherit@66-214-13-183.dhcp.lnbh.ca.charter.com] has joined #ruby
aakashvd [aakashvd!~aakashvd@122.167.116.57] has joined #ruby
aakashvd [aakashvd!~aakashvd@122.167.116.57] has quit [#ruby]
daglees [daglees!~belvedere@92.62.115.195] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
<regedarek> Hi
<regedarek> me again :)
<regedarek> how to save parametr with association
<regedarek> item = Item.find_by_name(params[:name])
senny [senny!~senny@edge.garaio.com] has joined #ruby
<regedarek> item.reservations.last.status = 2 | item.save
<regedarek> how to save this record in Reservation model
davidpk [davidpk!~r00t@5adc8e56.bb.sky.com] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
tonini [tonini!~zastav@edge.garaio.com] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby
<jesseangell> shevy: doesn't seem to be a problem on 1.92.
<jesseangell> shevy: must be something funky about 1.9.3
<shevy> jesseangell yeah that's the evolution of ruby in the 1.9.x branch. from suck to more suck.
skim1776 [skim1776!~sergey@m212-96-64-229.cust.tele2.kz] has joined #ruby
<skim1776> hello there
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby
<skim1776> is it normal to have many require_relative imports in the ruby project? is it possible to replace them with some simple construction?
cemycc [cemycc!~cemycc@79.112.104.246] has joined #ruby
<banisterfiend> skim1776: you probably shouldnt have too many in a single file
<banisterfiend> that likely demonstrates you havent modularized your code very well
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
<skim1776> 3 is too many? I saw some constructions with __FILE__ which can replace it
<banisterfiend> skim1776: 3 is ok
<skim1776> banisterfiend, ok, thanks
thone_ [thone_!~thone@g226050000.adsl.alicedsl.de] has joined #ruby
banseljaj [banseljaj!~Imami@182.186.18.216] has joined #ruby
krz [krz!~foobar@58.69.201.60] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
skim1776 [skim1776!~sergey@m212-96-64-229.cust.tele2.kz] has quit [#ruby]
L|NUX [L|NUX!~linux@202.43.124.41] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-ujexftwklpkeaisy] has joined #ruby
adamkittelson [adamkittelson!~adamkitte@c-24-23-252-19.hsd1.ca.comcast.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby
duey [duey!~duey@thecakeisalie.co] has joined #ruby
<senthil> Is there any library that can find prepositions/verbs etc. in a given sentence/paragraph. I found several natural language parsers, but none find prepositions.
<L|NUX> can someone tell me how can i parse 2012-02-01T01:35:45-0600 to 01/Feb/2012:01:35:45 -0600 this ?
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
bier [bier!~bier@p5085ED38.dip.t-dialin.net] has joined #ruby
<L|NUX> any one ?
sdeobald [sdeobald!~steven@122.172.224.154] has joined #ruby
moshef [moshef!~moshe@2.54.254.131] has joined #ruby
<moshef> how do i reject/delete some items from array? for example array[0..2] . is it possible?
<L|NUX> can someone please look into this
<a_a_g> moshef: yes
<moshef> a_a_g: ...
<a_a_g> negative indices also work - array[0..-1]
<moshef> enlighten me plesae
<a_a_g> you want to pick out sections of arrays right? based on start and end index?
<moshef> yeah
<moshef> lets say i want to remove the first 2 objects in array. array[0] and array[1]
<moshef> and will you do it ?
<a_a_g> arr[0..1] will create a new array of the 2 elements
<moshef> but it will not be removed from the first array
<moshef> from the original one i mean
<a_a_g> thats what you want
|PiP| [|PiP|!PiP@CPE68efbdb817c9-CM0011aea71a92.cpe.net.cable.rogers.com] has joined #ruby
<moshef> a_a_g: true, thanks
jbpros [jbpros!~jbpros@188-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
<regedarek> hi, how to sahi, how to format 2012-02-22 00:00:00 +0100 to only date??
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<rippa> require 'date'; Date.parse '2012-02-22 00:00:00 +0100'
Sliker [Sliker!~ponies@87.114.96.212] has joined #ruby
<L|NUX> rippa: hmm
<L|NUX> ok
cbuxton1 [cbuxton1!~Adium@nat/partnerpedia/x-aogcisvsdtnjuhgb] has joined #ruby
sgronblo [sgronblo!~sgronblom@61.121.210.2] has joined #ruby
<sgronblo> Is there a good reason that raise deals with Exception classes instead of instances?
<sgronblo> What if your Exception has some non-standard constructor...
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
GoogleGuy [GoogleGuy!~ChromeOS@24.154.252.193] has joined #ruby
GoogleGuy [GoogleGuy!~ChromeOS@unaffiliated/googleguy] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-207.start.uni-saarland.de] has joined #ruby
kreantos [kreantos!~kreantos@clnet-kmu02-090.ikbnet.co.at] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
<sgronblo> Is it just that the docs for Exception are a bit dumb and old?
DerTyp [DerTyp!8d3495ad@gateway/web/freenode/ip.141.52.149.173] has joined #ruby
<sgronblo> raise seems to work just fine with Exception instances too
mattskic_ [mattskic_!~matt@175.176.203.129] has joined #ruby
<banisterfiend> sgronblo: read 'exceptional ruby' book
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
moshef_ [moshef_!~moshe@62.219.110.225] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
logbot45638 [logbot45638!~cinch@boxand.lnk.telstra.net] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
randym [randym!~randym@EM114-48-250-198.pool.e-mobile.ne.jp] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@222.151.223.114] has joined #ruby
davidpk [davidpk!~r00t@5adc8e56.bb.sky.com] has joined #ruby
q_addib [q_addib!~quednau_m@213.158.102.206] has joined #ruby
skim1776 [skim1776!~sergey@m212-96-64-229.cust.tele2.kz] has joined #ruby
logbot63096 [logbot63096!~cinch@boxand.lnk.telstra.net] has joined #ruby
<skim1776> in the lib file I have project_name.rb file and project_name folder, and 3 files which include only one module per file, I include them as require_relative "project_name/file_name"
<skim1776> but when I use module method such as ModuleName::module_method it raises error uninitialized constant ProjectName::ModuleName
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
Ammar01 [Ammar01!~hassaa10@gatek.thls.bbc.co.uk] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
InBar [InBar!~v@77.242.201.52] has joined #ruby
faber [faber!~faber@ppp-195-10.26-151.libero.it] has joined #ruby
nd___ [nd___!~nd@mnhm-4d01a558.pool.mediaWays.net] has joined #ruby
krz [krz!~foobar@58.69.201.60] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
skim1776 [skim1776!~sergey@m212-96-64-229.cust.tele2.kz] has quit [#ruby]
tweequla [tweequla!~tweequla@ksdfw05.rightcompetence.com] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby
Nss [Nss!~nss@host241-19-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
fra000 [fra000!~franc@93-43-144-183.ip92.fastwebnet.it] has joined #ruby
banseljaj [banseljaj!~Imami@182.186.18.216] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
tilde` [tilde`!~tilde@94.101.55.3] has joined #ruby
ksinkar [ksinkar!~ksinkar@117.195.104.73] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
djdb [djdb!~digitalbo@linux.minsk.tutby.com] has joined #ruby
eka [eka!~eka@181.28.169.86] has joined #ruby
kreantos [kreantos!~kreantos@clnet-kmu02-090.ikbnet.co.at] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
azbarcea_ [azbarcea_!~quassel@86.125.237.122] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
gyre007 [gyre007!~gajdosm@213.86.197.188] has joined #ruby
csherin [csherin!~csherin@122.166.150.76] has joined #ruby
tonini [tonini!~zastav@edge.garaio.com] has joined #ruby
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby
michael_mbp [michael_mbp!~Marin@62.215.214.4] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310A76.dip0.t-ipconnect.de] has joined #ruby
Nicke\ [Nicke\!~Nicke@h32n5c1o260.bredband.skanova.com] has joined #ruby
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
Skaag [Skaag!~Skaag@cpe-67-247-51-89.nyc.res.rr.com] has joined #ruby
mattskic [mattskic!~matt@CPE-58-174-78-71.aecz2.woo.bigpond.net.au] has joined #ruby
roolo [roolo!~roolo@customer-79-127-150-214.net.angelnet.cz] has joined #ruby
csherin [csherin!~csherin@122.166.150.76] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
Amorsen [Amorsen!~Amorsen@94.127.50.7] has joined #ruby
aroop [aroop!~aroop@50.46.157.247] has joined #ruby
csherin [csherin!~csherin@122.166.150.76] has joined #ruby
shevy [shevy!~shevy@178-190-203-159.adsl.highway.telekom.at] has joined #ruby
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby
marvin_ [marvin_!~shikhai@pD9F4D238.dip0.t-ipconnect.de] has joined #ruby
<banisterfiend> JonnieCache: ping
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
skim1776 [skim1776!~sergey@m212-96-64-229.cust.tele2.kz] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<skim1776> why doesn't "rake test" produce any output if there are tests?
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
moshef [moshef!~moshe@62.219.110.225] has joined #ruby
<moshef> is there a quick way to rotate over array and remove "duplicate" entries?
<rippa> Array#uniq
tk_ [tk_!~tk@p083005.doubleroute.jp] has joined #ruby
<Tasser> skim1776, depends on what rake test does
<moshef> rippa: thanks
<skim1776> Tasser, it produced the result, number of assertions and other, but I've changed some code(not in the test files but in source) and nothing is produced
<moshef> rippa: i'd like to remove the first one, not the last
<moshef> is it possible?
<rippa> reverse array
<moshef> yeah was about to ask if i should do that :)
<moshef> thanks
<Tasser> skim1776, bisect the changes
skim1776 [skim1776!~sergey@m212-96-64-229.cust.tele2.kz] has quit [#ruby]
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@62.215.214.4] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@62.215.214.4] has joined #ruby
gregorg [gregorg!~Greg@78.155.152.6] has joined #ruby
gregorg [gregorg!~Greg@unaffiliated/gregorg] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
Helius [Helius!~Adium@212.31.227.18] has joined #ruby
workmad3 [workmad3!~workmad3@vpn27.its.manchester.ac.uk] has joined #ruby
hron84 [hron84!~hron@catv-80-99-178-192.catv.broadband.hu] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
Azure|netbook [Azure|netbook!~azt@cinch/fan/azure] has joined #ruby
trevortwining [trevortwining!~anonymous@d221-64-66.commercial.cgocable.net] has joined #ruby
Natch| [Natch|!~natch@178.73.218.99] has joined #ruby
seivan [seivan!~seivan@bb121-6-236-4.singnet.com.sg] has joined #ruby
kaspernj [kaspernj!~kaspernj@i59F6DB19.versanet.de] has joined #ruby
ylluminate [ylluminate!~ylluminat@rrcs-24-123-53-166.central.biz.rr.com] has joined #ruby
pen [pen!~pen@2002:8c70:e6c7:b:4dcd:757:41d9:b8a4] has joined #ruby
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby
thebastl [thebastl!bastl@ve621924175.ihrserver.de] has joined #ruby
linduxed [linduxed!~linduxed@194-14-0-85.serioustubes.org] has joined #ruby
radic [radic!~radic@dslb-178-002-220-198.pools.arcor-ip.net] has joined #ruby
pigoz [pigoz!~pigoz@94.242.209.206] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
ksinkar [ksinkar!~ksinkar@117.195.104.73] has joined #ruby
ChampS666 [ChampS666!~ChampS@141.32.22.222] has joined #ruby
parus [parus!parus@gateway/shell/anapnea.net/x-ltavtcpfxtqwwojt] has joined #ruby
jemendja [jemendja!~jemendja@unaffiliated/jemendja] has joined #ruby
addisaden [addisaden!~addisaden@xdsl-89-0-148-227.netcologne.de] has joined #ruby
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
addisaden [addisaden!~addisaden@xdsl-89-0-148-227.netcologne.de] has joined #ruby
jemendja [jemendja!~jemendja@unaffiliated/jemendja] has joined #ruby
fr0gprince_ [fr0gprince_!Bart@178-85-90-223.dynamic.upc.nl] has joined #ruby
tshirtman [tshirtman!~gaby@unaffiliated/tshirtman] has joined #ruby
jemendja [jemendja!~jemendja@unaffiliated/jemendja] has quit [#ruby]
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
<tshirtman> hi there, i'm a bit new to ruby, and i'm wondering why "yield {:key => value, :key2 => value2} doesn't work, but whey i do yield some_method_that_return_an_hash, everything is ok
<tshirtman> i google around but i didn't find anyone asking about this, so no answer :]
<tshirtman> (the method just do "return {:key => value, :key2 => value2}" so the yield should be able to do the same thing, right?
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<rippa> yield({:key => value, :key2 => value2})
<tshirtman> ooooh
<tshirtman> thanks, it works, now, why? {} should be enough to isolate it right?
<rippa> {} is also block syntax
iband [iband!~iband@111.104-54-92.telenet.ru] has joined #ruby
<tshirtman> ok thanks
skim1776 [skim1776!~sergey@95.56.105.91] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
<shevy> yeah that confuses people
<shevy> hash and block syntax can be the same
<shevy> but it can be different too ... Hash.new vs. do/end
<shevy> tshirtman do you wear tshirts
<tshirtman> i only knew about do/end yet
<tshirtman> yep :)
<tshirtman> all day of the year :)
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
<shevy> what I like about {} block is that to me it is visually more appealing to group a block that way, than use do/end
<tshirtman> i was about to ask why two syntax for the same thing, especially if it makes some corner case awkward
<tshirtman> but yeah, i understand it can be nicer in some situations, i'm more of a "one way to do it" guy though (but i have to do ruby now, so i learn it ;))
<tshirtman> and i don't intend to create any flamewar, i just whant to understand :)
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
stoffus [stoffus!~stoffus@2001:9b0:1:dead:129a:ddff:fe58:6835] has joined #ruby
googya [googya!~Adium@221.133.241.50] has joined #ruby
googya [googya!~Adium@221.133.241.50] has quit [#ruby]
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
<shevy> not sure tshirtman, I think one constraint is that there is only a limited amount of syntax possible without introducing more and more keywords
davidpk [davidpk!~r00t@host81-136-139-73.in-addr.btopenworld.com] has joined #ruby
<shevy> like the addition of the ugly -> operator in ruby 1.9.x
<shevy> one way to do it is possible in ruby - just pick one, and ignore the others
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<tshirtman> yeah, of course, until you deal with other people code, that is ^^, but yeah, nothing that can't be solved with some project coding standard :)
fanzeyi [fanzeyi!~fanzeyi@123.6.120.67] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby
<shevy> I hate other people's code
<tshirtman> heh ^^ http://abstrusegoose.com/432
Fuffinii [Fuffinii!~Ufo13@93-32-242-222.ip35.fastwebnet.it] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
michael_mbp [michael_mbp!~Marin@62.215.214.4] has joined #ruby
q_addib [q_addib!~quednau_m@213.158.102.206] has quit [#ruby]
michael_mbp_ [michael_mbp_!~Marin@178.161.0.186] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
<Ammar01> hi, is there a quick and easy way to construct a date {x} years ago from today's date in ruby?
<Mon_Ouie> Date.now - 365 * x
<Mon_Ouie> Well, doesn't really work, you have to take leap years in account
<Mon_Ouie> Or use another method to create the date
amerine_ [amerine_!~mturner@bc171197.bendcable.com] has joined #ruby
<Ammar01> thanks Mon_Ouie - leap years was a concern I had too
<Ammar01> thanks oddmunds that looks very useful
<oddmunds> it looks like it should do EXACTLY what you're after :)
Jackneill [Jackneill!~Jackneill@82.131.228.11.pool.invitel.hu] has joined #ruby
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
<Mon_Ouie> I wouldn't use it for this problem though, as it doesn't involve parsing any human-written date
<Mon_Ouie> I would just use Date.new(Date.today - x, …)
<Mon_Ouie> today.year*
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
niko [niko!~niko@freenode/staff/ubuntu.member.niko] has joined #ruby
<fanzeyi> Hello, I met a problem when i try to access DATA in unittest file(I used 'test/unit').. Error Msg: uninitialized constant DATA .. Are there any ways to access DATA in a test file?
Sliker [Sliker!~ponies@87.114.96.212] has joined #ruby
codefriar [codefriar!~CodeFriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
codefriar [codefriar!~CodeFriar@cpe-098-026-012-134.nc.res.rr.com] has quit [#ruby]
gokul [gokul!~gokulnath@115.111.177.122] has joined #ruby
skim1776 [skim1776!~sergey@95.56.105.91] has quit [#ruby]
<Ammar01> Mon_Ouie that works great: x = Date.new(Date.today.year - 10). I can use x.leap? to check if it's a leap year but is there a way I can directly modify the year of that date object?
skim1776 [skim1776!~sergey@95.56.105.91] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@d307ba3b.t-net.ne.jp] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
bertho_y [bertho_y!~bertho_y@163.5.131.49] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
danibx [danibx!~danibx@200.175.180.88.static.gvt.net.br] has joined #ruby
roolo [roolo!~roolo@customer-79-127-150-214.net.angelnet.cz] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
<dagobah_> Is there a nice way to total up values in an .each{} ?
BSaboia [BSaboia!~brunosabo@187.58.94.52] has joined #ruby
<dagobah_> I don't want: total = 0 ; things.each { |thing| total += thing.size }; total;
<Mon_Ouie> Ammar01: No, date objects are immutable, you need to copy all the other attributes over
<dagobah_> What's the nicer way?
<Mon_Ouie> dagobah_: Use inject
<dagobah_> thanks
<Mon_Ouie> inject(0) { |sum, obj| sum + obj.size }
<Mon_Ouie> Ammar01: Also, don't forget what should happen when you try to get "three years from 29th February"
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
p0y [p0y!~p0y@125.212.56.10] has joined #ruby
randym_ [randym_!~randym@EM111-191-173-5.pool.e-mobile.ne.jp] has joined #ruby
q_addib [q_addib!~quednau_m@fat.tng-business.de] has joined #ruby
zwevans [zwevans!~zwevans@99-127-40-79.lightspeed.rlghnc.sbcglobal.net] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
znouza [znouza!~textual@p5DDB8C73.dip.t-dialin.net] has joined #ruby
lorandi [lorandi!~lorandi@201-1-138-249.dsl.telesp.net.br] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
d[-_-]b [d[-_-]b!~gUy@sd.0strikes.net.nz] has joined #ruby
roolo [roolo!~mailo@customer-79-127-150-214.net.angelnet.cz] has joined #ruby
_srp [_srp!~quassel@119.82.126.162] has joined #ruby
cyri_ [cyri_!~cyri_@232.93.119.80.rev.sfr.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
hyperstream [hyperstream!~gUy@unaffiliated/hyperstream] has joined #ruby
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
lorandi [lorandi!~lorandi@201-1-138-249.dsl.telesp.net.br] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
hyperstream [hyperstream!~gUy@sd.0strikes.net.nz] has joined #ruby
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
FalconCypher [FalconCypher!~FalconCyp@210.1.196.5] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
Nss [Nss!~nss@host241-19-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
p0y [p0y!~p0y@125.212.56.10] has joined #ruby
<gyre007> does every iterator have to have a block assigned to it or is there any other use of it ?
<ccooke> no, iterators are objects
<ccooke> "iterator = array.each" works, for instance, and there are methods you can call on the iterator.
<gyre007> ccooke, ok cool...I'm just a newbie hence my stupid question
<gyre007> ccooke, what kind of objects are they ? Proc objects ?
znouza [znouza!~znouza@orin.meinlschmidt.org] has joined #ruby
znouza [znouza!~znouza@orin.meinlschmidt.org] has quit [#ruby]
FalconCypher [FalconCypher!~FalconCyp@210.1.196.5] has quit [#ruby]
<ccooke> gyre007: Enumerator
<gyre007> ok
<gyre007> cheers
skim1776 [skim1776!~sergey@95.56.105.91] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
workmad3 [workmad3!~workmad3@vpn27.its.manchester.ac.uk] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
fr0gprince_mac [fr0gprince_mac!~fr0gprinc@178-85-90-223.dynamic.upc.nl] has joined #ruby
S2kx [S2kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
daglees [daglees!~belvedere@92.62.115.195] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
`brendan [`brendan!~b@107-1-118-122-ip-static.hfc.comcastbusiness.net] has joined #ruby
jensn [jensn!~Jens@ip236-59.wireless.lu.se] has joined #ruby
<`brendan> morning ya'll
jtrudeau [jtrudeau!~jeff@75-150-71-83-NewEngland.hfc.comcastbusiness.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
fayimora_ [fayimora_!~fayimora@138.37.124.41] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
fayimora [fayimora!~fayimora@138.37.124.41] has joined #ruby
grekko [grekko!~grekko@dslb-188-098-182-059.pools.arcor-ip.net] has joined #ruby
fayimora [fayimora!~fayimora@138.37.124.41] has joined #ruby
apow [apow!~wopa@177.17.127.74] has joined #ruby
fanzeyi [fanzeyi!~fanzeyi@123.6.120.67] has quit [#ruby]
mberning [mberning!~M@rrcs-98-102-134-241.central.biz.rr.com] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
jrist [jrist!jrist@nat/redhat/x-xmewegjlesgwkscx] has joined #ruby
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-orpfwiphxvxrcvod] has joined #ruby
b26 [b26!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
tubgoat_ [tubgoat_!~tubgoat@gateway/tor-sasl/tugboat] has joined #ruby
TomJ [TomJ!~TomJ@unaffiliated/tomj] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
p0y_ [p0y_!~p0y@112.210.87.132] has joined #ruby
jlebrech [jlebrech!~textual@host86-135-203-241.range86-135.btcentralplus.com] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
jasim [jasim!~jasim@122.172.224.154] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
sbanwart [sbanwart!~sbanwart@66.6.175.18] has joined #ruby
josefig [josefig!~josef@187.156.91.147] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
rizzy [rizzy!~chatzilla@67.107.136.98.ptr.us.xo.net] has joined #ruby
skim1776 [skim1776!~sergey@95.56.105.91] has quit [#ruby]
justfielding [justfielding!~justfield@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
p0y [p0y!~p0y@112.210.87.132] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
naquad [naquad!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
BSaboia [BSaboia!~brunosabo@187.58.94.52] has joined #ruby
a_a_g [a_a_g!~aag@203.123.164.34] has quit [#ruby]
vereteran [vereteran!~vereteran@static.88-198-170-117.clients.your-server.de] has joined #ruby
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
blackrock [blackrock!~blackrock@122.201.18.147] has joined #ruby
Twixmix [Twixmix!~ryanniels@blk-11-127-105.eastlink.ca] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby
cantbecool [cantbecool!~cantbecoo@38.98.246.130] has joined #ruby
cantbecool [cantbecool!~cantbecoo@38.98.246.130] has quit [#ruby]
ChampS666 [ChampS666!~ChampS@141.32.22.222] has joined #ruby
p0y [p0y!~p0y@125.212.56.10] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
DerTyp [DerTyp!8d3495ad@gateway/web/freenode/ip.141.52.149.173] has joined #ruby
Cypher [Cypher!~kapone@208.157.149.45] has joined #ruby
<DerTyp> hello
banseljaj [banseljaj!~Imami@182.186.18.216] has joined #ruby
qelsi [qelsi!~qelsi@190.Red-79-156-39.staticIP.rima-tde.net] has joined #ruby
cemycc [cemycc!~cemycc@79.112.122.222] has joined #ruby
kf8a [kf8a!~kf8a@user-33c730.user.msu.edu] has joined #ruby
<DerTyp> can anyone tell me where I can find a more detailed error than that on the browser: Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
kreantos [kreantos!~kreantos@clnet-kmu02-090.ikbnet.co.at] has joined #ruby
booginga [booginga!~booginga@204-15-4-10-static.webjogger.net] has joined #ruby
jrist [jrist!jrist@nat/redhat/x-gkxmgmndcssgchfm] has joined #ruby
nvez [nvez!~textual@bas1-montreal54-1167956059.dsl.bell.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
kpshek [kpshek!~kpshek@159.140.254.101] has joined #ruby
hyperstream [hyperstream!~gUy@sd.0strikes.net.nz] has joined #ruby
carlyle [carlyle!~carlyle@216.133.69.18] has joined #ruby
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has joined #ruby
bbttxu [bbttxu!~adam@68-191-221-18.static.dntn.tx.charter.com] has joined #ruby
Targen [Targen!~iguana@159.90.11.250] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
drknus [drknus!~user@blk-222-141-162.eastlink.ca] has joined #ruby
tomzx [tomzx!~tomzx@dsl-60-24.aei.ca] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
crankycoder [crankycoder!~crankycod@out-on-214.wireless.telus.com] has joined #ruby
AxonetBE [AxonetBE!~Adium@d51530F99.static.telenet.be] has joined #ruby
<AxonetBE> I'm using ruby 1.9.3 and when I load the app he gives me [FATAL] failed to allocate memory
<AxonetBE> using it with rails 3.2.1
geekbri [geekbri!~geekbri@208.252.10.190] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
AxonetBE [AxonetBE!~Adium@d51530F99.static.telenet.be] has quit [#ruby]
<shevy> typical 1.9.x
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
workmad3 [workmad3!~workmad3@vpn9.its.manchester.ac.uk] has joined #ruby
yalue [yalue!812131fb@gateway/web/freenode/ip.129.33.49.251] has joined #ruby
csavola [csavola!~csavola@76-10-149-67.dsl.teksavvy.com] has joined #ruby
p0y_ [p0y_!~p0y@112.210.87.132] has joined #ruby
tensai_cirno [tensai_cirno!~cirno@77.232.15.216] has joined #ruby
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby
porco [porco!~porco@125.33.83.213] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<shevy> I think we witness a negative evolution for a while, until things eventually reach a turning point and get better again
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
hosiawak [hosiawak!~hosiawak@hogo.pl] has joined #ruby
rippa [rippa!~rippa@109-161-65-161.pppoe.yaroslavl.ru] has joined #ruby
d[-_-]b [d[-_-]b!~gUy@pl.0strikes.net.nz] has joined #ruby
lorandi [lorandi!~lorandi@201-1-138-249.dsl.telesp.net.br] has joined #ruby
mw44118 [mw44118!~mw44118@li18-183.members.linode.com] has joined #ruby
<banisterfiend> shevy: watch this with me http://www.sockshare.com/file/0F59185170CD897A#
googya [googya!~Adium@114.91.131.10] has joined #ruby
<mw44118> just for fun, I have a question about ruby. Could I modify the assignment method on an object x, so that when somebody does y = x, instead of setting y to point to x, y points to something else? How would I do that?
<rippa> no
<rippa> you can't
<googya> hi,all, I met a problem when using apache2 and passenger
<JonnieCache> mw44118: you sort of could, you can write setter methods which lie about what they do
<mw44118> rippa: OK, but I could do y.foo = x, and define the assignment method for y.foo.
<JonnieCache> you cant do it with local variable assignment though
<rippa> mw44118: yes
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
<mw44118> rippa: thanks
<Mon_Ouie> mw44118: You can't because there is no assignment method
<Mon_Ouie> C++'s operator= is more like Ruby's replace method
<Mon_Ouie> e.g. str = "foo"; str.replace "bar" # str is still the same object, with a different content
druznek [druznek!~druznek@212.45.155.229] has joined #ruby
sleetdrop [sleetdrop!~sleetdrop@114.249.236.83] has joined #ruby
jackerran [jackerran!~jackerran@fw.luckie.net] has joined #ruby
internet_user [internet_user!~internet_@abe.cul.columbia.edu] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@64.254.250.82] has joined #ruby
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
lorandi [lorandi!~lorandi@201-1-138-249.dsl.telesp.net.br] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
blackrock [blackrock!~blackrock@122.201.18.147] has quit ["Leaving"]
<DerTyp> I get this error code in the browser: Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html
<DerTyp> trying to run getontracks
<DerTyp> can anyone tell me where i can find a more detailed error message
PaciFisT [PaciFisT!~PeaCE@76.10.149.67] has joined #ruby
q_addib [q_addib!~quednau_m@fat.tng-business.de] has quit [#ruby]
Faris [Faris!~amnay@41.248.220.99] has joined #ruby
theRoUS [theRoUS!KenCoar@nat/redhat/x-xsohwbykzftsavdf] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
p0y [p0y!~p0y@125.212.56.10] has joined #ruby
hron85 [hron85!~hron@193.224.41.157] has joined #ruby
Nss [Nss!~nss@host241-19-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
Nss [Nss!~nss@host241-19-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
porco [porco!~porco@125.33.83.213] has joined #ruby
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
emocakes [emocakes!~om@p57974F67.dip.t-dialin.net] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
tweeKula [tweeKula!~tweequla@ksdfw05.rightcompetence.com] has joined #ruby
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
jfoley [jfoley!~jfoley@173-8-251-217-Colorado.hfc.comcastbusiness.net] has joined #ruby
baroquebobcat [baroquebobcat!~nick@173-164-36-90-colorado.hfc.comcastbusiness.net] has joined #ruby
poppiez [poppiez!~unknown@130.185.143.130] has joined #ruby
Ankhers [Ankhers!~user@76-10-149-67.dsl.teksavvy.com] has joined #ruby
lorandi [lorandi!~lorandi@201-1-138-249.dsl.telesp.net.br] has joined #ruby
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
addisaden [addisaden!~addisaden@j18942.servers.jiffybox.net] has joined #ruby
cantbecool_ [cantbecool_!~cantbecoo@38.98.246.130] has joined #ruby
jensn [jensn!~Jens@ip236-59.wireless.lu.se] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
Natch| [Natch|!~natch@178.73.217.91] has joined #ruby
Skaag [Skaag!~Skaag@67.133.201.89] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
Nightblade [Nightblade!~mpc@108-83-52-146.lightspeed.cicril.sbcglobal.net] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
p0y_ [p0y_!~p0y@112.210.87.132] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby
Cypher [Cypher!~kapone@208.157.149.45] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
p0y [p0y!~p0y@125.212.56.10] has joined #ruby
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
jensn [jensn!~Jens@ip236-59.wireless.lu.se] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
asteve [asteve!~asteve@unaffiliated/kxsteve] has joined #ruby
<asteve> header['content-type'] ||= ''; what is this statement doing?
eldariof [eldariof!~CLD@81.200.24.249] has joined #ruby
ikaros [ikaros!~ikaros@dslb-094-219-214-087.pools.arcor-ip.net] has joined #ruby
baroquebobcat [baroquebobcat!~nick@70-90-113-174-co.denver.hfc.comcastbusiness.net] has joined #ruby
RegEchse [RegEchse!~regechse@h1985974.stratoserver.net] has joined #ruby
mkscrg [mkscrg!~mkscrg@pool-108-41-134-165.nycmny.fios.verizon.net] has joined #ruby
<waxjar> it's a tricky statement, but here's a good explanation: http://www.rubyinside.com/what-rubys-double-pipe-or-equals-really-does-5488.html
<waxjar> basically it assigns '' to header['content-type'] when header['content-type'] is nil
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
maletor [maletor!~maletor@c-69-181-24-86.hsd1.ca.comcast.net] has joined #ruby
<asteve> @var = instance variable, @@var = class variable, $var = global variable?
Helius [Helius!~Adium@109.112.231.126] has joined #ruby
<asteve> header[] is not an array but a hash?
<waxjar> yes
kenperkins [kenperkins!~textual@174-24-134-155.tukw.qwest.net] has joined #ruby
Skaag [Skaag!~Skaag@1-18-132-169.idt.net] has joined #ruby
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
bsilwal [bsilwal!~bsilwal@141.0.34.138] has joined #ruby
p0y [p0y!~p0y@125.212.56.10] has joined #ruby
dyer [dyer!~dyer@c-66-56-12-125.hsd1.ga.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
Nightblade [Nightblade!~mpc@108-83-52-146.lightspeed.cicril.sbcglobal.net] has quit [#ruby]
DrShoggoth [DrShoggoth!~prakwtf@12.116.104.118] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby
cantbecool_ [cantbecool_!~cantbecoo@38.98.246.130] has quit [#ruby]
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
bsilwal [bsilwal!~bsilwal@141.0.34.138] has joined #ruby
jesseangell [jesseangell!~jesseange@h70.251.190.173.static.ip.windstream.net] has joined #ruby
youdonotexist [youdonotexist!~youdonote@192.206.158.10] has joined #ruby
herval [herval!~Adium@186.215.248.58] has joined #ruby
jergason [jergason!~jergason@128.187.169.118] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:b826:f35b:4864:bcab] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
asteve [asteve!~asteve@unaffiliated/kxsteve] has quit [#ruby]
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
virtuoussin13 [virtuoussin13!~chatzilla@pool-96-255-198-127.washdc.fios.verizon.net] has joined #ruby
bsilwal [bsilwal!~bsilwal@141.0.34.138] has joined #ruby
<virtuoussin13> I have question. I'm looking at a module that uses self.extended to get some special behavior when a module is extended. Where is that method, and others like it, documented?
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<virtuoussin13> In particular, i'm trying to find a way to get a special handler to run whenever a new method is defined on an object
asmdroid [asmdroid!~nchat@5ac02823.bb.sky.com] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
dl3r [dl3r!~dl3r@gateway/tor-sasl/dl3r] has joined #ruby
asmdroid [asmdroid!~nchat@5ac02823.bb.sky.com] has joined #ruby
<dl3r> exists a function to check whether a number existing in a string?
Dreamer3 [Dreamer3!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby
adman65 [adman65!~adman65@75.18.139.70] has joined #ruby
<Seppman> of course, use string.match(/\d/) #! /\d/ - A digit character ([0-9])
daglees [daglees!~belvedere@91.186.226.125] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
glacius [glacius!~glac@remote.pba.edu] has joined #ruby
akem_ [akem_!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
<glacius> outside of active record waht is the best way to access a sql server data from ruby
samsonjs [samsonjs!~samsonjs@184.66.154.246] has joined #ruby
akem_ [akem_!~akem@unaffiliated/akem] has joined #ruby
<dl3r> i found a better solution Seppman, look :3 http://hadoop.apache.org/
jergason [jergason!~jergason@128.187.148.22] has joined #ruby
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby
<Seppman> dl3r: Overkill for testing if Digit exists in a String :-)
<dl3r> Seppman: no, my code is better than yours, because it's faster :P
ickmund [ickmund!~ickmund@cli-5b7e85fc.bcn.adamo.es] has joined #ruby
<Seppman> we'll see next week
<virtuoussin13> I see this idiiom a lot, what exactly is this used for? class << self; self; end
daglees__ [daglees__!~belvedere@unaffiliated/daglees] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
<ccooke> virtuoussin13: it accesses the metaclass of 'self' (also known as the eigenclass)
madrax [madrax!~Miguel@200.124.199.108] has joined #ruby
<virtuoussin13> so, the class object of self?
<ccooke> no, not really
<ccooke> Everything in ruby is an object, and every object has a class
<ccooke> Every object, though, has an eigenclass. Imagine it as a parent class that's specific to that object alone
<virtuoussin13> ah
<ccooke> (there are better descriptions)
<virtuoussin13> so what does the << bit mean? I know that class < whatever means inheritance
jgrevich [jgrevich!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-188-100-254-093.pools.arcor-ip.net] has joined #ruby
<blueadept> really dump question i know but how do i reference this provider value? http://pastie.org/private/t83dfdgumxrjpe9kxpjw
<blueadept> dumb*
<ccooke> virtuoussin13: that's used to access the metaclass
elliot_ [elliot_!~elliot@77.124.207.61] has joined #ruby
<virtuoussin13> I see. So it's a way to add a method to a specific instance of a class?
<virtuoussin13> why not just use define_method or whatever?
elliot98 [elliot98!~elliot@unaffiliated/elliot98] has joined #ruby
<ccooke> virtuoussin13: that is: "class Foo": A new class named Foo. "class X < Foo": A new class X, inheriting from Foo. "class << x": Access the metaclass of x
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-ffsmzmzvltckgqdz] has joined #ruby
<elliot98> hello
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
<virtuoussin13> ccooke: I see. Why the self; in the body of class << self; self; end ?
<elliot98> how would it be possible to set up RUBY with COM and be able to read ODL files?
<ccooke> virtuoussin13: because there, the metaclass you're trying to access is that of self - your own metaclass.
<ccooke> virtuoussin13: define_method will, in class context, add new methods to the class. If you create a new object in the same class, you'll see the new method.
Jake232 [Jake232!~textual@5e04bcd1.bb.sky.com] has joined #ruby
<ccooke> virtuoussin13: if you define methods in a metaclass, they are specific to the one object the metaclass is tied to.
<virtuoussin13> but couldn't you do x = A.new; x.define_method(:whatever, whatever) ?
<ccooke> virtuoussin13: so, you can define a new method "bar" which is unique to a single instance of the object.
baroquebobcat [baroquebobcat!~nick@70-90-113-174-co.denver.hfc.comcastbusiness.net] has joined #ruby
advorak [advorak!~advorak@216-15-16-163.c3-0.161-ubr1.lnh-161.md.cable.rcn.com] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<Seppman> Just one fast and simple question: Whats the fastest way to switch a boolean to its opposite, like if bool = true then bool = false else if bool = false then bool = true
<ccooke> virtuoussin13: but x is not a class, and thus does not have the define_method method :-)
<ccooke> Seppman: !bool is usually used
rippa [rippa!~rippa@109-161-65-161.pppoe.yaroslavl.ru] has joined #ruby
<virtuoussin13> so is that the only way to add in an instance method to a specific object?
<Seppman> thanks a lot. and i can simply do !bool or is it better to use bool = !bool?
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
badabim [badabim!~badabim@17.212.166.202] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
<ccooke> virtuoussin13: it's certainly the *cleanest* way :-)
<virtuoussin13> I see
* Seppman hasn't got it when the fuction changes the object itself or makes a changed return value
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
atmosx [atmosx!~textual@188.4.239.74.dsl.dyn.forthnet.gr] has joined #ruby
<virtuoussin13> where can I find the documentation for stuff like method_added, extended, or whatever?
internet_user [internet_user!~internet_@abe.cul.columbia.edu] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
<blueadept> how can you check if value is an array or not?
<blueadept> kind_of?(Array)?
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<elliot98> basically, there's some ODL files along with some DLLs and want to know how to insert them into RUBY
<rippa> blueadept: also #is_a?
fr0gprince_mac [fr0gprince_mac!~fr0gprinc@178-85-90-223.dynamic.upc.nl] has joined #ruby
<blueadept> cool
<blueadept> thanks!
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has quit [#ruby]
<ccooke> virtuoussin13: google is pretty useful, there ;-)
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
<virtuoussin13> I mean, I did
<virtuoussin13> and I get blog posts
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
<Seppman> i did it with bool = !bool, that will work in any case
<virtuoussin13> it doesn't seem to exist on ruby-doc.org
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has quit [#ruby]
<virtuoussin13> the defined method doesn't not appear in the API for object, module, or class
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<virtuoussin13> googling for ruby callbacks gets me the blog post where I first heard about method_added
<virtuoussin13> google for "ruby extended method" and several variations just gets me tons of documentation for the "extend" method, and stuff about how to extend classes in Ruby
<virtuoussin13> so no ccooke, google not pretty useful here at all
<ccooke> http://ruby-doc.org/docs/ProgrammingRuby/html/ref_c_object.html - fourth link here from google "method_missing"
<virtuoussin13> i'm not asking about method missing
<virtuoussin13> none of the methods I'm talking about are listed in there
cemycc [cemycc!~cemycc@79.112.122.222] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
<ccooke> Fourth link from method_added on google ;-)
JonSchuff [JonSchuff!~textual@38.123.129.10] has joined #ruby
<virtuoussin13> ccooke: I assume that was for me?
<ccooke> aye.
<ccooke> virtuoussin13: look at Class, too
<virtuoussin13> why does that method not appear in www.ruby-doc.org/core-1.9.3/Module.html
<virtuoussin13> is it deprecated or something?
tsousa [tsousa!~tsousa@188.251.92.164] has joined #ruby
<tsousa> in how much time can i learn ruby?
<virtuoussin13> tsousa: 4 years and 5 days
<virtuoussin13> exactly
<tsousa> i already know some python and some c and some haskell
<virtuoussin13> 4 years and 4 days if you're REALLY good
<jesseangell> tsousa: in that case…about 5 years to unlearn all that
<virtuoussin13> don't look haskell and c tho
<virtuoussin13> *unlearn
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
badabim_ [badabim_!~badabim@17.212.167.10] has joined #ruby
<tsousa> yeh thanks is that i need to write an webpage for some small organization
savage- [savage-!~savage_@istep.static.monkeybrains.net] has joined #ruby
<tsousa> and i was looking ate ruby
<tsousa> for start some web dev
<tsousa> i dont know any web dev stuff
<virtuoussin13> tsousa: you should consider using assembly for web dev
<tsousa> yeh thanks
<virtuoussin13> :P
<tsousa> vou are beeing very helpfull
<virtuoussin13> fwiw, I could pick up ruby in maybe a week
<virtuoussin13> that was just ruby itself tho, I dunno how long it would take to learn Rails
<jesseangell> tsousa: honestly..the best web dev solution these days is: https://github.com/jayferd/balls
<virtuoussin13> jesseangell: I'm shocked that exists
Liothen [Liothen!~liothen@pdpc/supporter/professional/liothen] has joined #ruby
<jesseangell> virtuoussin13: its my favorite enterprise stack…beats java at least
<virtuoussin13> hah
<tsousa> jesseangell, yeh that should be awesome to write a medium website + meeting/organization technology
<savage-> hi
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
<savage-> wow, limechat is WAY better than colloquy
kenichi [kenichi!~kenichi@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
enherit [enherit!~enherit@216.3.99.206] has joined #ruby
roolo [roolo!~mailo@customer-79-127-150-214.net.angelnet.cz] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
Faris1 [Faris1!~amnay@41.248.220.99] has joined #ruby
Asher [Asher!~asher@res-105001.nat.emory.edu] has joined #ruby
kreantos [kreantos!~kreantos@77.118.171.36.wireless.dyn.drei.com] has joined #ruby
amerine [amerine!~mturner@67.204.184.82] has joined #ruby
jgrevich [jgrevich!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
award85 [award85!~itsame@unaffiliated/award85] has joined #ruby
panpainter [panpainter!~panpainte@4.30.138.134] has joined #ruby
mikepack_ [mikepack_!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-61-129.albq.qwest.net] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
theRoUS [theRoUS!KenCoar@nat/redhat/x-tedtvsmydhahymcs] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
<davidcelis> if you're not gonna go with command line, textual is probably the best OS X IRC client
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
n8ji [n8ji!~n8ji@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
nd______ [nd______!~nd@mnhm-590e420a.pool.mediaWays.net] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has joined #ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
mikepack1 [mikepack1!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-orasybnnjetluxet] has joined #ruby
adamkittelson [adamkittelson!~adamkitte@50.0.132.2] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-61-129.albq.qwest.net] has joined #ruby
alem0lars [alem0lars!~alem0lars@87.13.190.93] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
crankyco_ [crankyco_!~crankycod@24-246-44-67.cable.teksavvy.com] has joined #ruby
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
xec- [xec-!~xec@54.109-247-17.customer.lyse.net] has joined #ruby
Sliker [Sliker!~ponies@87.114.96.212] has joined #ruby
cdepue [cdepue!~cdepue@186.8.200.7] has joined #ruby
<Dreamer3> can i have an initializer return a different class?
<Dreamer3> like a subclass?
Azure|dc [Azure|dc!~azt@cinch/fan/azure] has joined #ruby
<Dreamer3> Animal.new("dog") => <Dog>
rowanu [rowanu!~rowanu@modemcable171.160-83-70.mc.videotron.ca] has joined #ruby
<Dreamer3> or do i just need to write a class method to accomplish something like that
<ccooke> Dreamer3: you can overload self.new if you really want to (you would have to call 'super' in it), but a new factory method would be much cleaner
<ccooke> (and wouldn't break the principle of least surprise)
<apeiros_> ccooke: it's not overloading. it's simply defining.
<apeiros_> (not even redefining)
<ccooke> apeiros_: this is very true.
<apeiros_> and I don't think you'd have to call super either.
<apeiros_> class Animal; def self.new(type); if type == "dog" then Dog.new else …
Y_Ichiro [Y_Ichiro!~yichi@wikipedia/Yamamoto-Ichiro] has joined #ruby
<ccooke> apeiros_: hmm. it's the else that's the problem.
<apeiros_> or case, or hash-lookup, or const_get with string manipulation, etc.
<ccooke> apeiros_: if you want to have a possibility of creating an Animal object, anyway
<apeiros_> ah, ok, yes, then super would be the proper way to go.
voodoofish430 [voodoofish430!~mtorres@208.76.2.200] has joined #ruby
<ccooke> if you define a .new and do *not* call super, then you cannot create an object of your *own* class.
award85 [award85!~itsame@unaffiliated/award85] has joined #ruby
<apeiros_> also you'd have to take care of the redefined super if you inherit from Animal
michael_mbp [michael_mbp!~Marin@149.147.73.7] has joined #ruby
<apeiros_> so Dog.new actually works, if Dog < Animal
<ccooke> yeah.
<ccooke> basically, it's quite doable but an absolute minefield.
<twixmix> Ya I don't really get why you'd do it, seems strange to me.
<ccooke> hence it being better to use a factory method
<ccooke> well, if you wanted to do class-level things *before* creating an object, the cleanest option would be to define a self.new and call super in it.
Asher [Asher!~asher@98.158.127.150] has joined #ruby
<ccooke> a valid option there, for instance, is if you want your class to only have one instance for a particular set of parameters to new()
<ccooke> you can store the result of super() into a hash, then in new() before calling super you can check the hash and return the pre-existing instance without actually creating a new object.
raluxgaza [raluxgaza!~raluxgaza@host-92-24-95-7.ppp.as43234.net] has joined #ruby
herval1 [herval1!~Adium@186.215.248.58] has joined #ruby
raluxgaza [raluxgaza!~raluxgaza@host-92-24-95-7.ppp.as43234.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
alfism [alfism!~alfism@2620:149:4:1201:b826:f35b:4864:bcab] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
<Dreamer3> ccooke: ah, thanks :)
theRoUS [theRoUS!KenCoar@nat/redhat/x-xlrrtzuwsedvakcf] has joined #ruby
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
Jake232 [Jake232!~textual@5e0217b6.bb.sky.com] has joined #ruby
<Dreamer3> does new call initialize then?
<Dreamer3> guess i can bang out a test
iamjarvo [iamjarvo!~Adium@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby
<twixmix> Yes new calls initialize
<ccooke> Dreamer3: yes, it does. If you call super, that'll be handled for you though
michael_mbp_ [michael_mbp_!~Marin@31.203.170.171] has joined #ruby
<twixmix> Dreamer3: Yes, super will also automatically pass along all the method parameters
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
emocakes [emocakes!~om@p57974F67.dip.t-dialin.net] has joined #ruby
<ccooke> twixmix: well, it will if you call it as "super". If you call "super( params )" then it will pass what you give it.)
<twixmix> ccooke: This is true
<Dreamer3> but if i'm overriding the behavior i don't really want to call super, do it? :)
<apeiros_> it will also pass blocks
<apeiros_> even with super()
<Dreamer3> if i'm just calling new on a different class
<Dreamer3> i'd just have something like a case statement that called new on the appropriate class (for my simple example)
<ccooke> Dreamer3: will you ever want an instance of the class your modified new is defined in?
<apeiros_> Dreamer3: why do you insist on new btw?
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
kenperkins [kenperkins!~textual@174-24-134-155.tukw.qwest.net] has joined #ruby
<apeiros_> why not e.g. Animal["dog"].new?
<apeiros_> that'd not break the "contract" of Class#new
<Dreamer3> that's a neat syntax
<ccooke> apeiros_: that's a nice idiom
<Dreamer3> i don't even think i'd need new :)
<Dreamer3> Vin["1234567890"]
<ccooke> Dreamer3: you can get apeiros_'s idiom by defining self.[]
<Dreamer3> returns the proper object
<Dreamer3> ccooke: yes i know :)
<Dreamer3> i hadn't thought of that
<twixmix> apeiros_: Ya, that's a decent way to do it without breaking new.
minh [minh!~minh@p5DD7C33D.dip.t-dialin.net] has joined #ruby
<Dreamer3> apeiros_: i'm not insisting, was just curious :)
<Dreamer3> using new would just avoid rewriting existing API code :)
<Dreamer3> since vins are created using new currently
<Dreamer3> but that can be changed :)
Skaag_ [Skaag_!~Skaag@67.133.201.89] has joined #ruby
<Dreamer3> honestly i don't think it's that bad if Class.new returned a subclass of Class to be honest
crankycoder [crankycoder!~crankycod@24-246-44-67.cable.teksavvy.com] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@149.147.146.48] has joined #ruby
<Dreamer3> Animal.new("dog").bark!
<minh> Hi there! I'm very, very new to Ruby and wondered how to dynamically/programmatically determine which modules are included by a class (e.g. class 'Range' includes module 'Enumerable' by default)
<Dreamer3> Animal.new("duck").quack!
<Dreamer3> but really my case is more about duck typing… when all classes would have a similar API
<Dreamer3> so you shouldn't care which class your'e working with
<Dreamer3> but the implimention details would be hidden
<Dreamer3> anwyays, thanks :)
<virtuoussin13> I see stuff like ||= and &&= in code. What do those operators mean?
<deryldoucette> ||= means if the left-0hand is not set (or is nil) then set it
<virtuoussin13> oh, conditional assignment
<deryldoucette> yea
<twixmix> virtuoussin13 basically var || var = []
<twixmix> var ||= []
<twixmix> basically return var, or set var to [] if it doesn't exist.
<atmosx> aloha rubyists
josefig [josefig!~josef@187.156.91.147] has joined #ruby
josefig [josefig!~josef@unaffiliated/josefig] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
casit1 [casit1!~textual@pat-ip-129-15-127-64.fennfwsm.ou.edu] has joined #ruby
Skaag [Skaag!~Skaag@1-18-132-169.idt.net] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
<twixmix> yo
demian`_ [demian`_!~demian_@80.149.203.160] has joined #ruby
cdepue [cdepue!~cdepue@186.8.216.80] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-230-203.slkc.qwest.net] has joined #ruby
Avi` [Avi`!~mine@unaffiliated/avi/x-8629955] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
cantbecool [cantbecool!~cantbecoo@38.98.246.130] has joined #ruby
ChampS666 [ChampS666!~ChampS@p54B4AB0E.dip.t-dialin.net] has joined #ruby
casit1 [casit1!~textual@pat-ip-129-15-127-64.fennfwsm.ou.edu] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby
Nss [Nss!~nss@host241-19-dynamic.53-79-r.retail.telecomitalia.it] has joined #ruby
mrtheshadow [mrtheshadow!~mrtheshad@c-67-188-215-51.hsd1.ca.comcast.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
kpshek [kpshek!~kpshek@159.140.254.101] has joined #ruby
danishkhan [danishkhan!~danishkha@enginey-9.border1.sfo002.pnap.net] has joined #ruby
badabim_ [badabim_!~badabim@17.212.167.10] has joined #ruby
qelsi [qelsi!~qelsi@190.Red-79-156-39.staticIP.rima-tde.net] has joined #ruby
dasfugufish1 [dasfugufish1!~Adium@174-27-230-203.slkc.qwest.net] has joined #ruby
ewag [ewag!~ewagner@216.177.133.121] has joined #ruby
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
ewag [ewag!~ewagner@216.177.133.121] has joined #ruby
VictorMartins [VictorMartins!~VictorMar@87-196-74-94.net.novis.pt] has joined #ruby
asmdroid [asmdroid!~nchat@5ac02823.bb.sky.com] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-230-203.slkc.qwest.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@68.178.19.17] has joined #ruby
rowanu [rowanu!~rowanu@modemcable171.160-83-70.mc.videotron.ca] has joined #ruby
alem0lars [alem0lars!~alem0lars@87.13.190.93] has joined #ruby
bluOxigen [bluOxigen!~noreply@unaffiliated/bluOxigen] has joined #ruby
notjohn [notjohn!~john@WS1-DSL-208-102-253-169.fuse.net] has joined #ruby
hugalua [hugalua!~asdf@108-69-128-62.lightspeed.sntcca.sbcglobal.net] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
ewag [ewag!~ewagner@216.177.133.121] has joined #ruby
jbpros [jbpros!~jbpros@188-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby
LMolr [LMolr!~quassel@87.13.190.93] has joined #ruby
<LMolr> Hi, we are planning to make a simple invoice/quote application, and we would like to release it as both a web application and a native application. Anyone knows some references to architectural patterns to start an analysis? Thanks
cmasseraf [cmasseraf!~cmasseraf@186.223.223.160] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
rowanu_ [rowanu_!~rowanu@modemcable171.160-83-70.mc.videotron.ca] has joined #ruby
apucacao [apucacao!~apucacao@thelevel.com] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
mkmkmk [mkmkmk!~mkmkmk@rrcs-76-79-247-242.west.biz.rr.com] has joined #ruby
jbpros [jbpros!~jbpros@188-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@149.147.172.146] has joined #ruby
jds [jds!~jds@188-220-60-85.zone11.bethere.co.uk] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
ChampS666 [ChampS666!~ChampS@p54B4AB0E.dip.t-dialin.net] has joined #ruby
zastaph [zastaph!~uid@unaffiliated/zastaph] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@178.161.14.49] has joined #ruby
jergason [jergason!~jergason@208.97.56.66] has joined #ruby
dcarper [dcarper!~dcarper@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
jesseangell [jesseangell!~jesseange@h70.251.190.173.static.ip.windstream.net] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@149.147.169.18] has joined #ruby
mkmkmk1 [mkmkmk1!~mkmkmk@rrcs-173-196-10-131.west.biz.rr.com] has joined #ruby
jesseangell [jesseangell!~jesseange@h70.251.190.173.static.ip.windstream.net] has joined #ruby
oogali [oogali!unknown@dipole.idlepattern.com] has quit [#ruby]
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@75.103.0.45] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@31.203.246.58] has joined #ruby
tensai_cirno [tensai_cirno!~cirno@77.232.15.216] has joined #ruby
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
nicoulaj [nicoulaj!~nicoulaj@pas38-5-82-244-59-208.fbx.proxad.net] has joined #ruby
jergason [jergason!~jergason@208.97.56.66] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
dagobah [dagobah!~ben@cpc8-pool13-2-0-cust67.15-1.cable.virginmedia.com] has joined #ruby
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
phantomfake [phantomfake!~i@pool-71-190-229-236.nycmny.fios.verizon.net] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
tensai_cirno [tensai_cirno!~cirno@77.232.15.216] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
Y_Ichiro [Y_Ichiro!~yichi@wikipedia/Yamamoto-Ichiro] has joined #ruby
qelsi [qelsi!~qelsi@190.Red-79-156-39.staticIP.rima-tde.net] has joined #ruby
dyer [dyer!~dyer@c-66-56-12-125.hsd1.ga.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
gigamonkey [gigamonkey!~user@adsl-99-169-80-215.dsl.pltn13.sbcglobal.net] has joined #ruby
award85 [award85!~itsame@unaffiliated/award85] has joined #ruby
<dagobah> How do I map rows in a database to (as yet uninitialized) ruby classes?
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
jbpros [jbpros!~jbpros@188-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
jfoley [jfoley!~jfoley@173-8-251-217-Colorado.hfc.comcastbusiness.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
heimark [heimark!~heimark@216-110-10-170.static.twtelecom.net] has joined #ruby
ChampS666 [ChampS666!~ChampS@p54B4A683.dip.t-dialin.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<heimark> anyone have a moment to help me with a question about modules?
tensai_cirno [tensai_cirno!~cirno@77.232.15.216] has joined #ruby
<Mon_Ouie> Probably, but don't ask to ask anyway
blischalk [blischalk!~brettlisc@173-165-48-46-Illinois.hfc.comcastbusiness.net] has joined #ruby
jaywastaken [jaywastaken!~jaywastak@unaffiliated/jaywastaken] has joined #ruby
tvw [tvw!~tv@e176005093.adsl.alicedsl.de] has joined #ruby
tibaza [tibaza!~user@c25-ravpn.inflow.pa.bo.comcast.net] has joined #ruby
<heimark> haha, ok.. i'll just ask then
tibaza [tibaza!~user@c25-ravpn.inflow.pa.bo.comcast.net] has quit [#ruby]
<heimark> i am trying to write a set of methods to prettify console output that is tabular (in a table)
<heimark> so it has nice lines
<heimark> i am using a module and including it across classes
<heimark> but want a way to set the border character
<heimark> where the default border character is "|" but this can be changed with accessor methods
<heimark> whats the right way to do that in ruby?
<heimark> *if there is a 'right' way
emocakes [emocakes!~om@p57974F67.dip.t-dialin.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<Mon_Ouie> You can use instance variables for that (including instance variables of the class itself)
Squarepy [Squarepy!~Luuk@ip82-139-118-42.lijbrandt.net] has joined #ruby
<heimark> and instantiate the variable in the module?
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby
Squarepy [Squarepy!~Luuk@unaffiliated/squarepy] has joined #ruby
<Mon_Ouie> A variable is never "instanciated" or "defined", it exists as soon as you set it to something
jgrevich_ [jgrevich_!~jgrevich@cpe-98-155-91-244.san.res.rr.com] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-61-129.albq.qwest.net] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has joined #ruby
jgrevich [jgrevich!~jgrevich@cpe-98-155-91-244.san.res.rr.com] has joined #ruby
jgrevich [jgrevich!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
<heimark> ok, but where would I set the initial value, to make sure that there is a default?
<heimark> like this? http://pastebin.com/2jL8GJFT
<heimark> are those second and third methods redundant?
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
<Mon_Ouie> Defining initialize in a module is something you should avoid, as that doesn't play well with superclasses
<heimark> ok
<Mon_Ouie> I'd remove that method and define the getter as @tableprint_border ||= "|"
<heimark> ah, that works
jgrevich_ [jgrevich_!~jgrevich@69.80.98.122] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
<heimark> can't believe I didn't think of that
<heimark> there's no way to do this with like attr_accessor?
<Mon_Ouie> attr_* family can be used as long as the name of the method matches the name of the ivar
<Mon_Ouie> If you have many similar methods, you can always define your own methods similar to attr_accessor
<heimark> ah, that's clever
<heimark> thank you very much
twixmix [twixmix!~ryanniels@blk-11-127-105.eastlink.ca] has quit [#ruby]
<Mon_Ouie> (Using define_method or possibly class_eval to avoid some overhead)
herval [herval!~Adium@177.99.66.229] has joined #ruby
DrShoggoth [DrShoggoth!~prakwtf@12.116.104.118] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
Dreamer3__ [Dreamer3__!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby
moshef [moshef!~moshe@bzq-79-177-138-51.red.bezeqint.net] has joined #ruby
wilmoore [wilmoore!~wilmoore@66.185.104.17] has joined #ruby
LMolr [LMolr!~quassel@host122-244-dynamic.21-87-r.retail.telecomitalia.it] has joined #ruby
hooper [hooper!~hooper@204.28.122.20] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
geaif [geaif!~geaif@xdsl-188-155-129-176.adslplus.ch] has joined #ruby
<v0n> some gems need to require 'rubygems' with Ruby 1.8. What is the best way to make this work with every Ruby version? require 'rubygems' is enough (I guess it won't matter with Ruby 1.9)?
<v0n> I often see something like require 'rubygems' if RUBY_VERSION == ...
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<v0n> not really cool :/
taipres [taipres!~taipres@2001:5c0:1400:a::157] has joined #ruby
splashs [splashs!8006d56d@gateway/web/freenode/ip.128.6.213.109] has joined #ruby
csherin [csherin!~csherin@61.11.125.236] has joined #ruby
<moshef> i have an array of hashes, how do i check if there is a certain value within one of the hashes?
<moshef> i can't include because it will try to find something that match the entire hash
chrxn [chrxn!chrxn@69.4.233.32] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
herval1 [herval1!~Adium@177.99.66.229] has joined #ruby
<canton7> moshef, array_of_hashes.any?{ |arr| arr.include?(value) } maybe?
<canton7> s/arr/hash
<moshef> thought there might be an easier way...
<moshef> thanks tho
bradly [bradly!u5445@gateway/web/irccloud.com/x-kaomuyinggaidovc] has joined #ruby
<moshef> canton7: but this checks the entire hash, isn''t it ? I'm a bit confused
jY [jY!~jy@photoblog.com] has joined #ruby
<canton7> did you want to know whether one of the hashes includes a certain key or a certain value?
<jY> anyone use thin and know if it's possible to log the url each thin process is handling in it's log?
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
<moshef> value
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
<moshef> any?{|hash| hash.has_value?(2969)) this works
stringoO [stringoO!~JLstring@bas1-toronto42-1279598931.dsl.bell.ca] has joined #ruby
herval1 [herval1!~Adium@177.99.66.229] has quit [#ruby]
<canton7> yeah, was going to say you need has_value? in that case
kpshek [kpshek!~kpshek@159.140.254.101] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@cpe-98-155-91-244.san.res.rr.com] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
danibx [danibx!~danibx@187.104.236.95] has joined #ruby
blueadept [blueadept!~blueadept@pool-96-251-83-184.lsanca.dsl-w.verizon.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
mkmkmk [mkmkmk!~mkmkmk@rrcs-76-79-247-242.west.biz.rr.com] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@69.80.98.122] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
herval [herval!~Adium@177.99.66.229] has joined #ruby
<moshef> canton7: awesome, thanks buddy
<moshef> got another question
herval [herval!~Adium@177.99.66.229] has quit [#ruby]
<moshef> i have an array with some values
<moshef> could be 1, 5, 21, whatever
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<moshef> now i'd like to get the last 20 values of this array
<apeiros_> moshef: ri Array#last
<moshef> apeiros_: great, tnx
mkmkmk1 [mkmkmk1!~mkmkmk@rrcs-173-196-10-131.west.biz.rr.com] has joined #ruby
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-ufjiwsuxilkxazjq] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<bradly> Is there a better way of normalizing an array and single object besides [var].flatten ?
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-jfgogqhrqnknxauy] has joined #ruby
<apeiros_> bradly: ?
jgrevich_ [jgrevich_!~jgrevich@cpe-98-155-91-244.san.res.rr.com] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
<bradly> So i have a object that is sometimes an array and sometimes a single object that I would like to normalize into an array no matter what
<bradly> aperios_: does that make sense?
<apeiros_> bradly: normalize at the source. that's the best solution
<apeiros_> also, use tab completion for nicknames. spares you the embarrassment…
<apeiros_> if you insist on normalizing at the wrong place, look at Kernel#Array and Array::wrap
Illiux [Illiux!~nol@lt-resnet-wireless-71-91.net.pitt.edu] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e0:cc8f:ca7:e735:4ba7] has joined #ruby
<bradly> apeiros_: Thanks. I get the var from an API and the API returns a single object if only 1 record is found, but an array of objects if multiple are found. The [obj].flatten works but it isn't clear the purpose of the code to someone reading the code.
jgrevich_ [jgrevich_!~jgrevich@74.201.27.146] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
<apeiros_> bradly: that sounds like a stupid API
<bradly> apeiros_: lol. I agree!
<apeiros_> anyway, the methods I named you are less potentially dangerous than flatten and the tool for such things.
<canton7> I've seen [*might_be_an_array] around -- not sure what you make of that, apeiros_
s0ber_ [s0ber_!~s0ber@114-36-241-131.dynamic.hinet.net] has joined #ruby
mrtheshadow [mrtheshadow!~mrtheshad@c-67-188-215-51.hsd1.ca.comcast.net] has joined #ruby
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-35-225-92.dsl.pltn13.sbcglobal.net] has joined #ruby
kevinbond [kevinbond!~kevinbond@node89.seg68.ucf.edu] has joined #ruby
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@cpe-98-155-91-244.san.res.rr.com] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
luxurymo_ [luxurymo_!~luxurymod@rrcs-184-75-21-18.nyc.biz.rr.com] has joined #ruby
<apeiros_> canton7: the most appropriate method is Array::wrap IMO. the others will iirc use to_a if available which is potentially dangerous. I'd have to check whether that's still true in 1.9.3, though.
cooper [cooper!~chatzilla@unaffiliated/furryfishy] has joined #ruby
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
45PAAQ081 [45PAAQ081!~quassel@86.125.237.122] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@cpe-98-155-91-244.san.res.rr.com] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
<canton7> apeiros_, is that a rails addition? Doesn't seem to be in native ruby
<apeiros_> oh, seems like :(
<apeiros_> incredible. I usually know such things otherwise.
<tensai_cirno> Very tricky question. I would like somehow redefine raise for Object, but I don't want to catch rescued exceptions. Any points?
justfielding [justfielding!~justfield@ip70-178-131-208.ks.ks.cox.net] has quit [#ruby]
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@69.80.98.122] has joined #ruby
jgrevich_ [jgrevich_!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-opxrimzrmejzisur] has joined #ruby
heimark [heimark!~heimark@216-110-10-170.static.twtelecom.net] has joined #ruby
<apeiros_> catching exceptions is impossible anyway…
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
Paoc__ [Paoc__!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
<tensai_cirno> apeiros_, I can catch raised exceptions
<shevy> I can catch butterflies
<shevy> I dont really use catch/throw though
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
Paoc__ [Paoc__!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
Paoc_ [Paoc_!~paoc@pc-192-161-164-190.cm.vtr.net] has quit [#ruby]
y3llow [y3llow!~y3llow@114-36-241-131.dynamic.hinet.net] has joined #ruby
zeshoem [zeshoem!~zee@108.162.156.19] has joined #ruby
<zeshoem> How do I fix these errors? http://pastebin.com/C5ifzRy3
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
Paoc__ [Paoc__!~paoc@pc-192-161-164-190.cm.vtr.net] has joined #ruby
<zeshoem> I am having trouble installing Ruby 1.9.3 root@ubuntu:~# rvm install 1.9.3
<apeiros_> tensai_cirno: actually no, you can't.
<tensai_cirno> apeiros_, uhmm, i mean _hooking actions_, not actually catching
<tensai_cirno> to raised events
<shadoi> that is the strangest way to extract an archive.
<shadoi> zeshoem: the download is probably corrupt
<apeiros_> tensai_cirno: rescue. catch is something different.
<shevy> zeshoem you can use "tar" in one go without the need of |
<shadoi> tar jxf file.tar.bz2 -C outdir
<shadoi> shevy: but he's not doing it, rvm is. :)
<shevy> tar -vjxf
<shevy> ? he is using tar there, isn't he?
<shevy> oh
<shevy> indeed
<shevy> I think rvm makes people dumber
<shadoi> you can tell is a programmers solution to a sysadmin problem.
<shadoi> s/is/it's/
badabim_ [badabim_!~badabim@17.212.167.10] has joined #ruby
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
jgrevich [jgrevich!~jgrevich@pdpc/supporter/active/jgrevich] has joined #ruby
seejohnrun [seejohnrun!~seejohnru@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby
iamjarvo1 [iamjarvo1!~Adium@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby
Jedi_SCT1 [Jedi_SCT1!~j@67.215.87.143] has joined #ruby
jolan [jolan!~jolan@xvm-102-139.ghst.net] has joined #ruby
<Boohbah> shevy: it certainly did that to me
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
michael_mbp_ [michael_mbp_!~Marin@149.147.66.245] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@174-25-147-198.ptld.qwest.net] has joined #ruby
wilmoore [wilmoore!~wilmoore@66.185.104.17] has joined #ruby
<zeshoem> I got past the first install, but gems isnt installing
geofridh [geofridh!~geofridh@gateway/tor-sasl/geofridh] has joined #ruby
<zeshoem> undefined method `map' for Gem::Specification:Class (NoMethodError)
eignerchris_ [eignerchris_!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e0:cc8f:ca7:e735:4ba7] has joined #ruby
heimark [heimark!~heimark@216-110-10-170.static.twtelecom.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
daglees [daglees!~belvedere@178.238.189.164] has joined #ruby
daglees [daglees!~belvedere@unaffiliated/daglees] has joined #ruby
bgupta [bgupta!~bgupta@68.164.142.90] has joined #ruby
<luxurymo_> how can i make a regex to find some portion of a string and stop when it encounters the first "?"
Confiscative [Confiscative!~con@vps1031.directvps.nl] has joined #ruby
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has quit [#ruby]
<Confiscative> Hi. I'm running OSX and rvm on MRI Ruby 1.9.2. I want to compile C extensions. How would I get access to ruby.h with rvm?
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<burgestrand> Confiscative: when you write C extensions you write a mkmf script; running it with a ruby installed through RVM will do the right thing
<burgestrand> Confiscative: http://guides.rubygems.org/c-extensions/
<burgestrand> Confiscative: in your C code you reference it with “#include <ruby.h>”
<Confiscative> I did that, and I now see that some paths in the Makefile are set to the correct directory in ~/.rvm
<Confiscative> Still I'm getting the error: ruby.h: No such file or directory
stringoO [stringoO!~JLstring@bas1-toronto42-1279599116.dsl.bell.ca] has joined #ruby
<Confiscative> In the Makefile, topdir and hdrdir are set to the correct directory.
tvo [tvo!~tvo@5354CF57.cm-6-5d.dynamic.ziggo.nl] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
<burgestrand> Confiscative: I take it you generated the makefile with the extconf.rb-script you’ve written, and did not write it yourself?
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
<Confiscative> Sorry, yes. The extconf.rb in ext/foo/ generates it.
<Confiscative> My Rakefile specifies: Rake::ExtensionTask.new("foo")
<burgestrand> Confiscative: using rake-compiler, I take it?
<Confiscative> Yes, but I did follow a guide that uses 'Hoe'. (this guide: http://tenderlovemaking.com/2009/12/18/writing-ruby-c-extensions-part-1/)
<Confiscative> I'm scrolling through the guide you linked now.
<burgestrand> It’s all great, but it’s more things to troubleshoot and take into account when things don’t work. I’d try a bare-bones example just to make sure things work first. I should have one around somewhere that should be just download and compile…
cdepue [cdepue!~cdepue@186.8.254.115] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<burgestrand> Can’t find it, bugger.
<Confiscative> I'll follow the thing you linked and see if I get the error again :)
<Confiscative> I didn't really like using that 'hoe' gem I know nothing about anyway ;)
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
jamiemill [jamiemill!~jamiemill@78-86-4-116.zone2.bethere.co.uk] has joined #ruby
<burgestrand> Confiscative: good luck, I’m not sure I’ll be around when you’re done, but if you run into issues again you could try asking in #ruby-lang
artOfWar [artOfWar!~artofwar@nat/yahoo/x-nlswxgaizfwnkisa] has joined #ruby
<burgestrand> (the channel is pretty much the same as this one, but tends to be more active at this hour than this channel and often the answers/questions in there have better quality(
<jamiemill> Why might the rubygem God say "using event system: none / [fail] event system did not load" on ubuntu 11?
<burgestrand> jamiemill: if I recall correctly, God can use certain ways to listen for events rather than polling for them, I don’t remember what kind that is on the top of my head
<jamiemill> burgestrand: Yes I believe so - I'm using the chef "god" recipe to install so hoped it would just work. I did set up manually on ubuntu 10 and don't remember having this problem
bigkm [bigkm!~bigkm@203-206-185-71.perm.iinet.net.au] has joined #ruby
mikeric [mikeric!~mike@96.53.33.22] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
mister_m [mister_m!~mattosaur@2620:0:2250:2104:223:5aff:fe7e:cc97] has joined #ruby
<mister_m> what does |= do?
<mister_m> is that bitwise OR
<burgestrand> mister_m: yes, don’t confuse it with ||= though
<mister_m> burgestrand: I won't. thank you
<burgestrand> mister_m: and it’s | itself that is bitwise OR, the = is assignment, x |= y is x = x | y
<burgestrand> mister_m: same way like +=, -=, *=, /= works
apow [apow!~wopa@177.17.121.19] has joined #ruby
p1d_ [p1d_!~p1d@ns1.vonaffenfels.de] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
fr0gprince_mac [fr0gprince_mac!~fr0gprinc@178-85-90-223.dynamic.upc.nl] has joined #ruby
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
nonotza [nonotza!~nonotza@50-57-234-249.static.cloud-ips.com] has joined #ruby
geofridh [geofridh!~geofridh@gateway/tor-sasl/geofridh] has quit ["exit"]
<Confiscative> burgestrand: The building works alright now. Thanks for the help :)
<burgestrand> Confiscative: awesome :)
justsee [justsee!~j@unaffiliated/justsee] has joined #ruby
mutewinter [mutewinter!~mutewinte@cpe-184-58-10-202.woh.res.rr.com] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@67.139.75.158] has joined #ruby
tweequla [tweequla!~tweequla@c-bf2fe655.02-221-6b73641.cust.bredbandsbolaget.se] has joined #ruby
Jarred [Jarred!~Administr@c-71-198-139-210.hsd1.ca.comcast.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
heimark [heimark!~heimark@216-110-10-170.static.twtelecom.net] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
graft [graft!~graft@adsl-76-254-22-69.dsl.pltn13.sbcglobal.net] has joined #ruby
asmdroid [asmdroid!~nchat@5ac02823.bb.sky.com] has joined #ruby
<graft> okay, quick and dirty to make an MxN array with some initial value, e.g.: [ [ nil] * m ] * n
<graft> except that doesn't work, because you get n copies of the same array
<graft> you can do it with map, e.g.: ([ 0 ] * n).map{|a| [nil] * m}
<graft> but that seems ugly and wasteful
<graft> anyone got a neater idea?
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
Skaag_ [Skaag_!~Skaag@67.133.201.89] has joined #ruby
statix [statix!~statix@rrcs-208-125-52-150.nys.biz.rr.com] has joined #ruby
i8degrees [i8degrees!~i8degrees@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
<canton7> graft, Array.new(m){ Array.new(n) } is maybe the clearest
<graft> canton7: yeah that works
<graft> canton7: could be prettier, but oh well :(
Faris [Faris!~amnay@41.248.106.173] has joined #ruby
bluekelp [bluekelp!~bluekelp@bluekelp.xen.prgmr.com] has joined #ruby
randym [randym!~randym@EM1-113-163-59.pool.e-mobile.ne.jp] has joined #ruby
VictorMartins [VictorMartins!~VictorMar@87-196-223-150.net.novis.pt] has joined #ruby
nvez [nvez!~textual@bas1-montreal54-1167956059.dsl.bell.ca] has joined #ruby
nvez [nvez!~textual@unaffiliated/nvez] has joined #ruby
Asebolka [Asebolka!~Asebolka@c-174-59-146-170.hsd1.pa.comcast.net] has joined #ruby
i8degrees [i8degrees!~i8degrees@ip70-178-131-208.ks.ks.cox.net] has joined #ruby
Illiux [Illiux!~nol@cl-wireless-pittnet-150-212-22-220.wireless.pitt.edu] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
wilmoore [wilmoore!~wilmoore@66.185.104.17] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
samsonjs [samsonjs!~samsonjs@74.198.151.1] has joined #ruby
qelsi [qelsi!~qelsi@190.Red-79-156-39.staticIP.rima-tde.net] has joined #ruby
heimark [heimark!~heimark@cpe-24-27-24-134.austin.res.rr.com] has joined #ruby
ale` [ale`!~user@dynamic-adsl-94-39-244-253.clienti.tiscali.it] has joined #ruby
jesseangell [jesseangell!~jesseange@h70.251.190.173.static.ip.windstream.net] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
_axx [_axx!~x@apimp.de] has joined #ruby
mxweas [mxweas!~max@pool-98-116-20-225.nycmny.east.verizon.net] has joined #ruby
psino [psino!~psino@unaffiliated/psino] has joined #ruby
davidboy [davidboy!u3228@gateway/web/irccloud.com/x-hmhswouhbwocutbv] has joined #ruby
choffstein [choffstein!~choffstei@173-13-122-61-NewEngland.hfc.comcastbusiness.net] has joined #ruby
wookiehangover [wookiehangover!~wookiehan@c-67-161-138-118.hsd1.co.comcast.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@rrcs-71-43-23-18.se.biz.rr.com] has joined #ruby
cdepue [cdepue!~cdepue@186.8.146.211] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@rrcs-71-43-23-18.se.biz.rr.com] has quit [#ruby]
<ale`> hi, I'm using rspec-rails-watchr for the ruby on rails tutorial (M. Hartl). When I save a controller, watchr doesn't correctly match the modified file and `m' variable (I printed it as m.to_a) in watchr.watch ('^(?:app|lib|script)\/(.*)(?:\.rb|\.\w+|)$') {|m| ... } has the value ['app/controllers', 'controllers']. Any clue what's wrong? (I'm using ruby 1.9.2, on ubuntu 11.10)
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<choffstein> Hey all. I'm trying to use Mongoid with BigDecimal and keep getting that BigDecimal can't be serialized by BSON. The mongoid docs say that the field-type BigDecimal can be used -- and I was sort of expecting some automatic serialization and deserialization from a string. Any ideas where I am going wrong?
raluxgaza [raluxgaza!~raluxgaza@host-92-24-95-7.ppp.as43234.net] has joined #ruby
marcoshack [marcoshack!~marcoshac@c9345b97.virtua.com.br] has joined #ruby
nari [nari!~nari@2001:268:306:1:88a4:90ff:feb3:cc17] has joined #ruby
kenneth [kenneth!~kenneth@c-98-210-10-138.hsd1.ca.comcast.net] has joined #ruby
<kenneth> hey, so i have a syntax error on this line: :next => {|r,c| {:r => r,:c => c+1}}
<kenneth> this is when defining a hash
<kenneth> and i want to set :next to a block
fenix268 [fenix268!~fenix268@CPE00222d5a77f0-CM00222d5a77ed.cpe.net.cable.rogers.com] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
wilmoore [wilmoore!~wilmoore@66.185.104.17] has joined #ruby
fenix268 [fenix268!~fenix268@CPE00222d5a77f0-CM00222d5a77ed.cpe.net.cable.rogers.com] has joined #ruby
<baroquebobcat> kenneth: you can't use blocks that way. you need a lambda or a Proc
<kenneth> ah
<baroquebobcat> :next => lambda {|r,c| ...
fenix268 [fenix268!~fenix268@CPE00222d5a77f0-CM00222d5a77ed.cpe.net.cable.rogers.com] has joined #ruby
<kenneth> right, awesome thanks
Mekkis [Mekkis!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
mklappstuhl [mklappstuhl!~mklappstu@p5B2C4C4A.dip.t-dialin.net] has joined #ruby
<kenneth> simple program, creating a matrix: https://gist.github.com/f63427fb298e19960033
fenix268 [fenix268!~fenix268@CPE00222d5a77f0-CM00222d5a77ed.cpe.net.cable.rogers.com] has joined #ruby
<kenneth> i get two syntax error i don't understand:
<kenneth> spiral.rb:39: syntax error, unexpected keyword_end
<kenneth> spiral.rb:44: syntax error, unexpected $end, expecting keyword_end
Seisatsu_ [Seisatsu_!~seisatsu@adsl-99-35-225-92.dsl.pltn13.sbcglobal.net] has joined #ruby
<baroquebobcat> kenneth: ruby doesn't have a ++ operator, you need to do +=1
<kenneth> aha i keep forgetting that