havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.0, 2.5.3, 2.4.5: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
ogres has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.2]
hutch has quit [Ping timeout: 250 seconds]
rkazak has joined #ruby
Azure has quit [Ping timeout: 272 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 252 seconds]
sputnik13 has joined #ruby
tdy has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
darix has quit [Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number]
darix has joined #ruby
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saysjonathan has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
<mspo> zenspider: congrats
<mspo> zenspider: I have 30 years to go
rkazak has joined #ruby
<mspo> zenspider: but I also have 17 years in so.. whatever
marmotini_ has joined #ruby
Azure has joined #ruby
eddof13 has quit [Quit: eddof13]
tdy has quit [Ping timeout: 245 seconds]
davidw has quit [Ping timeout: 244 seconds]
horribleprogram has joined #ruby
<horribleprogram> *sigh*
<horribleprogram> thinking about my ex again
<horribleprogram> I've been alone for too long, there's no turning back
saysjonathan has quit [Ping timeout: 250 seconds]
<horribleprogram> if u put someone in a cell for 10 years, they learn to adapt in that cell, and change their behavior
<horribleprogram> sometimes it's irreversible
<horribleprogram> kinda like brain damage from doing a bunch of drugs when you're 14
saysjonathan has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
<baweaver> horribleprogram: need some help with Ruby?
<horribleprogram> baweaver: Not really I've never written a script with Ruby or anything
<baweaver> Never a better time to start than now :D
orbyt_ has quit [Client Quit]
AJA4351 has joined #ruby
<horribleprogram> baweaver: I don't really see the point of adding Ruby to the toolkit
bmurt has joined #ruby
<baweaver> horribleprogram: There's always a point! https://ruby.github.io/TryRuby/
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
<baweaver> You just have to believe in magic, and you can fly!
<horribleprogram> The 1000 hours of studying Ruby can be spent learning Groovy or something
<havenwood> horribleprogram: I thought from what you first said that you might be using Groovy on Grails. Try Ruby on Rails!
<havenwood> Or TruffleRuby runs on GraalVM, and is quite impressive. (Graal isn't so far from Grails, after all.)
<baweaver> Why just 1000?
<baweaver> Why not 10_000 horribleprogram?
<baweaver> There's so much fun to be had!
<horribleprogram> wow you can put underscores in an integer literal in Ruby?
<baweaver> Yep!
<havenwood> horribleprogram: But only one in a row.
<horribleprogram> wow that's cool
<baweaver> You want to learn Ruby, you just don't quite know it yet.
<baweaver> So we're here to help!
<horribleprogram> OH WAIT JAVA SE 7 IMPLEMENTED THAT HAHAHAHHAHAHAHAHAHAHAHAHAHHAHAHA
<havenwood> &>> "#{1_0_0}%"
<rubydoc> # => "100%" (https://carc.in/#/r/5yxu)
<horribleprogram> listen to me, I'd never learn Ruby in a thousand years
<horribleprogram> Written by some Japanese
<baweaver> &>> "100%".next # :D
<rubydoc> # => "101%" (https://carc.in/#/r/5yxv)
<horribleprogram> Japanese are shitty programmers and don't know shit about anything
<havenwood> !troll horribleprogram
<horribleprogram> The last thing they've made was the compact cd
<horribleprogram> player, Sony
<horribleprogram> in the 80s
<horribleprogram> so fuck off
rkazak has quit [Quit: Sleep.....ing....]
horribleprogram was banned on #ruby by havenwood [*!~horriblep@unaffiliated/nightcoder]
horribleprogram has left #ruby [#ruby]
<baweaver> Nighty night
<phaul> it's already night over there?! /me confused.... 'night , anyways
<baweaver> Well, that was fun. Off I go, it's movies time!
<baweaver> Cheers
<phaul> 3am - ~ 8 hrs = 24:00 - 5 hrs = ~ 19 hrs
<baweaver> 5:30pm here
<phaul> sounds like morning to me :)
saysjonathan has quit [Ping timeout: 250 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
exchgr has joined #ruby
exchgr` has quit [Ping timeout: 252 seconds]
saysjonathan has joined #ruby
<mspo> groovy is terrible
<mspo> I think it's my least favorite language I've encountered
Tempesta has quit [Quit: AdiIRC is updating to v3.3 Beta Build (2019/01/09 UTC) 64 Bit]
gix has quit [Ping timeout: 244 seconds]
Tempesta has joined #ruby
saysjonathan has quit [Ping timeout: 245 seconds]
saysjonathan has joined #ruby
rkazak has joined #ruby
LSD-Jester has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
LSD-Jester has left #ruby [#ruby]
saysjonathan has quit [Ping timeout: 244 seconds]
marmotini_ has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
r29v has quit [Quit: r29v]
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
tdy has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
AJA4351 has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
chouhoulis has quit [Remote host closed the connection]
<dviola> mspo: heh
chouhoulis has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
esrse has joined #ruby
saysjonathan has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RougeR has quit [Ping timeout: 250 seconds]
gregf_ has quit [Ping timeout: 256 seconds]
d^sh has quit [Ping timeout: 272 seconds]
d^sh has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
dviola has quit [Quit: WeeChat 2.3]
saysjonathan has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
uplime has joined #ruby
orbyt_ has joined #ruby
davidw has joined #ruby
saysjonathan has joined #ruby
duderonomy has joined #ruby
Swyper has quit [Remote host closed the connection]
AJA4350 has quit [Quit: AJA4350]
cd has quit [Quit: cd]
r29v has joined #ruby
Swyper has joined #ruby
davidw has quit [Ping timeout: 272 seconds]
Swyper has quit [Ping timeout: 252 seconds]
Swyper has joined #ruby
davidw has joined #ruby
Swyper has quit [Remote host closed the connection]
saysjonathan has quit [Quit: leaving]
davidw has quit [Ping timeout: 272 seconds]
braincrash has quit [Quit: bye bye]
Swyper has joined #ruby
braincrash has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
Swyper has quit [Ping timeout: 258 seconds]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiff has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
kapil____ has joined #ruby
hutch has joined #ruby
DTZUZO has quit [Ping timeout: 244 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
adgtl has joined #ruby
<adgtl> Is there any better way to write this?
DTZUZO has joined #ruby
<adgtl> missing else one
Nicmavr has joined #ruby
ur5us has joined #ruby
<mozzarella> adgtl: what does @window contain?
ur5us has quit [Ping timeout: 272 seconds]
Swyper has joined #ruby
<adgtl> mozzarella title of window. . abc.txt - myproject
Swyper has quit [Ping timeout: 250 seconds]
hutch has quit [Ping timeout: 244 seconds]
<mozzarella> adgtl: why not just use a regex instead?
<adgtl> hmm
d^sh has quit [Ping timeout: 245 seconds]
d^sh has joined #ruby
<mozzarella> adgtl: something like that: @window.split(/[#{NORMAL_DASH}#{SPECIAL_DASH}]/)
DTZUZO has quit [Ping timeout: 250 seconds]
cthu| has quit [Ping timeout: 246 seconds]
davidw has joined #ruby
<mozzarella> actually I think | would work in here
<mozzarella> @window.split(/#{NORMAL_DASH}|#{SPECIAL_DASH}/)
dellavg_ has joined #ruby
r29v has quit [Quit: r29v]
Azure has quit [Ping timeout: 250 seconds]
hutch has joined #ruby
DTZUZO has joined #ruby
Azure has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has quit [Ping timeout: 250 seconds]
hutch has quit [Ping timeout: 244 seconds]
davidw has quit [Ping timeout: 245 seconds]
dellavg_ has quit [Ping timeout: 240 seconds]
raulp has quit [Quit: raulp]
dionysus69 has quit [Ping timeout: 272 seconds]
CrazyEddy has quit [Ping timeout: 268 seconds]
zenogais has quit [Ping timeout: 250 seconds]
hiroaki has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
cthulchu has joined #ruby
conta has joined #ruby
nowhere_man has joined #ruby
marmotini_ has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #ruby
mzre has joined #ruby
tdy has joined #ruby
marmotini_ has quit [Ping timeout: 246 seconds]
cthulchu_ has quit [Ping timeout: 272 seconds]
profetes has joined #ruby
KeyJoo has joined #ruby
CrazyEddy has joined #ruby
aupadhye has joined #ruby
maufart__ has joined #ruby
marmotini_ has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
dionysus69 has joined #ruby
mzre has quit [Remote host closed the connection]
neuraload has joined #ruby
donofrio has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 246 seconds]
rkazak has quit [Quit: Sleep.....ing....]
Inline has quit [Quit: Leaving]
neuraload has quit [Quit: Leaving]
jenrzzz has joined #ruby
clemens3 has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
status402 has joined #ruby
status402 has quit [Client Quit]
decal has quit [Read error: Connection reset by peer]
status402 has joined #ruby
reber has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
not_finger_guns has joined #ruby
not_finger_guns has quit [Remote host closed the connection]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
status402 has quit [Read error: Connection reset by peer]
status402 has joined #ruby
esrse has quit [Quit: 좋은 주말~]
marmotini_ has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 258 seconds]
reber has quit [Remote host closed the connection]
conta has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
uplime has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
DTZUZO has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
jenrzzz has joined #ruby
zululee_ has quit [Quit: Ping timeout (120 seconds)]
zululee_ has joined #ruby
mikecmpbll has joined #ruby
livcd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 246 seconds]
uplime has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby
CrazyEddy has quit [Ping timeout: 250 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 244 seconds]
hahuang65 has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
CrazyEddy has joined #ruby
Bish has joined #ruby
<Bish> why does mail.from_addrs from the mail gem exist
<Bish> it just wraps ".from" inside an array
gregf_ has joined #ruby
uplime has quit [Ping timeout: 245 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
KeyJoo has quit [Ping timeout: 258 seconds]
KeyJoo has joined #ruby
jenrzzz has joined #ruby
marmotini_ has joined #ruby
DTZUZO has joined #ruby
dhollinger has quit [Ping timeout: 250 seconds]
bikram_ has joined #ruby
za1b1tsu has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
am0123 has joined #ruby
jenrzzz has joined #ruby
drale2k_ has joined #ruby
<canton7> Bish, well it does slightly more: `from ? [from].flatten : []`
<canton7> That's the sort of thing that I might put in a little helper method
drale2k_ has quit [Client Quit]
dhollinger has joined #ruby
catbusters has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
<Bish> canton7: my problem was that i have code like
<Bish> .to_address = "Something, Somethingelse <a@b.de>"
<Bish> the mail gem made this 2 addresses.. and it resulted in multiple sender addresses
<Bish> man that was hard to find
<Bish> canton7: i expected the mail gem to encode that
<Bish> canton7: slighty more? u mean the flaten thing?
gregf_ has quit [Ping timeout: 256 seconds]
<canton7> yeah, flattens and provides an empty array as the default value
bikram_ has quit [Quit: Lost terminal]
nertzy has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
neuraload has joined #ruby
venmx has joined #ruby
neuraload has quit [Quit: Leaving]
drale2k_ has joined #ruby
drale2k_ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
am0123 has quit [Ping timeout: 260 seconds]
lucasb has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
uplime has joined #ruby
deathwishdave has joined #ruby
<deathwishdave> morning
<deathwishdave> I am looking for a rails app that can handle registration, licensing, authentication etc for a desktop application
<deathwishdave> anyone know if such a thing exists? I guess i'm not google the right terms
status402 has quit [Read error: Connection reset by peer]
status402_ has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
<canton7> deathwishdave, things like that rarely come out-of-the-box, since "registration" is a word which means something slightly different to everyone which puts it in their requirements...
<canton7> deathwishdave, you'll find tools which help you to build a rails app which can do those things, though
<deathwishdave> can
<deathwishdave> canton7 makes sense, thanks
<deathwishdave> canton7 we were building an in house system, 99% of the way there, and the dev behind it has been taken seriously ill
<deathwishdave> full panic now on
fiachetti has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
za1b1tsu has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 258 seconds]
keden has joined #ruby
uplime has quit [Ping timeout: 250 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathwishdave has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
SqREL has joined #ruby
jenrzzz has joined #ruby
uplime has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
am0123 has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has joined #ruby
jenrzzz has joined #ruby
stryek has joined #ruby
status402_ has quit [Ping timeout: 258 seconds]
keden has quit [Ping timeout: 268 seconds]
keden has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
reber has joined #ruby
jcalla has joined #ruby
jenrzzz has joined #ruby
bmurt has joined #ruby
Aqo has quit [Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805]]
keden has quit [Quit: WeeChat 2.3]
status402 has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
uplime has quit [Ping timeout: 250 seconds]
am0123 has quit [Ping timeout: 258 seconds]
drale2k_ has joined #ruby
drale2k_ has quit [Client Quit]
aupadhye has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
alexterziev has joined #ruby
pvalena has joined #ruby
rippa has joined #ruby
jacksoow has quit [Quit: Saindo...]
eddof13 has joined #ruby
jacksoow has joined #ruby
uplime has joined #ruby
eddof13 has quit [Ping timeout: 268 seconds]
Inline has joined #ruby
uplime has quit [Ping timeout: 245 seconds]
rikkipitt has joined #ruby
drale2k_ has joined #ruby
drale2k_ has quit [Client Quit]
drale2k_ has joined #ruby
venmx has quit [Ping timeout: 258 seconds]
status402 has quit [Quit: status402]
status402 has joined #ruby
drale2k_ has quit [Client Quit]
drale2k_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
drale2k_ has quit [Client Quit]
uplime has joined #ruby
rikkipitt has quit [Quit: Leaving...]
conta has quit [Ping timeout: 245 seconds]
profetes has quit [Quit: Leaving]
drale2k_ has joined #ruby
chouhoulis has joined #ruby
uplime has quit [Ping timeout: 245 seconds]
GodFather has joined #ruby
Rapture has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
duderonomy has joined #ruby
jenrzzz has joined #ruby
am0123 has joined #ruby
status402 has quit [Remote host closed the connection]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nicmavr has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 268 seconds]
Nicmavr has joined #ruby
donofrio has joined #ruby
cow[moo] has joined #ruby
uplime has joined #ruby
conta has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
drale2k_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
maufart__ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
pvalena has quit [Ping timeout: 250 seconds]
yebyen has joined #ruby
<yebyen> Hi #ruby
<phaul> hi yebyen
<yebyen> hi phaul
jenrzzz has quit [Ping timeout: 252 seconds]
<yebyen> I'm upgrading my stuff to 2.6 and I have a test that does: expect(BigDecimal).to receive(:new).with(any_args).at_least(:once).and_call_original
<yebyen> the test is called "uses BigDecimal" and it's only there to verify that nobody decided to replace the implementation with float or something less safe
<yebyen> and it doesn't work anymore because BigDecimal.new is deprecated, so we're calling BigDecimal like you're supposed to
<yebyen> BigDecimal("1.5") for example
venmx has joined #ruby
<yebyen> is there a way to capture that in rspec?
<yebyen> i understand that BigDecimal(_,_) is a global method I guess?
<yebyen> is that the same as calling it on Kernel? or instance of Kernel?
<phaul> it is.
<yebyen> ok, I'm on the right track then... so I tried:
<yebyen> expect_any_instance_of(Kernel).to receive(:BigDecimal).with(any_args).at_least(:once).and_call_original
<phaul> Kernel is a module though so it has no instances
<yebyen> and I got a stack too deep crash
<yebyen> I think expect_any_instance_of works on modules
<yebyen> (it seems to intercept the method call, I think "and_call_original" is what fails)
<yebyen> maybe i'd get better results if I don't try to use any_args
<yebyen> or and_call_original
<yebyen> just explicitly call BigDecimal(xyz) myself instead
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yebyen> i guess i could also just take this test out
<phaul> that's what I would do. I dont understand what this test proves...
drale2k_ has joined #ruby
<yebyen> it proves that i took your param passed in and actually sent it forward to the bigdecimal library
<yebyen> is there a good reason to make this deprecation? I really don't understand why it was done
<yebyen> i've never heard of a global function before
<yebyen> is there anything else that you call like BigDecimal(xyz)?
<phaul> I don't know of this global method distinction. its justa regular method on Kernel.
cthulchu_ has joined #ruby
<yebyen> not really, if it was just a regular method then i'd be able to find a "def" for it somewhere
<yebyen> i'm pretty sure this is where it's defined though, in some C code
<yebyen> i'm not a ruby kernel developer though so i could be completely wrong about that
<yebyen> i guess it's documented as a regular instance method
<phaul> you don't have to find def for it, if it's defined in the C core. and that global_function stuff is just MRI internal helper
<phaul> it is just a regular method
marmotini_ has quit [Ping timeout: 258 seconds]
<yebyen> ok
<yebyen> thanks!
jenrzzz has joined #ruby
<phaul> didn't really help you with that, though, I dont know what happens in RSpec that pushes it into recursion...
<yebyen> i'm sure it has something to do with the way it's defined
<yebyen> this is probably a bug in rspec
Inline has quit [Remote host closed the connection]
<yebyen> i've got 9 failing tests to fix and this is the easiest one of them, so
<yebyen> LGTM
<yebyen> i'll remove that line
Bish has quit [Remote host closed the connection]
davidw has joined #ruby
<phaul> https://github.com/ruby/ruby/blob/trunk/class.c#L1759 it just does module_function automatically in Kernel
<yebyen> wow cool, and I actually know what a module function is because i've been using them :D
<yebyen> that clarifies that for me
<phaul> I think this should be reproducible with any module. give me a sec, let's see if I can replicate this with a custom module...
<yebyen> so I really should be able to intercept Kernel.BigDecimal()
<yebyen> rather than "instance of kernel"
<yebyen> i think that's how testing module functions worked anyway
jenrzzz has quit [Ping timeout: 250 seconds]
<yebyen> if it's a module function, there is no instance it's called on
<yebyen> right
bauruine has quit [Read error: Connection reset by peer]
polishdub has joined #ruby
bauruine has joined #ruby
<yebyen> hmm
<yebyen> when did http error response bodies stop being nil and start being blank?
<yebyen> this one has bitten me before
sputnik13 has joined #ruby
am0123 has quit [Ping timeout: 258 seconds]
<yebyen> this is the restclient gem I think
<yebyen> probably between whatever version i upgraded from and whatever version I upgraded to, never mind...
am0123 has joined #ruby
davidw has quit [Ping timeout: 250 seconds]
<phaul> rspec is in some weird loop
<yebyen> awesome thanks for doing that!
d0liver has joined #ruby
Inline has joined #ruby
jenrzzz has joined #ruby
uplime60 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uplime has quit [Disconnected by services]
uplime60 is now known as uplime
am0123 has quit [Ping timeout: 246 seconds]
nchambers has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has joined #ruby
marmotini_ has joined #ruby
A-cat has joined #ruby
A-cat has left #ruby ["Leaving"]
<yebyen> phaul: should I report this to rspec? or are you already going to
tiff has joined #ruby
<phaul> It's up to you, I am not going to.
<yebyen> ok, i'll iterate on it for a day or so and see if i can find out more about what's going wrong before I bother anyone else with it
<yebyen> thanks for the gist
<phaul> the module_function line is not needed. simple instance_method reproduce the issue. The issue goes away if you remove the .and_call_original (as you said)
cthulchu has quit [Ping timeout: 260 seconds]
crankharder has joined #ruby
p1c0 has joined #ruby
davidw has joined #ruby
za1b1tsu has joined #ruby
<phaul> what it fundamentally doesn't seem to like is the any_instance_of(module) .. yebyen I updated the gist, the commented line works, the uncommented line hangs
<yebyen> aha well that makes sense because there is no instance
<yebyen> but it's not intercepting at all if you say expect(Module).to receive
<yebyen> or would you say that there is actually an instance of the kernel here wherever we're calling BigDecimal
Cybergeek has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
<phaul> there is. Object includes kernel, and wherever you are that self inherits Object. That self is the instance
<yebyen> hmm
<phaul> so where the BigDecimal() call is in your code that self is the receiver
orbyt_ has joined #ruby
jenrzzz has joined #ruby
drale2k_ has joined #ruby
<phaul> in fact this gives an idea. what happens if you say any_instance_of(Object) ?
<yebyen> that works
reber has quit [Remote host closed the connection]
r29v has joined #ruby
<yebyen> :thumbsup:
<phaul> cool :)
chouhoulis has joined #ruby
KeyJoo has quit [Quit: KeyJoo]
<yebyen> so what you have in the gist now works too
<yebyen> that makes more sense and i think it's how i've been using rspec to test module functions
<yebyen> (just pretend that it's an instance of the module)
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
\void has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
Dbugger has joined #ruby
BTRE has quit [Ping timeout: 246 seconds]
<phaul> I would argue that testing builtin in classes like Object is not what you want. You have an object/code under test, that has some class right? Why not make that a double, and expect the BigDecimal directly on that?
<phaul> a = MyClass.new; expect(a).to receive(:BigDecimal) ; a.calculate!
marmotini_ has quit [Ping timeout: 244 seconds]
<phaul> ah, I see, you said it, you want to test that is does not override BigDecimal() and the method lookup bubbles up all the way to Kernel.
<phaul> I would say that that is testing internal implementation detail, objects have the right to respond to methods whichever way they want, as sonlg as that response is good
chouhoulis has quit [Remote host closed the connection]
mikecmpb_ has quit [Quit: inabit. zz.]
<yebyen> if i said that, it's not what i meant
<yebyen> i just want to be sure that they're not deciding unilaterally that "bigdecimal is no longer needed"
<yebyen> if they're going to do that, they're on the hook to remove the test that asserts "we used bigdecimal because it's safe" too
SqREL has quit [Remote host closed the connection]
<yebyen> the expectation isn't on the object, the expectation is that we're calling a method BigDecimal
<yebyen> (on what) was the question
<yebyen> Object, not Kernel
<yebyen> good enough for me
<yebyen> *isn't on Object
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
clemens3 has quit [Quit: WeeChat 2.1]
orbyt_ has joined #ruby
cd has joined #ruby
* baweaver wanders in
jenrzzz has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
jinie has joined #ruby
conta2 has joined #ruby
cthulchu has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
conta2 has quit [Ping timeout: 245 seconds]
<WA9ACE> 👋
<WA9ACE> seeing your name reminds me I haven't checked ruby.social in a while
BTRE has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
conta has quit [Quit: conta]
am0123 has joined #ruby
d0liver has quit [Ping timeout: 246 seconds]
tdy has quit [Ping timeout: 246 seconds]
lytol_ has joined #ruby
lytol_ has quit [Remote host closed the connection]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
marmotini_ has joined #ruby
chouhoulis has joined #ruby
<phaul> archlinux finally upgraded to 2.6 !
sanscoeur has joined #ruby
<phaul> ?hammertime
<phaul> ah, ruby[bot] is on vacation
<up|ime> half a month ain't too bad, especially during vacaiton time :P
jenrzzz has quit [Ping timeout: 246 seconds]
tdy has joined #ruby
eddof13 has joined #ruby
jenrzzz has joined #ruby
jinie has quit [Ping timeout: 258 seconds]
<mozzarella> You know, I wish 3 / 2 returned a float, just like it does in python. Rounding division is almost never what I want, and I end up with .to_f all over my code.
<al2o3-cr> use fdiv
catbusters has quit [Quit: Connection closed for inactivity]
<mozzarella> I shouldn't have to
<al2o3-cr> then what would use for integer division // ?
<phaul> another thing is that maybe you need rational, floats are work of evil
<mozzarella> al2o3-cr: // or .div (though rdiv would be a better name)
jenrzzz has quit [Ping timeout: 272 seconds]
tdy has quit [Ping timeout: 246 seconds]
<phaul> there is a lot of things unsafe on floats that catches ppl offguard
<mozzarella> such as what?
sauvin has quit [Read error: Connection reset by peer]
<phaul> ruboto fact ?float: Your numbers don't add up? You get "weird" results? read http://floating-point-gui.de/
<mspo> don't you probably want to use .to_r ?
jenrzzz has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nchambers is now known as also_uplime
catbusters has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
venmx has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
chouhoulis has joined #ruby
eddof13 has quit [Quit: eddof13]
jenrzzz has quit [Ping timeout: 272 seconds]
chouhoulis has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
eddof13 has joined #ruby
salasrod has quit [Quit: /quit]
salasrod has joined #ruby
Azure has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
Azure has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
conta has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
ziyadb has joined #ruby
PasNox has quit [Remote host closed the connection]
gix has joined #ruby
PasNox has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
BTRE has quit [Remote host closed the connection]
conta has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
eddof13 has quit [Quit: eddof13]
SqREL has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
am0123 has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
conta has quit [Ping timeout: 258 seconds]
SqREL has quit [Ping timeout: 258 seconds]
marmotini_ has quit [Ping timeout: 250 seconds]
marmotini_ has joined #ruby
eddof13 has joined #ruby
hutch has quit [Ping timeout: 258 seconds]
profetes has joined #ruby
marmotini_ has quit [Ping timeout: 258 seconds]
SqREL has joined #ruby
marmotini_ has joined #ruby
PasNox has quit [Remote host closed the connection]
PasNox has joined #ruby
hutch has joined #ruby
dviola has joined #ruby
SqREL has quit [Ping timeout: 258 seconds]
marmotini_ has quit [Ping timeout: 250 seconds]
gix has quit [Disconnected by services]
lucasb has quit [Quit: Connection closed for inactivity]
SeepingN has joined #ruby
ur5us has joined #ruby
orbyt_ has joined #ruby
<ta_> I'm playing around with Object#define_singleton_method... is it possible to let the defined method handle blocks?
yokel has quit [Remote host closed the connection]
saysjonathan has joined #ruby
catbusters has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 245 seconds]
<lupine> weird, I'd expect that to work
<phaul> block_given? might be the thing. it only makes sense to me inside a def
<lupine> this works: define_singleton_method(:foo, method(:foo))
<phaul> &>>block_given?
<rubydoc> # => false (https://carc.in/#/r/5z2v)
<lupine> where `method(:foo)` gets a reference to a method created with `def`
<lupine> If I use a block rather than pass a method, then `yield`fails with `LocalJumpError`, which is really unexpected
<ta_> lupine: like `def o.bar; ... ; end` ?
<lupine> &>> def foo; yield ; end ; a = Object.new ; a.define_singleton_method(:foo, method(:foo)) ; a.foo { puts 'ok' ; 'ok' }
<rubydoc> # => ok ...check link for more (https://carc.in/#/r/5z2w)
<lupine> &>> a = Object.new ; a.define_singleton_method(:foo) { yield } ; a.foo { puts 'ok' ; 'ok' }
<rubydoc> # => no block given (yield) (LocalJumpError) (https://carc.in/#/r/5z2x)
<lupine> thanks ruby, very wise
<phaul> well, yeild and block_given? are keywords to work in def..
<phaul> it would be better if it was syntax error imho
<phaul> &>> super
<rubydoc> # => super called outside of method (NoMethodError) (https://carc.in/#/r/5z2y)
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul> same
cow[moo] has joined #ruby
<phaul> this reminds me of this https://gist.github.com/phaul/1d36018bf925bd212c64671a5ca20217#file-sudoku-rb-L223, innteresting that that works
<al2o3-cr> &>> def ping; define_singleton_method(:pong) { yield } end; ping { "ping" }; pong { "pong" }
<rubydoc> # => "ping" (https://carc.in/#/r/5z33)
mikecmpbll has joined #ruby
Dbugger has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Leopere has quit [Quit: The Lounge - https://thelounge.github.io]
orbyt_ has joined #ruby
jenrzzz has joined #ruby
comet23 has joined #ruby
fcambus has joined #ruby
SqREL has joined #ruby
<comet23> why are there aliased methods in ruby?
saysjonathan has quit [Ping timeout: 240 seconds]
SqREL has quit [Ping timeout: 268 seconds]
saysjonathan has joined #ruby
saysjonathan has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
saysjonathan has joined #ruby
ddffg has joined #ruby
<ddffg> hi people, i have one challenge, i need send about 10M from rails, what tools couls you recommend?
<ddffg> send 10M emails with ruby
<ddffg> what is fastest way to do that
<mspo> do whatever you do to send 1
<mspo> parallelize it
<bougyman> ddffg: I'd use a work queue for that.
<bougyman> so all rails does is put them on that work queue (beanstalk is nice for this)
<bougyman> then as many workers you want can work that queue to send the mail
sticaz has joined #ruby
ruby[bot] has joined #ruby
<phaul> ?botsnack
* phaul kicks rubybot hard in the back for not playing along
hiroaki has joined #ruby
<elomatreb> be nice to the bot :(
davidw has quit [Ping timeout: 272 seconds]
chouhoulis has joined #ruby
saysjonathan has quit [Ping timeout: 258 seconds]
orbyt_ has joined #ruby
also_uplime has quit [Ping timeout: 268 seconds]
ur5us has quit [Remote host closed the connection]
olspookishmagus has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
olspookishmagus has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
sticaz has quit [Quit: sticaz]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
hutch has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
not_finger_guns has joined #ruby
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
saysjonathan has joined #ruby
dviola has quit [Quit: WeeChat 2.3]
not_finger_guns has quit [Quit: WeeChat 2.3]
reber has quit [Remote host closed the connection]
polishdub has quit [Quit: leaving]
SqREL has joined #ruby
SqREL has quit [Ping timeout: 258 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
connermcd has joined #ruby
discopatrick has joined #ruby
cd has quit [Quit: cd]
EduardoBautista has joined #ruby
davidw has joined #ruby
connermcd has quit [Quit: WeeChat 2.3]
orbyt_ has joined #ruby
ddffg has quit [Remote host closed the connection]
hutch has joined #ruby
eddof13 has quit [Quit: eddof13]
EduardoBautista has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 258 seconds]
EduardoBautista has joined #ruby
EduardoBautista has quit [Client Quit]
hiroaki has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
EduardoBautista has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ziyadb has quit [Quit: Connection closed for inactivity]
eddof13 has joined #ruby
davidw has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
EduardoBautista has quit [Quit: Textual IRC Client: www.textualapp.com]
BTRE has joined #ruby
Rich_Morin_ has joined #ruby
davidw has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<comet23> how can i use ruby to create a dns that will create a massive ddos across the entire class b range?
<Rich_Morin_> Actually, Elixir is better suited for that task...
saysjonathan has quit [Ping timeout: 246 seconds]
<comet23> sounds like snake oil
orbyt_ has joined #ruby
<Rich_Morin_> https://blog.discordapp.com/scaling-elixir-f9b8e1e7c29b - "we are up to nearly five million concurrent users and millions of events per second flowing through the system"
DarthGandalf has quit [Ping timeout: 268 seconds]
<phaul> never tried such things, but its so hard for me to beleive that you are going to be CPU limited
<Rich_Morin_> Ruby is a lovely language, but concurrency is not one of its strong suits.
<baweaver> It's not, but for that type of task it's irrelevant
<baweaver> It's also likely against the channel's rules to discuss how that might work.
<Rich_Morin_> On another note, I haven't been able to find a way to use regexen on text strings which contain arbitrary byte values. I've got some text that is mostly ASCII, but has some wonky 8-bit characters I'd like to discard. When I try to do this with gsub, it complains massively.