apeiros_ changed the topic of #ruby-lang to: Ruby 2.2.0; 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste code on http://gist.github.com
Lewix has quit [Remote host closed the connection]
michaeldeol has joined #ruby-lang
ta_ has joined #ruby-lang
carlos_ has joined #ruby-lang
charliesome has quit [Quit: zzz]
ta_ has quit [Ping timeout: 240 seconds]
<carlos_> Is it good practise to read a file in a while loop waiting for new lines so we can print the new lines in the terminal?
<centrx> like 'tail' does?
apeiros has quit [Remote host closed the connection]
<carlos_> tail
<carlos_> ?
apeiros has joined #ruby-lang
<carlos_> my script is kinda diferent
<carlos_> I output the content of a log file
symm- has quit [Ping timeout: 245 seconds]
<carlos_> everytime it logs something new
symm-_ has joined #ruby-lang
<bradland> carlos_: nothing wrong with that
<bradland> i use a 'while ARGF.gets' loop in my scripts all the time
<bradland> i do that so i can tail -f the contents of one file in to my ruby script where some processing happens
<carlos_> but it seems to decrease performance
<bradland> in what way?
lytol has quit [Remote host closed the connection]
mannyt has quit [Quit: Connection closed for inactivity]
<bradland> or rather, versus what other method?
<bradland> this only works for streaming operations, where you can operate on a line, or a chunk of lines and output data along the way
<bradland> if you need the entire dataset to perform your op (like a reduce operation), then reading the whole thing in to memory may be faster
leonshalimov has joined #ruby-lang
<carlos_> my method seems to decrease my server's performance
_fritchie has joined #ruby-lang
<bradland> i'm not sure what that means
<bradland> is your ruby process consuming a lot of CPU?
<carlos_> as I'm always checking for ONE new line, if the log file receive a lot of lines (data) it may even bug no?
<carlos_> yes, consuming a lot of CPU
<bradland> can you post the script?
<carlos_> ofcorse
<bradland> if you're processing a lot of data, then it follows that you'll consume some CPU, but there may be a bug
leonshalimov has quit [Ping timeout: 240 seconds]
<carlos_> i can't at the moment, I'm running lubuntu and can't find the network devices
<carlos_> I have the file saved on a Raspberry Pi
<carlos_> I will try to figure out
<bradland> good luck :)
benten has joined #ruby-lang
hahuang61 has quit [Ping timeout: 276 seconds]
carlos_ has quit [Ping timeout: 245 seconds]
carlosss has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
<carlosss> sorry, connection failed
HoloIRCUser2 has joined #ruby-lang
spuk has joined #ruby-lang
HoloIRCUser2 has left #ruby-lang [#ruby-lang]
loincloth has quit [Remote host closed the connection]
carlosss has quit [Quit: Konversation terminated!]
|jemc| has quit [Ping timeout: 245 seconds]
svajone has joined #ruby-lang
gwendall has joined #ruby-lang
g0bl1n has quit [Quit: Leaving]
yusuf1 has joined #ruby-lang
yusuf1 has quit [Max SendQ exceeded]
yusuf1 has joined #ruby-lang
gwendall has quit [Ping timeout: 276 seconds]
hinbody-mobile has quit [Quit: leaving]
skade has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lewix has joined #ruby-lang
Lewix has quit [Changing host]
Lewix has joined #ruby-lang
stardiviner has quit [Quit: my website: https://stardiviner.github.io/]
SuMo_D has joined #ruby-lang
<zenspider> sexp_processor version 4.4.5 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2015/01/sexp_processor-version-4-4-5-has-been-released.html
<zenspider> ruby_parser version 3.6.4 has been released! | software releases by ryan davis - http://blog.zenspider.com/releases/2015/01/ruby_parser-version-3-6-4-has-been-released.html
Lewix has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
Bwild has quit [Read error: No route to host]
jds has quit [Quit: Connection closed for inactivity]
Bwild has joined #ruby-lang
chouhoulis has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
hendranata_ has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
svajone has quit [Quit: svajone]
ta_ has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brooks has joined #ruby-lang
amsi has quit [Quit: Leaving]
ascarter has joined #ruby-lang
|jemc| has joined #ruby-lang
Lewix has joined #ruby-lang
symm-_ has quit [Ping timeout: 245 seconds]
ta_ has quit [Ping timeout: 245 seconds]
brooks has quit [Ping timeout: 272 seconds]
womble has quit [Ping timeout: 265 seconds]
tenderlove has joined #ruby-lang
debill has quit [Ping timeout: 240 seconds]
leonshalimov has joined #ruby-lang
timanema has quit [Quit: leaving]
<waxjar> agreed zenspider
timanema has joined #ruby-lang
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby-lang
Torrieri has quit [Changing host]
Torrieri has joined #ruby-lang
loincloth has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 256 seconds]
slawrenc_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kyb3r_ has quit [Ping timeout: 244 seconds]
amclain has joined #ruby-lang
loincloth has quit [Ping timeout: 256 seconds]
womble has joined #ruby-lang
Torrieri has quit [Ping timeout: 244 seconds]
<whitequark> zenspider: deprecating RP yet? :]
gwendall has joined #ruby-lang
timanema has quit [Ping timeout: 255 seconds]
leonshalimov has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gwendall has quit [Ping timeout: 276 seconds]
wallerdev has quit [Quit: wallerdev]
kyb3r_ has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
tzero has quit [Quit: WeeChat 0.4.3]
tzero has joined #ruby-lang
SuMo_D_ has joined #ruby-lang
SuMo_D has quit [Ping timeout: 252 seconds]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamninja has quit [Quit: ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
leandrosnunes has joined #ruby-lang
slawrence00 has joined #ruby-lang
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
djbkd has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
leandrosnunes has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby-lang
ta_ has joined #ruby-lang
chills42 has joined #ruby-lang
cored has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby-lang
wallerdev has joined #ruby-lang
kaaaahirul has joined #ruby-lang
timanema has joined #ruby-lang
kaaaahirul has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Remote host closed the connection]
benten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gwendall has joined #ruby-lang
leonshalimov has joined #ruby-lang
ta_ has joined #ruby-lang
leonshalimov has quit [Ping timeout: 252 seconds]
gwendall has quit [Ping timeout: 264 seconds]
maso has joined #ruby-lang
rahul_j has joined #ruby-lang
Bwild has quit [Ping timeout: 245 seconds]
Bwild has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
kapil__ has joined #ruby-lang
maso has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 272 seconds]
maso has joined #ruby-lang
fclausen has joined #ruby-lang
<bitflipping> bradland: so it does load the gems from the proper location. When executing it can run your script to find all dependencies if you want. That is what was failing, because a regular run won't use the gems from the proper path
<bitflipping> so there is an option --no-dep-run that you can use to skip that run through and then it will just package all the gems in the gemfile for you
<bitflipping> not that you use it, but just to update you haha
rbowlby has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
vozcelik has quit [Quit: Textual IRC Client: www.textualapp.com]
tenderlove has quit [Remote host closed the connection]
vozcelik has joined #ruby-lang
rbowlby has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
rbowlby has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
loincloth has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
stardiviner has joined #ruby-lang
rahul_j has joined #ruby-lang
rahul_j has quit [Client Quit]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
chills42 has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
yfeldblum has joined #ruby-lang
gwendall has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
yfeldblum has quit [Ping timeout: 245 seconds]
tenderlove has quit [Ping timeout: 240 seconds]
fclausen has quit [Ping timeout: 272 seconds]
gwendall has quit [Ping timeout: 276 seconds]
spuk has quit [Ping timeout: 252 seconds]
kaaaahirul has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 244 seconds]
Hawkran has quit [Read error: Connection reset by peer]
araujo has quit [Ping timeout: 256 seconds]
gix has joined #ruby-lang
rahul_j has joined #ruby-lang
Torrieri has quit [Quit: Be back later ...]
Torrieri has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
ta_ has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
Torrieri has quit [Ping timeout: 246 seconds]
rahul_j has joined #ruby-lang
rbowlby has joined #ruby-lang
SuMo_D_ has quit [Read error: Connection reset by peer]
SuMo_D has joined #ruby-lang
ta_ has quit [Ping timeout: 265 seconds]
brooks has joined #ruby-lang
rbowlby has quit [Ping timeout: 244 seconds]
vozcelik has quit [Ping timeout: 245 seconds]
brooks has quit [Ping timeout: 264 seconds]
rahul_j has quit [Quit: rahul_j]
djbkd has quit [Remote host closed the connection]
cantonic has left #ruby-lang [#ruby-lang]
leonshalimov has joined #ruby-lang
fujimura has joined #ruby-lang
shinnya has quit [Quit: ZNC - http://znc.in]
fclausen has joined #ruby-lang
leonshalimov has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
mkosaki has quit [Quit: Leaving...]
rahul_j has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
rahul_j has quit [Client Quit]
tenderlove has joined #ruby-lang
gwendall has joined #ruby-lang
rahul_j has joined #ruby-lang
ur5us has quit [Ping timeout: 272 seconds]
slawrence00 has quit [Quit: Textual IRC Client: www.textualapp.com]
gwendall has quit [Ping timeout: 276 seconds]
tenderlove has quit [Ping timeout: 264 seconds]
kaaaahirul has quit [Remote host closed the connection]
_fritchie has quit [Quit: Textual IRC Client: www.textualapp.com]
iamninja has joined #ruby-lang
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
stardiviner has joined #ruby-lang
stardiviner has quit [Client Quit]
billy_ran_away has quit [Remote host closed the connection]
stardiviner has joined #ruby-lang
yfeldblum has joined #ruby-lang
kaaaahirul has joined #ruby-lang
stardiviner has quit [Client Quit]
kaaaahirul has quit [Remote host closed the connection]
timanema has quit [Ping timeout: 245 seconds]
stardiviner has joined #ruby-lang
kaaaahirul has joined #ruby-lang
hahuang61 has joined #ruby-lang
kapil__ has quit [Quit: Connection closed for inactivity]
timanema has joined #ruby-lang
slawrence00 has joined #ruby-lang
timanema has quit [Ping timeout: 245 seconds]
timanema has joined #ruby-lang
martinbmadsen has joined #ruby-lang
kaaaahirul has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
Torrieri has joined #ruby-lang
ur5us has joined #ruby-lang
timanema has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
kaaaahirul has joined #ruby-lang
Torrieri has quit [Ping timeout: 245 seconds]
mattyohe has joined #ruby-lang
ur5us has quit [Ping timeout: 272 seconds]
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
stardiviner has joined #ruby-lang
kaaaahirul has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
spuk has joined #ruby-lang
rahul_j_ has joined #ruby-lang
loincloth has quit [Ping timeout: 264 seconds]
rahul_j has quit [Ping timeout: 272 seconds]
rahul_j_ is now known as rahul_j
timanema has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
gwendall has joined #ruby-lang
rahul_j has joined #ruby-lang
tenderlove has joined #ruby-lang
yfeldblum has joined #ruby-lang
timanema has quit [Ping timeout: 264 seconds]
timanema has joined #ruby-lang
gwendall has quit [Ping timeout: 276 seconds]
tenderlove has quit [Ping timeout: 246 seconds]
yfeldblu_ has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
kaaaahirul has joined #ruby-lang
yfeldblum has quit [Ping timeout: 246 seconds]
thang has quit [Ping timeout: 252 seconds]
timanema has quit [Ping timeout: 264 seconds]
hendranata_ has quit [Ping timeout: 256 seconds]
kaaaahirul has quit [Remote host closed the connection]
timanema has joined #ruby-lang
thang has joined #ruby-lang
timanema has quit [Ping timeout: 245 seconds]
AKASkip has joined #ruby-lang
timanema has joined #ruby-lang
futilegames has joined #ruby-lang
timanema has quit [Ping timeout: 255 seconds]
ddd has joined #ruby-lang
timanema has joined #ruby-lang
iamninja has quit [Quit: ZZZzzz…]
shinnya_ has quit [Ping timeout: 255 seconds]
WishBoy has joined #ruby-lang
timanema has quit [Remote host closed the connection]
timanema has joined #ruby-lang
leonshalimov has joined #ruby-lang
djbkd has joined #ruby-lang
benten has joined #ruby-lang
leonshalimov has quit [Ping timeout: 246 seconds]
rippa has joined #ruby-lang
maso has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 264 seconds]
timanema has quit [Ping timeout: 256 seconds]
timanema has joined #ruby-lang
kaaaahirul has joined #ruby-lang
spuk has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby-lang
fujimura has quit [Remote host closed the connection]
timanema has quit [Ping timeout: 256 seconds]
kaaaahirul has quit [Ping timeout: 265 seconds]
timanema has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
timanema has quit [Ping timeout: 245 seconds]
fclausen has quit [Ping timeout: 272 seconds]
timanema has joined #ruby-lang
WishBoy has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
tenderlove has joined #ruby-lang
spuk has joined #ruby-lang
timanema has quit [Ping timeout: 256 seconds]
timanema has joined #ruby-lang
gwendall has quit [Ping timeout: 276 seconds]
tenderlove has quit [Ping timeout: 252 seconds]
kaaaahirul has joined #ruby-lang
timanema has quit [Ping timeout: 256 seconds]
timanema has joined #ruby-lang
kaaaahirul has quit [Remote host closed the connection]
kapil__ has joined #ruby-lang
rbowlby has joined #ruby-lang
ta_ has joined #ruby-lang
rbowlby has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby-lang
gwendall has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
timanema has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 272 seconds]
j4cknewt has quit [Remote host closed the connection]
kyb3r_ has joined #ruby-lang
j4cknewt has joined #ruby-lang
ta_ has joined #ruby-lang
GBrawl has joined #ruby-lang
kaaaahirul has joined #ruby-lang
charliesome has quit [Quit: zzz]
kaaaahirul has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
hahuang61 has quit [Ping timeout: 272 seconds]
simi has joined #ruby-lang
rbowlby has joined #ruby-lang
[spoiler] has joined #ruby-lang
tenderlove has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
kyb3r_ has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
kyb3r_ has joined #ruby-lang
tenderlove has quit [Ping timeout: 256 seconds]
charliesome has quit [Quit: zzz]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oleo is now known as Guest17441
oleo__ has joined #ruby-lang
chouhoulis has joined #ruby-lang
Guest17441 has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Ping timeout: 264 seconds]
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
banister has joined #ruby-lang
leonshalimov has joined #ruby-lang
SuMo_D has quit [Ping timeout: 255 seconds]
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
benten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leonshalimov has quit [Ping timeout: 245 seconds]
martinbmadsen has quit [Ping timeout: 246 seconds]
simi has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Remote host closed the connection]
kaaaahirul has joined #ruby-lang
kaaaahirul has quit [Remote host closed the connection]
yusuf1 has quit [Quit: Leaving.]
stardiviner has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby-lang
simi has joined #ruby-lang
marr has joined #ruby-lang
loincloth has joined #ruby-lang
AKASkip1 has joined #ruby-lang
tenderlove has joined #ruby-lang
AKASkip has quit [Ping timeout: 255 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby-lang
loincloth has quit [Ping timeout: 264 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
stardiviner has joined #ruby-lang
tenderlove has quit [Ping timeout: 264 seconds]
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
JohnBat26 has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
wallerdev has quit [Quit: wallerdev]
charliesome has joined #ruby-lang
Kryptonita has joined #ruby-lang
rahul_j has joined #ruby-lang
SuMo_D has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
kaaaahirul has joined #ruby-lang
kaaaahirul has quit [Client Quit]
SuMo_D has quit [Ping timeout: 245 seconds]
nofxx has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
GBrawl has quit [Quit: (null)]
stamina has joined #ruby-lang
amclain has quit [Quit: Leaving]
j4cknewt has joined #ruby-lang
nofxx has joined #ruby-lang
j4cknewt has quit [Ping timeout: 256 seconds]
stardiviner has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
GBrawl has joined #ruby-lang
stardiviner has joined #ruby-lang
tenderlove has joined #ruby-lang
Torrieri has quit [Quit: Be back later ...]
tenderlove has quit [Ping timeout: 240 seconds]
Torrieri has joined #ruby-lang
leonshalimov has joined #ruby-lang
Torrieri has quit [Read error: Connection reset by peer]
Torrieri has joined #ruby-lang
leonshalimov has quit [Ping timeout: 264 seconds]
rahul_j has quit [Quit: rahul_j]
otertore has joined #ruby-lang
riffraff has joined #ruby-lang
Torrieri has quit [Quit: Be back later ...]
chinmay_dd_ has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
nofxx has quit [Ping timeout: 252 seconds]
loincloth has quit [Ping timeout: 245 seconds]
fujimura has joined #ruby-lang
Kryptonita has quit [Remote host closed the connection]
Kryptonita has joined #ruby-lang
simi has quit [Ping timeout: 246 seconds]
nofxx has joined #ruby-lang
micmus has joined #ruby-lang
thelastinuit has joined #ruby-lang
Kryptonita has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
Kryptonita has joined #ruby-lang
GaelanAintAround has quit [Ping timeout: 264 seconds]
zz_dlu has quit [Ping timeout: 245 seconds]
GaelanAintAround has joined #ruby-lang
zz_dlu has joined #ruby-lang
nofxx has quit [Ping timeout: 246 seconds]
cornerma1 has joined #ruby-lang
cantonic has quit [Quit: cantonic]
ledestin has quit [Quit: ledestin]
tenderlove has joined #ruby-lang
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
tenderlove has quit [Ping timeout: 252 seconds]
Kryptonita has quit [Remote host closed the connection]
leandrosnunes has joined #ruby-lang
SuMo_D has joined #ruby-lang
SuMo_D has quit [Ping timeout: 246 seconds]
trajing|Mobile has joined #ruby-lang
ta_ has quit [Ping timeout: 272 seconds]
sarkyniin has joined #ruby-lang
djbkd has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
cantonic has joined #ruby-lang
<[spoiler]> Oh God. This is amazebollocks: https://www.youtube.com/watch?v=tKTCPLkOeuA { Doctor Who - "Time Lines" (Blurred Lines Parody) by TripleThreatProdux . }
cantonic has quit [Client Quit]
cantonic has joined #ruby-lang
ta_ has joined #ruby-lang
symm- has joined #ruby-lang
leonshalimov has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
donove has joined #ruby-lang
donove has joined #ruby-lang
leonshalimov has quit [Ping timeout: 265 seconds]
booly-yam has quit [Ping timeout: 272 seconds]
booly-yam_ has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
trajing|Mobile has joined #ruby-lang
tenderlove has joined #ruby-lang
iamninja has joined #ruby-lang
tenderlove has quit [Ping timeout: 245 seconds]
trajing|Mobile has quit [Read error: Connection reset by peer]
cantonic_ has joined #ruby-lang
trajing|Mobile has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
dellavg_ has joined #ruby-lang
trajing|Mobile has joined #ruby-lang
ta_ has joined #ruby-lang
stardiviner has quit [Ping timeout: 264 seconds]
fujimura has quit [Remote host closed the connection]
chinmay_dd_ has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 252 seconds]
oleo__ is now known as oleo
oleo has quit [Quit: Verlassend]
oleo has joined #ruby-lang
cantonic has quit [Quit: cantonic]
cantonic_ is now known as cantonic
cantonic has quit [Quit: cantonic]
micmus has quit [Ping timeout: 265 seconds]
trajing|Mobile has quit [Read error: Connection reset by peer]
trajing|Mobile has joined #ruby-lang
tobiassvn has joined #ruby-lang
micmus has joined #ruby-lang
cantonic has joined #ruby-lang
cantonic has quit [Client Quit]
Hawkran has joined #ruby-lang
Integralist has joined #ruby-lang
Integralist has quit [Client Quit]
Integralist has joined #ruby-lang
fujimura has joined #ruby-lang
ottlikg has joined #ruby-lang
devgiant has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
dstodolny has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
dstodolny has quit [Read error: Connection reset by peer]
konr has joined #ruby-lang
dstodolny has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
dstodolny has left #ruby-lang [#ruby-lang]
dstodolny has joined #ruby-lang
stardiviner has joined #ruby-lang
stardiviner has quit [Changing host]
stardiviner has joined #ruby-lang
ottlikg has quit [Ping timeout: 256 seconds]
dstodolny has left #ruby-lang [#ruby-lang]
tenderlove has joined #ruby-lang
devgiant has quit [Quit: Leaving]
Kryptonita has joined #ruby-lang
tenderlove has quit [Ping timeout: 265 seconds]
symm- has quit [Read error: Connection reset by peer]
trajing|Mobile has quit [Read error: Connection reset by peer]
j0n3 has joined #ruby-lang
Bwild has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
siaw has joined #ruby-lang
j0n3 has quit [Quit: Leaving]
j0n3 has joined #ruby-lang
Bwild has joined #ruby-lang
djbkd has quit [Ping timeout: 255 seconds]
Bwild has quit [Client Quit]
fusillicode has joined #ruby-lang
loincloth has joined #ruby-lang
fusillicode1 has quit [Ping timeout: 256 seconds]
jxie has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
jxie has joined #ruby-lang
dagda1_ has quit [Read error: Connection reset by peer]
rbowlby has joined #ruby-lang
mkosaki has joined #ruby-lang
loincloth has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby-lang
djbkd has quit [Ping timeout: 252 seconds]
rbowlby has quit [Ping timeout: 264 seconds]
jxie has quit [Ping timeout: 246 seconds]
ottlikg has joined #ruby-lang
jxie has joined #ruby-lang
leonshalimov has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
riffraff has quit [Quit: This computer has gone to sleep]
bruno has joined #ruby-lang
<bruno> hi ther
<bruno> e
leonshalimov has quit [Ping timeout: 264 seconds]
<bruno> im new with ruby, and rspec i need some help to mock a file exists? and open
fujimura has quit [Remote host closed the connection]
<bruno> any1 with time ?
apeiros has quit [Read error: Connection reset by peer]
fujimura has joined #ruby-lang
apeiros has joined #ruby-lang
<ljarvis> bruno: what's the problem?
gjaldon has joined #ruby-lang
<bruno> so i got a yml file
<bruno> needed for config
<bruno> in the spec ive tryed to stub it
<bruno> but the method that checks if the file exists is returning false
<bruno> ill paste the spec code
<bruno> let(:resource) { double('app_id = "app_id"\n app_secret ="app_secret"') }
<bruno>
<bruno> context 'initialization' do
<bruno> before(:each) do
<bruno> allow(File).to receive(:exists?).and_return(true)
<bruno> allow(File).to receive(:open).and_return(:resource)
<bruno> end
<bruno> it 'should have a config file' do
<bruno> expect(Kiik.file_exists?).to equal(true)
<bruno> end
<bruno> it 'should load a config file' do
<ljarvis> bruno: please paste code to gist.github.com not on the channel
<bruno> expect(Kiik.load_config("kiik.yml").empty?).to equal(false)
<bruno> end
<bruno> end
<bruno> sorry
<bruno> so sorry
fujimura has quit [Ping timeout: 252 seconds]
<jhass> please paste the implementation of Kiik too
djbkd has joined #ruby-lang
riffraff has joined #ruby-lang
booly-yam_ has quit [Ping timeout: 255 seconds]
<bruno> sure
<bruno> 1sec
[spoiler] has quit [Quit: Leaving]
<bruno> now both
gjaldon_ has joined #ruby-lang
<ljarvis> bruno: your specs dont test anything
fusillicode1 has joined #ruby-lang
postmodern has quit [Quit: Leaving]
<ljarvis> also line 3 needs an if or a &&
gjaldon has quit [Ping timeout: 245 seconds]
<bruno> ljarvis but when i run it tryies to validate
<ljarvis> the only method on your Kiik class that I would even consider stubbing out is `config_path`. If that returned a fixture file from your spec directory then everything else would be properly testable
dstodolny_ has joined #ruby-lang
Lewix has joined #ruby-lang
<ljarvis> you should generally consider using stubbing as little as possible
<bruno> not the config_path , the load_config return a file
djbkd has quit [Ping timeout: 256 seconds]
<ljarvis> no it doesn't
fusillicode has quit [Ping timeout: 255 seconds]
Asher has joined #ruby-lang
charliesome has quit [Quit: zzz]
gjaldon_ has quit [Remote host closed the connection]
Asher is now known as Guest34750
siaw has quit [Quit: siaw]
<bruno> the config_path returns a string path which the load_config will try to open, so even if i stub this method
booly-yam_ has joined #ruby-lang
<ljarvis> then that's your entry point
siaw has joined #ruby-lang
Guest34750 has quit [Client Quit]
booly-yam_ has quit [Remote host closed the connection]
<ljarvis> why would you need to stub anything else. Everything else you've stubbed has made your spec pointless
gjaldon has joined #ruby-lang
<bruno> the point is to test the load method itself
<ljarvis> if config_path returns "spec/fixtures/kiik.yml" then you can test everything without stubbing everything
<bruno> OOOh i see now
<bruno> what u mean
<bruno> yeah thats a nice way to do it
<bruno> but i still want to know why it doesnt stub the File methods
riffraff has quit [Quit: Leaving]
<bruno> as i expected it to do
<ljarvis> not sure
<ljarvis> also, line 11 is wrong, you want "and_return(resource)" not :resource
Lewix has quit [Ping timeout: 272 seconds]
tenderlove has joined #ruby-lang
<ljarvis> anyway, I reckon you can just rebuild this spec with one method stubbed: config_path
<ljarvis> better yet, make config_path an accessor and then don't stub it out at all
<ljarvis> stubs == bad
gwendall has joined #ruby-lang
<bruno> i did it
<bruno> as you said
<bruno> and worked
jxie has quit [Ping timeout: 265 seconds]
mkosaki has quit [Ping timeout: 265 seconds]
benlovell has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby-lang
jxie has joined #ruby-lang
mkosaki has joined #ruby-lang
<ljarvis> great
siaw has left #ruby-lang [#ruby-lang]
tenderlove has quit [Ping timeout: 245 seconds]
gjaldon has quit [Read error: Connection reset by peer]
gjaldon has joined #ruby-lang
Kryptonita has quit [Remote host closed the connection]
<bruno> but now when i try to invoke Kiik.config it raises "The spec/fixtures/kiik.yml config file is missing"
<ljarvis> so create it ;)
<bruno> ive already created
<bruno> the 2 first tests pass
<ljarvis> bruno: can you paste the updated code
<bruno> ive updated the gist
<ljarvis> bruno: again, line 7 makes no sense
<ljarvis> bruno: that will raise every time
<bruno> why that ?
<ljarvis> bruno: @config.empty? raise NotConfigured.new
<bruno> isnt .empty method checking for keys in config ?
<ljarvis> there is no if
dstodolny has joined #ruby-lang
<ljarvis> so it just runs both statements separately
<ljarvis> so you either want `raise ... if @config.empty?` or `config.empty? && raise ...`
djbkd has joined #ruby-lang
<bruno> hmmmm sorry
mattyohe has joined #ruby-lang
tomkad has joined #ruby-lang
slawrence00 has joined #ruby-lang
tomkad has quit [Client Quit]
djbkd has quit [Ping timeout: 256 seconds]
leandrosnunes has quit [Ping timeout: 245 seconds]
Kryptonita has joined #ruby-lang
futilegames has quit [Quit: futilegames]
<bruno> ljarvis thnxs a lot ive fixed the config method and updated the gist
<ljarvis> bruno: nice one
<ljarvis> fwiw, I would move that check into load_config
<ljarvis> otherwise it'll be checked every time you use config which probably isn't what you want
<bruno> sure
<ljarvis> does that make sense?
<bruno> you r right ill do it
<ljarvis> that way load_config will only ever be called once for X times config is called
dstodolny_ has quit [Quit: Ex-Chat]
<bruno> nice
futilegames has joined #ruby-lang
<bruno> and the config_path will be called once per load_config
dstodolny has left #ruby-lang [#ruby-lang]
Asher- has joined #ruby-lang
dstodolny has joined #ruby-lang
<ljarvis> bruno: here's what I use as a general pattern for this kind of thing: https://gist.github.com/leejarvis/06a874dccbe8bdcdf4cf
dstodolny has left #ruby-lang [#ruby-lang]
dstodolny_ has joined #ruby-lang
dstodolny_ has left #ruby-lang [#ruby-lang]
dstodolny_ has joined #ruby-lang
svajone has joined #ruby-lang
dstodolny_ has quit [Client Quit]
djbkd has joined #ruby-lang
sangwoojoo has joined #ruby-lang
dstodolny_ has joined #ruby-lang
chouhoulis has joined #ruby-lang
dstodolny_ has quit [Client Quit]
dstodolny_ has joined #ruby-lang
dstodolny_ has quit [Client Quit]
dstodolny_ has joined #ruby-lang
leonshalimov has joined #ruby-lang
Kryptonita has quit [Remote host closed the connection]
tsou has joined #ruby-lang
dstodolny_ has quit [Client Quit]
djbkd has quit [Ping timeout: 245 seconds]
gjaldon has quit [Ping timeout: 256 seconds]
<bruno> ljarvis thanxs a lot
<bruno> ill change so i wont need a stub in spec
chouhoulis has quit [Ping timeout: 276 seconds]
leonshalimov has quit [Ping timeout: 256 seconds]
gjaldon has joined #ruby-lang
jxie has quit [Ping timeout: 244 seconds]
shinnya has joined #ruby-lang
djbkd has joined #ruby-lang
jxie has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
brooks has joined #ruby-lang
Kryptonita has joined #ruby-lang
ottlikg has quit [Ping timeout: 265 seconds]
kaahirul has joined #ruby-lang
ta_ has joined #ruby-lang
Kryptonita has quit [Ping timeout: 245 seconds]
timanema has joined #ruby-lang
brooks has quit [Quit: brooks]
gjaldon has joined #ruby-lang
dstodolny has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
sangwoojoo has quit [Ping timeout: 245 seconds]
dstodolny has quit [Client Quit]
dstodolny has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
gjaldon has quit [Remote host closed the connection]
dstodolny has quit [Client Quit]
dstodolny has joined #ruby-lang
apeiros has quit [Ping timeout: 256 seconds]
benlovell has quit [Quit: leaving]
ottlikg has joined #ruby-lang
ta_ has joined #ruby-lang
brooks has joined #ruby-lang
djbkd has joined #ruby-lang
j0n3 has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
konr has quit [Quit: Connection closed for inactivity]
ta_ has quit [Ping timeout: 245 seconds]
j0n3 has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
j0n3_ has joined #ruby-lang
Integralist has quit [Ping timeout: 272 seconds]
j0n3_ has quit [Read error: Connection reset by peer]
loincloth has quit [Ping timeout: 256 seconds]
sangwoojoo has joined #ruby-lang
djbkd has joined #ruby-lang
djbkd has quit [Ping timeout: 240 seconds]
micmus has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
kapil__ has quit [Quit: Connection closed for inactivity]
booly-yam-6520 has joined #ruby-lang
booly-yam-4405 has joined #ruby-lang
djbkd has quit [Ping timeout: 240 seconds]
Olipro has joined #ruby-lang
Olipro has quit [Read error: Connection reset by peer]
booly-yam-9422 has joined #ruby-lang
leandrosnunes has joined #ruby-lang
chouhoulis has joined #ruby-lang
booly-yam-4405 has quit [Remote host closed the connection]
booly-yam-9422 has quit [Remote host closed the connection]
booly-yam-6520 has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
jxie has quit [Ping timeout: 245 seconds]
booly-yam-4115 has joined #ruby-lang
jxie has joined #ruby-lang
fusillicode1 has quit [Quit: Leaving.]
fusillicode has joined #ruby-lang
djbkd has joined #ruby-lang
brooks has quit [Quit: brooks]
VictorBjelkholm has joined #ruby-lang
iamninja has quit [Quit: ZZZzzz…]
unreal has joined #ruby-lang
svajone has quit [Quit: svajone]
devgiant has joined #ruby-lang
djbkd has quit [Ping timeout: 255 seconds]
Olipro has joined #ruby-lang
djbkd has joined #ruby-lang
symm- has joined #ruby-lang
VictorBjelkholm has quit [Quit: Leaving]
djbkd has quit [Ping timeout: 265 seconds]
stamina has quit [Quit: WeeChat 1.1]
kaahirul has quit [Remote host closed the connection]
sangwoojoo has quit [Ping timeout: 244 seconds]
kaahirul has joined #ruby-lang
Integralist has joined #ruby-lang
djbkd has joined #ruby-lang
riffraff has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
tomqq has joined #ruby-lang
tomqq has quit [Client Quit]
Integralist has quit [Ping timeout: 244 seconds]
fjfish has joined #ruby-lang
leonshalimov has joined #ruby-lang
Asher- is now known as Asher
djbkd has quit [Ping timeout: 245 seconds]
leonshalimov has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby-lang
kaahirul has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby-lang
djbkd has joined #ruby-lang
rahul_j has joined #ruby-lang
ta_ has joined #ruby-lang
j4cknewt has quit [Ping timeout: 245 seconds]
simi has joined #ruby-lang
bryancp has quit [Ping timeout: 276 seconds]
avdi has quit [Ping timeout: 244 seconds]
michaeldeol has joined #ruby-lang
manveru has quit [Ping timeout: 244 seconds]
djbkd has quit [Ping timeout: 245 seconds]
ta_ has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
diegoviola has joined #ruby-lang
rahul_j has joined #ruby-lang
djbkd has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby-lang
booly-yam-4115 has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
loincloth has joined #ruby-lang
Hawkran has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ascarter has joined #ruby-lang
ta_ has quit [Ping timeout: 245 seconds]
loincloth has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
avdi has joined #ruby-lang
adambeynon has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
leonshalimov has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta_ has joined #ruby-lang
leonshalimov has quit [Ping timeout: 264 seconds]
bryancp has joined #ruby-lang
djbkd has joined #ruby-lang
ritek has joined #ruby-lang
gjaldon has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
manveru has joined #ruby-lang
AKASkip1 has quit [Ping timeout: 245 seconds]
djbkd has quit [Ping timeout: 255 seconds]
rahul_j_ has joined #ruby-lang
devo2000 has joined #ruby-lang
rahul_j has quit [Ping timeout: 256 seconds]
rahul_j_ is now known as rahul_j
bruno has quit [Ping timeout: 272 seconds]
riffraff has quit [Quit: Leaving]
devgiant_ has joined #ruby-lang
devo2000 has quit [Client Quit]
devgiant has quit [Ping timeout: 245 seconds]
hackeron_ is now known as hackeron
ascarter has joined #ruby-lang
hackeron has quit [Changing host]
hackeron has joined #ruby-lang
gjaldon has quit []
gwendall has quit [Remote host closed the connection]
leandrosnunes has quit [Quit: WeeChat 1.0]
gwendall has joined #ruby-lang
red_menace has joined #ruby-lang
djbkd has joined #ruby-lang
gwendall has quit [Ping timeout: 276 seconds]
bruno has joined #ruby-lang
havenwood has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby-lang
devgiant_ has quit [Quit: Leaving]
j0n3 has quit [Quit: Leaving]
j0n3 has joined #ruby-lang
j0n3 has quit [Client Quit]
djbkd has joined #ruby-lang
fedexo has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby-lang
xsdg has quit [Ping timeout: 246 seconds]
trajing|Mobile has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
xsdg has joined #ruby-lang
djbkd has quit [Ping timeout: 265 seconds]
leandrosnunes has joined #ruby-lang
leandrosnunes has quit [Client Quit]
ddd has quit [Quit: leaving]
mattwildig has joined #ruby-lang
gwendall has joined #ruby-lang
chouhoulis has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 245 seconds]
rahul_j has quit [Quit: rahul_j]
djbkd has joined #ruby-lang
stamina has joined #ruby-lang
martinbmadsen has joined #ruby-lang
segy_ has joined #ruby-lang
segy has quit [Ping timeout: 264 seconds]
djbkd has quit [Ping timeout: 245 seconds]
segy_ is now known as segy
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
djbkd has joined #ruby-lang
leonshalimov has joined #ruby-lang
booly-yam-9490 has joined #ruby-lang
ta_ has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
leonshalimov has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 276 seconds]
loincloth has joined #ruby-lang
Miphix has quit [Quit: Leaving]
djbkd has joined #ruby-lang
fjfish has quit [Remote host closed the connection]
loincloth has quit [Ping timeout: 276 seconds]
francisfish has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
centrx has joined #ruby-lang
stamina has quit [Ping timeout: 245 seconds]
[H]unt3r has joined #ruby-lang
trajing|Mobile has joined #ruby-lang
kyb3r_ has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ur5us has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
trajing|Mobile has joined #ruby-lang
djbkd has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 265 seconds]
benten has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
martinbmadsen has joined #ruby-lang
benten has quit [Quit: ...]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaahirul has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
kaahirul has quit [Ping timeout: 245 seconds]
symbol has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
ta_ has joined #ruby-lang
ascarter has joined #ruby-lang
brooks has joined #ruby-lang
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
ta_ has quit [Ping timeout: 252 seconds]
bruno has quit [Ping timeout: 246 seconds]
bruno has joined #ruby-lang
postmodern has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
robbyoconnor has quit [Quit: Konversation terminated!]
|jemc| has quit [Ping timeout: 256 seconds]
AKASkip has joined #ruby-lang
gix has quit [Ping timeout: 255 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yorickpeterse has joined #ruby-lang
yorickpeterse has quit [Client Quit]
stamina has joined #ruby-lang
trajing|Mobile has joined #ruby-lang
<bruno> hey
gix has joined #ruby-lang
<bruno> to call a block and then reset a value setted before
brooks has quit [Quit: brooks]
trajing|Mobile has quit [Read error: Connection reset by peer]
<bruno> i.e: a = b block.call(a) a = c ?
<bruno> will it work ?
martinbmadsen has quit [Ping timeout: 276 seconds]
ashconnor has joined #ruby-lang
ashconnor is now known as aconnor
oleo has quit [Ping timeout: 240 seconds]
svajone has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
aconnor has quit [Quit: aconnor]
oleo has joined #ruby-lang
aconnor has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
<epitron> That looks fine
<epitron> I'm not exactly sure why you think that would be problematic though
<epitron> It leads me to believe that you're trying to do something less obvious, or your conception of variable references isn't clear
leonshalimov has joined #ruby-lang
loincloth has joined #ruby-lang
ruby-lang365 has joined #ruby-lang
<ruby-lang365> Hi, does anyone know how to match exact word while ignoring whitespace using regex?
j4cknewt has joined #ruby-lang
<ruby-lang365> I don't know regex and I'm left with ^example$ but I don't know where to put the \x and always keep getting invalid hex escape
yorickpeterse has joined #ruby-lang
j4cknewt_ has joined #ruby-lang
loincloth has quit [Ping timeout: 245 seconds]
leonshalimov has quit [Ping timeout: 265 seconds]
yorickpeterse has quit [Client Quit]
<ericwood> ruby-lang365: can you give an example of what you're trying to match?
j4cknewt has quit [Ping timeout: 245 seconds]
<ruby-lang365> I'm working on a program where I need "cd" command to show current dir while "cd c:\users" should change dir to \users similr to cmd
<ericwood> there's a bunch of builtin stuff for working with that sort of thing
<ruby-lang365> I don't know how that link would help....
<ericwood> I guess I don't quite understand the problem
<ericwood> are you trying to pull "users" out of "cd c:\users"?
<ruby-lang365> I'm sorry it's just my english.
<ericwood> no worries
<ericwood> hit up rubular.com and link to your example
<ericwood> type in what you've got going right now and it should be a little clearer
<ruby-lang365> When you type "cd" command,include?("cd") would return true so all I need to know is whether the user typed in just "cd" (space should be allowed) or "cd c:\user"
<ericwood> ah okay
yorickpeterse has joined #ruby-lang
<ericwood> >> 'cd c:\user' =~ /^cd$/
lsegal has joined #ruby-lang
<eval-in_> ericwood => nil (https://eval.in/243845)
<ericwood> so in that case you can conclude they only typed in cd
<ruby-lang365> A sample code
<ruby-lang365> http://repl.it/8Q7/1
<ericwood> you might want to use == instead of = in line one
<ruby-lang365> The first line will only accept "cd" but not "cd " or " cd" but I want to ignore whitespace...
<ruby-lang365> Sorry just for demonstration purpose so I didn't look through the code
<ericwood> >> 'cd '.strip == 'cd'
<eval-in_> ericwood => true (https://eval.in/243858)
<ruby-lang365> Thanks. I didn't know you could do this with .strip though
<tobiasvl> that's what strip is for
<ruby-lang365> I only knew things like "a b c d".strip(' ') etc
<tobiasvl> huh?
<tobiasvl> that doesn't work
<tobiasvl> >> "a b c d".strip(' ')
<eval-in_> tobiasvl => wrong number of arguments (1 for 0) (ArgumentError) ... (https://eval.in/243867)
rbowlby has joined #ruby-lang
<ruby-lang365> I just forgoet then hmm... D:
ascarter has joined #ruby-lang
<ruby-lang365> But there was like "a b c d".strip(' ') => ["a","b","c","d"] or something...
<tobiasvl> >> "a b c d".split(' ') # :)
<eval-in_> tobiasvl => ["a", "b", "c", "d"] (https://eval.in/243875)
<ruby-lang365> Ok I must now go for a check up as I didn't even conciously knew I was typing "strip" instead of "split" omg
<tobiasvl> haha. no problem ;)
<ruby-lang365> Thanks very much. Off I go now to code bye!
ottlikg has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 1.1]
trajing|Mobile has joined #ruby-lang
havenwood has joined #ruby-lang
ruby-lang365 has quit [Ping timeout: 246 seconds]
ruby-lang146 has joined #ruby-lang
<ruby-lang146> Hello. Could You help me? I would like to return from nested if function (in main if function), on certain condition, to main if and have main condition (in main if) checked once again
<ruby-lang146> How could I achieve it (without using goto)?
pwnz0r has joined #ruby-lang
<whitequark> "if function"?
<ruby-lang146> I mean conditiopnal statement
<ruby-lang146> nested in another If
<ruby-lang146> and I would like to go to main conditional statement check on certain condition in nested if
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kyb3r_ has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
kyb3r_ has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
cored has quit [Ping timeout: 255 seconds]
Hawkran has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<heftig> i'm kinda missing a bsearch_index
<heftig> having to map in the index sucks
dstodolny has quit [Quit: Ex-Chat]
dstodolny has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
dstodolny has quit [Remote host closed the connection]
<havenwood> heftig: did you see the recent patch for it? maybe bump with support: https://bugs.ruby-lang.org/issues/10730
RobertBirnie has joined #ruby-lang
ruby-lang146 has quit [Ping timeout: 246 seconds]
RobertBi_ has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 240 seconds]
trajing|Mobile has quit [Read error: Connection reset by peer]
trajing|Mobile has joined #ruby-lang
chouhoulis has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
kyb3r_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 276 seconds]
hplar_ has joined #ruby-lang
symbol has quit [Remote host closed the connection]
michaeldeol has joined #ruby-lang
GBrawl has quit [Quit: (null)]
pwnz0r has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
loincloth has joined #ruby-lang
GBrawl has joined #ruby-lang
leonshalimov has joined #ruby-lang
svajone has quit [Quit: svajone]
loincloth has quit [Ping timeout: 264 seconds]
sangwoojoo has joined #ruby-lang
leonshalimov has quit [Ping timeout: 245 seconds]
stamina has quit [Remote host closed the connection]
sangwoojoo has quit [Quit: Leaving.]
sangwoojoo has joined #ruby-lang
charliesome has quit [Quit: zzz]
Bwild has joined #ruby-lang
charliesome has joined #ruby-lang
aconnor has quit [Ping timeout: 244 seconds]
Forgetful_Lion has joined #ruby-lang
GBrawl has quit [Ping timeout: 276 seconds]
apeiros has joined #ruby-lang
<epitron> bsearch.with_index? :)
futilegames has quit [Quit: futilegames]
[H]unt3r has quit [Quit: Leaving]
trajing|Mobile has joined #ruby-lang
cornerma1 has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
mattwildig has quit []
cornerman has quit [Ping timeout: 276 seconds]
cornerma1 is now known as cornerman
diegoviola has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
mistym has quit [Ping timeout: 244 seconds]
TheXP has joined #ruby-lang
SuMo_D has joined #ruby-lang
elia has joined #ruby-lang
TheXP has quit []
chouhoulis has quit [Remote host closed the connection]
SuMo_D has quit [Ping timeout: 265 seconds]
cored has quit [Ping timeout: 264 seconds]
Lewix has quit [Remote host closed the connection]
wprice has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
donove has quit [Quit: Leaving]
mistym has joined #ruby-lang
arBmind1 has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has quit [Quit: My people need me...]
GaelanAintAround has quit [Ping timeout: 245 seconds]
zz_dlu has quit [Ping timeout: 245 seconds]
Hawkran has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
GaelanAintAround has joined #ruby-lang
zz_dlu has joined #ruby-lang
trajing|Mobile has joined #ruby-lang
AKASkip has quit [Ping timeout: 276 seconds]