apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
JpC0utur3 has joined #ruby-lang
elia has joined #ruby-lang
JpC0utur3 has quit [Client Quit]
JpC0utur3 has joined #ruby-lang
JpC0utur3 has quit [Client Quit]
JpC0utur3 has joined #ruby-lang
JpC0utur4 has quit [Ping timeout: 264 seconds]
TobiG77 has left #ruby-lang [#ruby-lang]
havenwood has quit [Remote host closed the connection]
krohrbaugh1 has joined #ruby-lang
krohrbaugh1 has quit [Client Quit]
fragamus has quit [Ping timeout: 260 seconds]
krohrbaugh has quit [Ping timeout: 248 seconds]
JpC0utur4 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 260 seconds]
smook4 has joined #ruby-lang
arubin has joined #ruby-lang
wmoxam has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
smook4 has quit [Ping timeout: 255 seconds]
ioga_wrk has quit [Ping timeout: 264 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
wmoxam has joined #ruby-lang
<zenspider>
injekt: drbrain is sick so he's offline
<yorickpeterse>
also TIL about constituent parsing
<yorickpeterse>
and I still don't know how to pronounce it
wudofyr___ has quit [Remote host closed the connection]
wudofyr___ has joined #ruby-lang
GarethAdams has joined #ruby-lang
elia has quit [Ping timeout: 246 seconds]
mradmacher has joined #ruby-lang
<whitequark>
wait, so it IS mcafee
<whitequark>
and not a novelty account
<whitequark>
huh.
smook4 has joined #ruby-lang
<yorickpeterse>
yes
<yorickpeterse>
it's the real deal
Lennier has joined #ruby-lang
<Lennier>
hi
<Lennier>
how can i use 'Convention Center' with the shortcut %w ?
<injekt>
wat
barttenbrinke has joined #ruby-lang
<injekt>
oh
<Lennier>
like VENUES = %w(Fairgrounds)
<injekt>
Lennier: escape the space
<injekt>
%w(foo\ bar)
<Lennier>
ah, thanks injekt
<Lennier>
great
smook4 has quit [Ping timeout: 255 seconds]
<injekt>
but that's horrible and you should use %w for single words only imo
mradmacher has quit [Quit: leaving]
<injekt>
a few quotes never hurt anyone :)
<Lennier>
yeah, that's true
andrewvos has joined #ruby-lang
<Lennier>
but i have 10 words and one with a blank inside
dfdf has quit [Remote host closed the connection]
GarethAdams|Work has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
elia has joined #ruby-lang
GarethAdams has quit [Ping timeout: 264 seconds]
duph has quit [Read error: Connection reset by peer]
duph has joined #ruby-lang
mradmacher has joined #ruby-lang
duph has quit [Read error: Connection reset by peer]
duph1 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
fbernier has quit [Ping timeout: 252 seconds]
Lennier has quit [Quit: Lennier]
sush24 has quit [Read error: Connection reset by peer]
elia has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
liamzebedee has joined #ruby-lang
stef_204 has quit [Remote host closed the connection]
elia has joined #ruby-lang
fbernier has joined #ruby-lang
liamzebedee has quit [Client Quit]
ruby-lang377 has joined #ruby-lang
ruby-lang377 has quit [Client Quit]
sush24 has joined #ruby-lang
ruby-lang422 has joined #ruby-lang
sush24_ has joined #ruby-lang
sush24 has quit [Ping timeout: 260 seconds]
ruby-lang422 has quit [Ping timeout: 250 seconds]
mbj has joined #ruby-lang
zenspider has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby-lang
<kke>
i've always hated this (0 for 1) error message, i can never tell was it expecting 1 or 0
<injekt>
0 instead of 1
Squarepy has joined #ruby-lang
<injekt>
so clearly it expected 1
<kke>
maybe i'll memorize it one day
<kke>
it should say something like 0 instead of 1 or expected 0 was 1
<injekt>
You gave *0* arguments *for* an expected *1*
elia has quit [Ping timeout: 256 seconds]
zenspider has joined #ruby-lang
elia has joined #ruby-lang
<Olipro>
so, I'm finding that if I Dir.chroot() and then Dir.chdir() { dosomething() }, Ruby will throw an exception when exiting the block
<Olipro>
looks like the interpreter doesn't get rid of its directory handle after chrooting
<Olipro>
so when it exits the chdir block, it tries to switch back to a handle that's now invalid due to the fact we chroot'd
<Olipro>
obviously, it can be fixed by calling chdir() straight after the chroot, but shouldn't the interpreter do something about that
<yorickpeterse>
what do you expect it can do about that?
<yorickpeterse>
You're changing directories while in a chroot (and probably to something out of the chroot), there's not much that can be done about that other than not doing it
<Olipro>
it could attempt to chdir to whatever the pwd string is (was)
<Olipro>
e.g. if I was in /root prior to the chroot, attempt to chdir to /root in the chroot
gja has quit [Quit: This computer has gone to sleep]
<Olipro>
and failing that, set it to /
<Olipro>
once you chroot, the handle has become utterly useless
shireesh has quit [Ping timeout: 255 seconds]
<Olipro>
so I'd argue it's sensible for Ruby to try and put you at the same path within the chroot, falling back to /
mossplix has joined #ruby-lang
<yorickpeterse>
That would mean Ruby would have to keep track of all that
<yorickpeterse>
The docs explicitly mention that when calling it without an argument it will chdir to $HOME
<yorickpeterse>
(given the variable is there)
marr has joined #ruby-lang
gr4yscale has quit [Ping timeout: 246 seconds]
ruby-lang317 has joined #ruby-lang
_elia has joined #ruby-lang
sush24_ has quit [Ping timeout: 248 seconds]
ruby-lang317 has quit [Ping timeout: 250 seconds]
elia has quit [Ping timeout: 268 seconds]
<Olipro>
yorickpeterse: it wouldn't have to "keep track" the code would basically just run as part of doing the chroot
<Olipro>
it's unpleasant to have chrooted and then find that Ruby throws an exception when it's exiting a block
<yorickpeterse>
It would still have to keep track of the CWD before the chdir
<yorickpeterse>
It's not, you're misunderstanding the way Dir.chdir works
<yorickpeterse>
without an argument that is
<Olipro>
the cwd doesn't change, that's the problem
<Olipro>
I call Dir.chroot() and the cwd handle is unchanged
<Olipro>
but the OS has of course invalidated the handle
<Olipro>
are you following?
sush24 has joined #ruby-lang
<yorickpeterse>
The cwd doesn't change, correct. However, depending on what you're chrooting to it might become unreachable
<yorickpeterse>
If you're chrooting to /foo/bar/baz and you're in /foo/bar then there's not much Ruby can do
<yorickpeterse>
Though it could cd to the chroot, but I don't think that option is available
<Olipro>
well that's true, if the cwd is within the chroot path, the handle would remain valid - but then, the chroot() code could easily test for that and do something about it if not
bzalasky has quit [Remote host closed the connection]
lupine has quit [Read error: Connection reset by peer]
lupine has joined #ruby-lang
shireesh has joined #ruby-lang
elia has joined #ruby-lang
sush24_ has joined #ruby-lang
sush24 has quit [Ping timeout: 246 seconds]
_elia has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Read error: Operation timed out]
rikai_ has joined #ruby-lang
shireesh has quit [Ping timeout: 246 seconds]
toretore has joined #ruby-lang
sush24_ has quit [Ping timeout: 264 seconds]
rikai has quit [Ping timeout: 246 seconds]
_elia has joined #ruby-lang
ironcamel has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
Squarepy has quit [Quit: Leaving]
<yorickpeterse>
private repos: 44
<yorickpeterse>
aww yiss, delete all the repos
elia has quit [Ping timeout: 268 seconds]
yxhuvud2 has quit [Ping timeout: 260 seconds]
yxhuvud has joined #ruby-lang
elia has joined #ruby-lang
GeissT has quit [Ping timeout: 256 seconds]
Domon has quit [Remote host closed the connection]
_elia has quit [Ping timeout: 256 seconds]
Squarepy has joined #ruby-lang
_elia has joined #ruby-lang
Linkedipsoul_ has joined #ruby-lang
Linkedipsoul has quit [Ping timeout: 255 seconds]
elia has quit [Ping timeout: 268 seconds]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
philnyc has joined #ruby-lang
mucker has quit [Quit: leaving]
ffio has joined #ruby-lang
barttenbrinke has joined #ruby-lang
kstuart has joined #ruby-lang
ryez has joined #ruby-lang
x0f has quit [Ping timeout: 240 seconds]
x0f has joined #ruby-lang
MaddinXx has quit [Ping timeout: 248 seconds]
x0f has quit [Ping timeout: 252 seconds]
kstuart has quit [Ping timeout: 268 seconds]
x0f has joined #ruby-lang
Linkedipsoul_ has quit [Quit: Leaving]
duph1 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
Philpax has quit [Quit: Leaving]
jsullivandigs has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Lennier has joined #ruby-lang
lcdhoffman has joined #ruby-lang
MaddinXx has joined #ruby-lang
fedesilv_ has quit [Remote host closed the connection]
fedesilva has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 255 seconds]
x0f has quit [Ping timeout: 260 seconds]
marcostoledo has quit [Ping timeout: 252 seconds]
x0f has joined #ruby-lang
marcostoledo has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
elia has joined #ruby-lang
ldnunes has joined #ruby-lang
_elia has quit [Ping timeout: 256 seconds]
mdedetrich has joined #ruby-lang
_elia has joined #ruby-lang
andrewvos has quit [Ping timeout: 246 seconds]
x0f has quit [Ping timeout: 260 seconds]
x0f has joined #ruby-lang
elia has quit [Ping timeout: 268 seconds]
cstrahan has joined #ruby-lang
jxie has quit [Quit: leaving]
num74 has joined #ruby-lang
gnufied has joined #ruby-lang
ebouchut has quit [Ping timeout: 240 seconds]
x0f has quit [Ping timeout: 260 seconds]
yalue has joined #ruby-lang
rikai_ has quit [Read error: Connection reset by peer]
rikai has joined #ruby-lang
x0f has joined #ruby-lang
elia has joined #ruby-lang
_elia has quit [Ping timeout: 256 seconds]
x0f has quit [Read error: Operation timed out]
x0f has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
ebouchut has joined #ruby-lang
wudofyr___ has quit [Remote host closed the connection]
wudofyr___ has joined #ruby-lang
Lennier has quit [Quit: Lennier]
_elia has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby-lang
x0f has joined #ruby-lang
elia has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby-lang
x0f has quit [Ping timeout: 246 seconds]
x0f has joined #ruby-lang
<yorickpeterse>
hey you guys remembered that one time I packaged Java in Ruby?
<yorickpeterse>
I'm now packaging the following in Ruby: Python code that calls a Bash script that calls a Java library
<injekt>
gtfo
finnx has joined #ruby-lang
<yorickpeterse>
though I reckon I can get rid of the Bash stuff by moving it over to Python
<yorickpeterse>
since it makes no sense for it to be there
Mon_Ouie has quit [Ping timeout: 255 seconds]
finnx has left #ruby-lang [#ruby-lang]
<Olipro>
you're making the angels weep
<injekt>
ah yes, THATS the part that makes no sense
elia has joined #ruby-lang
<yorickpeterse>
injekt: hey, good luck getting 8 different companies to use the same toolchain
<yorickpeterse>
especially if they all know only specific ones
postmodern has quit [Quit: Leaving]
<yorickpeterse>
and some of them aren't actual brogrammers
<Olipro>
"brogrammer", jesus
<yorickpeterse>
Oh yeah I forget that this channel generally doesn't understand the concept of sarcasm/generic humor
<yorickpeterse>
and then something like ParentConstant.const_get(...)
stamina has joined #ruby-lang
<apeiros>
bgant: if you have to modify the given string/symbol to get at the actual name, then you have a rather brittle system
<apeiros>
if it's of your own design, then 2 things: a) classes are objects, you can pass them around like any other object, i.e. you can use Foo instead of :foo
<bgant>
basically creating a CLI wrapper class that calls a web service
<apeiros>
b) if - for whatever reason - you insist on using a symbol, I'd at least make it match the name directly, e.g. :Foo instead of :foo
<bgant>
so it will take the controller name as an argument
<bgant>
so, not guaranteed case sensitivity
<bgant>
or rather, I can guarantee upcase at parsing
<yorickpeterse>
havenwood: your version uses more bytes
dc5ala has quit [Quit: Ex-Chat]
<yorickpeterse>
therefor I can't cram it on a 1970s tape record
justinmburrous has joined #ruby-lang
<yorickpeterse>
hm wait, let me actually verify that
kith has quit [Read error: Connection reset by peer]
kith_ has joined #ruby-lang
<yorickpeterse>
CURSE ME TIMBERS
<yorickpeterse>
yours is slimmer
justinmburrous has quit [Remote host closed the connection]
<yorickpeterse>
it saves 47 characters
<pipework>
I like judy hashes. :D
ezkl has joined #ruby-lang
justinram has joined #ruby-lang
justinram has quit [Remote host closed the connection]
justinram has joined #ruby-lang
justinram has quit [Remote host closed the connection]
jstorimer has quit [Remote host closed the connection]
zachlatta has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
gr4yscale has quit [Quit: Computer has gone to sleep.]
tkuchiki has joined #ruby-lang
rippa has quit [Ping timeout: 248 seconds]
JpC0utur3 has quit [Ping timeout: 240 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
JpC0utur3 has joined #ruby-lang
yalue has quit [Quit: Leaving]
klebervirgilio has joined #ruby-lang
jstorimer has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
stamina has quit [Read error: Operation timed out]
srji has quit [Ping timeout: 248 seconds]
klebervirgilio has joined #ruby-lang
ezkl has quit [Ping timeout: 246 seconds]
xxaM has quit [Ping timeout: 256 seconds]
klebervirgilio has quit [Ping timeout: 246 seconds]
klebervirgilio has joined #ruby-lang
joshuawscott has quit [Quit: joshuawscott]
xxaM has joined #ruby-lang
klebervirgilio has quit [Read error: Connection reset by peer]
klebervirgilio has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
jstorimer has quit [Remote host closed the connection]
randalla1ordon has left #ruby-lang [#ruby-lang]
jstorimer has joined #ruby-lang
dingus_khan has joined #ruby-lang
mbj has quit [Ping timeout: 264 seconds]
srji has joined #ruby-lang
<injekt>
yorickpeterse: yo
<yorickpeterse>
sup inkjet
coffeeju1 has quit [Ping timeout: 252 seconds]
<injekt>
yorickpeterse: I have a rails action called 'assign_contact' which is on a users controller which well, assigns a contact, right now i use a match with get/post and check request.post? that's bad but I can't think of a naming scheme, any ideas?
dingus_khan has quit [Ping timeout: 241 seconds]
<injekt>
weird question but i dont like #ror and I know you might have an opinion
<yorickpeterse>
well, why do you need both a GET and a POST on the same method?
<yorickpeterse>
to show the form and save the data?
<injekt>
si
<yorickpeterse>
hmm
<injekt>
and assign_contact_form is horrible please dont say that
<yorickpeterse>
do you also have an overview of the contacts of a user?
<yorickpeterse>
as in, an index-like method or something
<injekt>
nope otherwise I'd probably nest a new controller
<yorickpeterse>
if so I'd probably slap that in a separate controller (e.g. app/controllers/users/contact.rb)
<injekt>
which is what you're thinking?
<yorickpeterse>
hm
<injekt>
:P
gnufied has joined #ruby-lang
<yorickpeterse>
yeah, something like /users/10/contact and /users/10/contact/assign
gnufied has quit [Client Quit]
<yorickpeterse>
otherwise you'll end up with actions like #assign_contact and #save_assign_contact
<yorickpeterse>
or the double action thing
symm- has quit [Ping timeout: 260 seconds]
<injekt>
yep :(
<injekt>
I have another action like that too, wanted to avoid all the controllers
<yorickpeterse>
I'd say just go for an extra controller
<injekt>
but I guess that's the right way to do it
<yorickpeterse>
especially routing wise it just saves you some trouble
<yorickpeterse>
heh wait, let me show you an awesome routes.rb
<injekt>
yeah once you do that it's hard to get out of it, the only reason it works here for me is I've extracted most bits out of it and it's a very new app
<injekt>
jroes: that is disgusting
<injekt>
but it's easy to break down
<yorickpeterse>
jroes: start with breaking some things into separate methods
<yorickpeterse>
e.g.
<yorickpeterse>
Hash.new {|h,k| h[k] = Set.new} can probably go in something like default_hash()
<yorickpeterse>
and the one-liner `m[(s[1].nil? ? '#ffffff' : s[1].name)] << (s[0].nil? ? '' : s[0].name)` is probably easier to read when spread out
<yorickpeterse>
(as in, a normal if/else)
<injekt>
also use better variable names
<yorickpeterse>
and don't chain blocks that way
<yorickpeterse>
(as in, `end.something_else`)
elia has quit [Quit: Computer has gone to sleep.]
<jroes>
btw, I didn't write this, I'm just having trouble comprehending it, and I feel obligated to make it readable for the next person
<yorickpeterse>
that's a good thing :)
mfn_ has left #ruby-lang [#ruby-lang]
mfn has joined #ruby-lang
<mfn>
hi
benanne has joined #ruby-lang
Aaaarg has quit [Quit: Aaaarg]
firstdayonthejob has quit [Ping timeout: 264 seconds]
jstorimer has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
joshuawscott has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
krohrbaugh has quit [Read error: Connection reset by peer]
krohrbaugh1 has joined #ruby-lang
krohrbaugh has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
fedesilva has quit [Read error: Operation timed out]
<whitequark>
yorickpeterse: stripping accidental ruby details away from foundry!
<whitequark>
feels good man
elia has joined #ruby-lang
<whitequark>
like... methods are just closures now, with implicit `self` as a first parameter. (or explicit, if you unbound_method it)
<whitequark>
and there's no 'default definee' or 'cref' now. just 'self', and def operates on it.
srji has quit [Ping timeout: 248 seconds]
<whitequark>
and include/prepend are called append/prepend, plus you can do it arbitrary many times anywhere in hierarchy.
<cout>
what is foundry?
<whitequark>
basically, it's just a stack of filters now.
<zenspider>
jroes: I'm guessing that sort_by is wrong, no? the ones w/o size_names w/ be unordered
nathanstitt has quit [Quit: I growing sleepy]
<zenspider>
lastly... If I had to guess, there's a LOT of duplication on the products of their size and color options, so you could build up a table w/ the cached results and look it up
vlad_starkov has quit [Ping timeout: 241 seconds]
krohrbaugh has quit [Quit: Leaving.]
w00x has joined #ruby-lang
<zenspider>
pushed another rev
thiagoborges has quit [Remote host closed the connection]
x0f has quit [Ping timeout: 264 seconds]
skade has joined #ruby-lang
<jroes>
dang, nice!
<jroes>
I was off researching what the heck is coming into this thing, since apparently it's not what I expected
<jroes>
I think it's a zipped form of size and color
postmodern has joined #ruby-lang
forrest has quit [Quit: Leaving]
<zenspider>
prolly not zipped. or... they'd have to multiply them out first
<zenspider>
this just seems bad
<zenspider>
and... WHERE is this code?
<zenspider>
I'm guessing it isn't on Product, because that would make sense
<apeiros>
zenspider: SortedSet and drop the sorting?
<jroes>
hahaha. it is. it's in a module called "ProductFunctions"
<injekt>
omg Functions
<jroes>
which is included in Product. *sigh*
<apeiros>
oh, sort_by
* injekt
des
<injekt>
dies
<jroes>
lol
<zenspider>
apeiros: that was my initial thought... but it seems like the sort is too complex? I dunno
<apeiros>
yeah
<zenspider>
jroes: are you fucking kidding? tell me you are
* jroes
shakes head slowly
<zenspider>
ok. where are you?
<jroes>
I better hide all info
<zenspider>
and does the author still work there?
<jroes>
damn myself for not staying more anonymous on the internets
<jroes>
author works for me, he's a good guy, real smart and all. he just likes puzzles :x
<injekt>
jroes: your blog is interesting
<jroes>
think he got bored and decided to play ruby golf
Aloysius1 has joined #ruby-lang
<zenspider>
if he shouldn't be fired... he should be forced to pair with someone UNclevar for at least a week
<injekt>
zenspider: so cold
dingus_khan has quit [Remote host closed the connection]
<jroes>
I reviewed the pull request for these changes and I made some faces, but it's hrad enough to get people to get things done in a timely manner, let alone in quality code
<apeiros>
zenspider: for teams that's actually a very useful measure
<zenspider>
pairing is a good way to retrain someone out of the bullshit
bgant has quit [Quit: Leaving.]
wesside has quit [Quit: Ice cream truck!]
<apeiros>
indeed
dhruvasa1ar has quit [Ping timeout: 268 seconds]
<zenspider>
jroes: timely and quality go hand in hand
<jroes>
long-term, definitely
<zenspider>
quality code takes a little longer up front, but requires less revisiting
<jroes>
I haven't been able to make the short-term case though
<jroes>
that's how I feel. tough to get the rest of the company / clients on board
<jroes>
so the author of this code has gained a reputation of writing "too many tests" and not being very productive
<jroes>
I venture to say it's not the tests fault, it's the "clever"ness
<zenspider>
then he needs to learn about proper edge cases... and yeah. not being clevar
jstorimer has quit [Remote host closed the connection]
<zenspider>
objective profiling of the code can point a lot of that out
<zenspider>
clevar code frequently becomes the bottleneck
jstorimer has joined #ruby-lang
<jroes>
yeah. there's some other code in a long lost place that's doing some really fancy currying
<jroes>
same author
skade has quit [Ping timeout: 264 seconds]
<zenspider>
jroes: nil checks are almost always a code smell.
krohrbaugh has joined #ruby-lang
<jroes>
yeah, it's funny because this guy has totally seen the DAS episode about the nil object pattern
<jroes>
he told me all about it
wmoxam has quit [Ping timeout: 260 seconds]
<zenspider>
yeah blowmage ... that's creepy
<blowmage>
its creepy?
breakingthings has quit [Quit: breakingthings]
atmosx has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
justinmburrous has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
krohrbaugh has joined #ruby-lang
jstorimer has quit [Remote host closed the connection]
Wardrop has joined #ruby-lang
w00x has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
enebo has joined #ruby-lang
workmad3 has joined #ruby-lang
enebo has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
torrieri has quit [Quit: Leaving...]
krohrbaugh has quit [Quit: Leaving.]
pipework has quit [Ping timeout: 255 seconds]
neurodamage has quit [Ping timeout: 248 seconds]
jsullivandigs has joined #ruby-lang
neurodamage has joined #ruby-lang
benanne has quit [Quit: kbai]
joshuawscott has quit [Quit: joshuawscott]
<Aloysius1>
Hey, would it be banworthy to ask a testing question here?
torrieri has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
<injekt>
Aloysius1: no
joshuawscott has joined #ruby-lang
<Aloysius1>
OK, here it is: I have an object that subscribes to a message queue by passing a code block. So, "message_queue_module::subscribe(args) do | parm1, parm2, parm3 | <...code block here...>".
<Aloysius1>
And I want to test that "code block here" part. It seems like I should be able to do that by hijacking the "message_queue_module::subscribe" routine so that my testing code gets it rather than the message_queue_module.
coffeeju1 has joined #ruby-lang
<Aloysius1>
I thought I could stub it with "message_queue_module.stub(:subscribe) do | callback |" and then capturing the value of callback, which should contain my code block.
<Aloysius1>
But maybe I'm just thinking about it wrong.
atmosx has quit [Quit: And so the story goes…]
<Aloysius1>
(I mean, needless to say this doesn't work, but I'm not sure if it's that I've made a minor mistake or gone completely of the proverbial rails.)
TvL2386 has quit [Quit: Ex-Chat]
torrieri has quit [Read error: Connection reset by peer]
torrieri_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
JpC0utur3 has quit [Ping timeout: 248 seconds]
jstorimer has joined #ruby-lang
JpC0utur3 has joined #ruby-lang
torrieri_ has quit [Client Quit]
dingus_khan has joined #ruby-lang
xsdg has quit [Ping timeout: 256 seconds]
smook4 has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
jstorimer has quit [Ping timeout: 240 seconds]
<naquad>
is there something like lazy value in ruby?
<naquad>
i need something that will accept block and won't execute it until someone tries to do something with this object
krohrbaugh has quit [Quit: Leaving.]
joshuawscott has quit [Quit: joshuawscott]
krames has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x0f_ has quit [Ping timeout: 264 seconds]
tdy has quit [Read error: Connection reset by peer]
machuga has quit [Ping timeout: 248 seconds]
x0f has joined #ruby-lang
tdy has joined #ruby-lang
xsdg has joined #ruby-lang
machuga has joined #ruby-lang
x0f has quit [Read error: Operation timed out]
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
torrieri has joined #ruby-lang
x0f has joined #ruby-lang
geopet has quit [Quit: geopet]
DomKM has joined #ruby-lang
krohrbaugh has joined #ruby-lang
x0f has quit [Ping timeout: 264 seconds]
x0f has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
krohrbaugh1 has joined #ruby-lang
solars has quit [Read error: Operation timed out]
andrewvos has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
Squarepy has quit [Quit: Leaving]
machuga has quit [Max SendQ exceeded]
machuga has joined #ruby-lang
cofin has quit [Quit: cofin]
krohrbaugh1 has quit [Quit: Leaving.]
torrieri has quit [Quit: Leaving...]
krohrbaugh has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
fragamus has quit [Quit: Computer has gone to sleep.]
Silex has quit [Ping timeout: 248 seconds]
mikewintermute has quit [Quit: mikewintermute]
torrieri_ has joined #ruby-lang
Silex has joined #ruby-lang
andrewvos has quit [Quit: leaving]
slowhands has joined #ruby-lang
jstorimer has joined #ruby-lang
bastilian has joined #ruby-lang
DomKM has quit [Quit: Leaving.]
GarethAdams has joined #ruby-lang
stamina has quit [Ping timeout: 246 seconds]
krohrbaugh has quit [Quit: Leaving.]
kstuart has joined #ruby-lang
mistym has quit [Remote host closed the connection]