jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
ivanf has quit [Ping timeout: 256 seconds]
o|||||o has joined #ruby
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
o|||||o has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
o|||||o has joined #ruby
nirvdrum_ has joined #ruby
nirvdrum has quit [Ping timeout: 272 seconds]
libsys has quit [Ping timeout: 256 seconds]
jpn has quit [Ping timeout: 272 seconds]
libsys has joined #ruby
nirvdrum_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rounin has quit [Ping timeout: 250 seconds]
jpn has joined #ruby
nirvdrum has joined #ruby
favadi has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
o|||||o has quit [Ping timeout: 240 seconds]
reset has joined #ruby
hanzo has joined #ruby
jpn has quit [Ping timeout: 272 seconds]
justache has quit [Remote host closed the connection]
justache has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
codedchaos has joined #ruby
nort has left #ruby [I Quit!]
oxfuxxx has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
oxfuxxx has joined #ruby
jpn has quit [Ping timeout: 256 seconds]
oxfuxxx has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 246 seconds]
rawley has joined #ruby
nirvdrum has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rawley has quit [Remote host closed the connection]
yossarian has quit [Ping timeout: 272 seconds]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
jpn has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
victori has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
u0_a147 has joined #ruby
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
yossarian has joined #ruby
yossarian has joined #ruby
yossarian has quit [Changing host]
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
u0_a147 has quit [Client Quit]
_ht has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
comet23 has joined #ruby
<comet23> i'm having a problem with my ruby code
Thanzex has joined #ruby
<comet23> the test case is failing and it's saying  expected no Exception, got #<NoMethodError: undefined method `<=' for nil:NilClass
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
<leftylink> what are the values that idx takes on in the block. for a particular velue of idx, what is arr[idx].
Thanzex has quit [Remote host closed the connection]
<leftylink> you know those are the questions to ask because ther eis only line where <= appears in the code.
<comet23> i figured it out
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
<comet23> so basically i included an index that was out of range and that turns into nil so you can't use the comparison operator with nil values
<comet23> the error was on line 4
Thanzex has joined #ruby
<leftylink> it doesn't really even make sense to use the indices there either. might as well just `each` on the array
Thanzex has quit [Remote host closed the connection]
favadi has joined #ruby
<comet23> i should have used (0...arr.length) with 3 dots instead of 2
Thanzex has joined #ruby
<comet23> wait i can do that
<comet23> wow that's a gamechanger
Thanzex has quit [Remote host closed the connection]
<comet23> WOW
<comet23> my mind is blown right now thank you so much :)
<comet23> how does this look now leftylink https://bpa.st/FBUA
u0_a147 has joined #ruby
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
swaggboi has quit [Ping timeout: 272 seconds]
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
u0_a147 has quit [Client Quit]
u0_a147 has joined #ruby
u0_a147 has quit [Client Quit]
swaggboi has joined #ruby
gcd has quit [Ping timeout: 272 seconds]
gcd has joined #ruby
_ht has quit [Remote host closed the connection]
yossarian has quit [Ping timeout: 248 seconds]
yossarian has joined #ruby
yossarian has quit [Changing host]
yossarian has joined #ruby
favadi has joined #ruby
jpn has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
jpn has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
dionysus69 has joined #ruby
Vonter has quit [Quit: WeeChat 3.5]
<comet23> why am i getting a name error?  Traceback (most recent call last):
<comet23>     1: from main.rb:14:in `<main>'
<comet23> main.rb:2:in `power_of_two?': undefined local variable or method `current_num' for main:Object (NameError) https://bpa.st/ZWSQ
unyu has quit [Quit: WeeChat 3.5]
mbarbar has quit [*.net *.split]
dionysus69 has quit [Ping timeout: 246 seconds]
whysthatso12507 has quit [Quit: Ping timeout (120 seconds)]
whysthatso12507 has joined #ruby
entropie has quit [Quit: ""]
aindilis_ has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
entropie has joined #ruby
___nick___ has joined #ruby
aindilis has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
jpn has joined #ruby
comet23 has quit [Quit: Client closed]
jpn has quit [Ping timeout: 246 seconds]
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
dionysus69 has joined #ruby
Vonter has joined #ruby
factor8 has joined #ruby
jmcgnh has quit [Ping timeout: 272 seconds]
jmcgnh has joined #ruby
Roy_Mustang has joined #ruby
A_Dragon has quit [Killed (NickServ (GHOST command used by Roy_Mustang))]
Roy_Mustang is now known as A_Dragon
roadie has quit [Ping timeout: 248 seconds]
moo- has joined #ruby
factor has quit [Ping timeout: 256 seconds]
factor8 is now known as factor
moo has quit [Remote host closed the connection]
ur5us has joined #ruby
jpn has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
roadie has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
sylario has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
favadi has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
o|||||o has joined #ruby
Rounin has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
favadi has joined #ruby
favadi has quit [Client Quit]
moldorcoder7 has quit [Ping timeout: 248 seconds]
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
TCZ has joined #ruby
markong has joined #ruby
favadi has joined #ruby
TCZ has quit [Quit: Tcl has many different data types, not just strings.]
Milos_ has quit [Ping timeout: 252 seconds]
Milos has joined #ruby
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
<John_Ivan_> what is the general approach to ruby's error checking?
<John_Ivan_> exceptions with try/catch?
<John_Ivan_> or is it a mixture alongside return values?
<John_Ivan_> and if that's the case, is there any point in doing "if object == nil" ?
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 240 seconds]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Remote host closed the connection]
Thanzex has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
<adam12> John_Ivan_: I'd use exceptions for anything exceptional. Because you don't have to rely on the caller to check the return value.
<adam12> There's nothing wrong with using the return value tho, but in that case it might not be an error but more so control flow.
<John_Ivan_> adam12, that's satisfactory. also, would you use a try/catch for every single object method or would you wrap multiple calls from multiple objects under a single try-catch?
Sheilong has joined #ruby
<adam12> John_Ivan_: Every situation would probably be different for me. I might rescue at the block level, or wrap a single method call in a begin/rescue.
<John_Ivan_> adam12, fair enough :) - thank you.
<adam12> Ideally, I want to limit the blast radius unless it's a specific exception. Because error handling for ArgumentError is going to be different than IOError.
<John_Ivan_> makes sense.
jpn has joined #ruby
ruby-eval has quit [Ping timeout: 240 seconds]
markong has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
jongsta has joined #ruby
<jongsta> does anyone know which domains rvm uses to install the various versions of ruby?
<jongsta> ie, if i need to whitelist those domains on a firewall
some14u has joined #ruby
<adam12> jongsta: I thought it downloaded from rvm.io/binaries
some14u has quit [Client Quit]
<adam12> jongsta: It might download from cache.ruby-lang.org for sources.
<jongsta> yah, i need to figure out exactly where
some14u has joined #ruby
<jongsta> is there not a config file that tells rvm where to pull them from like a sources list file for ubuntu?
<jongsta> thanks adam12 i'll take a look
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gr33n7007h has quit [Ping timeout: 260 seconds]
gr33n7007h has joined #ruby
some14u has joined #ruby
oxfuxxx has joined #ruby
gr33n7007h has quit [Ping timeout: 250 seconds]
rawley has joined #ruby
<jongsta> anyone know why rvm isn't available as an apt package?
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
favadi has quit [Ping timeout: 260 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
q3lont has joined #ruby
gr33n7007h has joined #ruby
crankharder has joined #ruby
<crankharder> wondering if anyone has successfully built ruby --with-jemalloc on OSX Monterey? ruby's configure seems unable to find jemalloc.h and fails. bit more details here: https://stackoverflow.com/questions/71874447/ruby-with-jemalloc-wont-configure-homebrew-osx-montery-m1-arm
DenKn has quit [Quit: You have been kicked for being idle]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
<adam12> crankharder: Which version of Ruby are you trying to compile? I might try locally here but would rather reproduce what you're doing exactly.
<crankharder> 3.0.4
<adam12> crankharder: I noticed that jemalloc is namespaced inside include/. What happens if you modify your include to use that folder directly?
<crankharder> same error
<adam12> $(brew --prefix jemalloc)/include/jemalloc
<adam12> Gotcha.
<crankharder> also "checking jemalloc/jemalloc.h presence... no"
<crankharder> it's looking in that subfolder - or so it would seem
<adam12> Ahh. OK
victori has joined #ruby
<crankharder> it's not clear to me if ruby's configure respects "--with-jemalloc-include" though
<adam12> I feel like something was related to this on the bug tracker.
<crankharder> it's not in the output of ./configure --help
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
<crankharder> this no dice either: ./configure --with-jemalloc --libdir=/opt/homebrew/lib --includedir=/opt/homebrew/include
___nick___ has quit [Client Quit]
<crankharder> "checking for jemalloc/jemalloc.h... no' ---> even though: /opt/homebrew/include/jemalloc/jemalloc.h
___nick___ has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
<adam12> Yeah, interesting. I'm not sure.
<adam12> crankharder: ./configure --with-jemalloc --with-opt-dir=$(brew --prefix jemalloc)
<adam12> bbiaf. lunch
Sheilong has quit [Quit: Connection closed for inactivity]
crankharder has quit [Ping timeout: 240 seconds]
crankharder has joined #ruby
Sheilong has joined #ruby
rawley has quit [Ping timeout: 246 seconds]
crankharder has quit [Ping timeout: 250 seconds]
orbyt has joined #ruby
crankharder has joined #ruby
ZorgonPeterson has joined #ruby
ZorgonPeterson has quit [Quit: WeeChat 3.5]
_ht has joined #ruby
rhe7 has joined #ruby
fowl6 has joined #ruby
jhawthorn_ has joined #ruby
Roy_Mustang has joined #ruby
A_Dragon has quit [Killed (sodium.libera.chat (Nickname regained by services))]
Roy_Mustang is now known as A_Dragon
ferr_ has joined #ruby
duds-_ has joined #ruby
KOTP has joined #ruby
axisys_ has joined #ruby
_ht_ has joined #ruby
jimeh_ has joined #ruby
Henry151_ has joined #ruby
<crankharder> adam12: aha - nice find. seems to work for me. though, seems odd to pass a specific jemalloc dir to a seemingly generic option like that.
<adam12> crankharder: Indeed, tho I think it's fine.
<adam12> You can pass multiple, so it serves the correct purpose IMHO. Strange that there's no --with-jemalloc-dir or similar.
<adam12> But I won't argue with the maintainer of the autoconf file. They have enough to deal with just dealing with autoconf :P
<adam12> Just looking at configure.ac triggered me.
<crankharder> the internet is chock full of references to --with-jemalloc-dir/include/lib/etc
<crankharder> which is obviously truth
_ht has quit [*.net *.split]
orbyt has quit [*.net *.split]
gr33n7007h has quit [*.net *.split]
oxfuxxx has quit [*.net *.split]
Vonter has quit [*.net *.split]
axisys has quit [*.net *.split]
Henry151 has quit [*.net *.split]
jimeh has quit [*.net *.split]
kaivai has quit [*.net *.split]
sam113101 has quit [*.net *.split]
fercell has quit [*.net *.split]
duds- has quit [*.net *.split]
PedroG1 has quit [*.net *.split]
jhawthorn has quit [*.net *.split]
fowl has quit [*.net *.split]
jidar has quit [*.net *.split]
finsternis has quit [*.net *.split]
rhe has quit [*.net *.split]
IsoLinCHiP has quit [*.net *.split]
duds-_ is now known as duds-
rhe7 is now known as rhe
fowl6 is now known as fowl
jimeh_ is now known as jimeh
mbarbar has joined #ruby
<crankharder> interesting. just tried on intel chip and that command does not work. ends up w/ the same error
Vonter has joined #ruby
oxfuxxx has joined #ruby
orbyt has joined #ruby
kaivai has joined #ruby
sam113101 has joined #ruby
gr33n7007h has joined #ruby
PedroG1 has joined #ruby
IsoLinCHiP has joined #ruby
finsternis has joined #ruby
jidar has joined #ruby
finsternis has quit [Max SendQ exceeded]
finsternis has joined #ruby
oxfuxxx has quit [Ping timeout: 246 seconds]
moldorcoder7 has joined #ruby
comet23 has joined #ruby
ule has quit [Ping timeout: 256 seconds]
<comet23> how do i check if a particular substring is at the end?
ule has joined #ruby
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
<crankharder> str[-(sub.length + 1) .. -1] == sub - or somethin like that might be simpler
orbyt has joined #ruby
<comet23> but what if i have a vowel in the middle of the string and then it ends in that same vowel
<comet23> like abracadabra
<crankharder> the above doesn't care what's in the middle
impermanence has joined #ruby
oxfuxxx has joined #ruby
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12> comet23: Are you trying to recreate something like end_with?
<adam12> :: "foo".end_with?("o")
<adam12> I'm not really following.
<adam12> >> true
<comet23> basically i'm trying to create something that slices from start to finish but not all strings are working
<adam12> We need a better eval bot.
<adam12> comet23: imho, require "minitest/autorun", then define a test class in that file with some asserts. It's easier to follow if you're sharing.
<comet23> like jump => j ju jum jump u um ump m mp p
<adam12> Oh I see. Some sort of permutation calculation.
<comet23> yeah put that in an array i just want to know how i can tell i'm at the very last character
<comet23> let's say abracadabra as a string input for example my code will slice it incorrectly
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
<comet23> okay i figured it out i knew where the mistake was but i have no idea how my code works just something inside my brain told me to do it this way
sgt_chuckles has joined #ruby
sgt_chuckles has quit [Remote host closed the connection]
sgt_chuckles has joined #ruby
<sgt_chuckles> im trying to write an rspec where code is duplicated in the `it` blocks. So I made the duplicate code into a function that takes a parameter, so the it blocks can call it. Im wondering if I can do this using `before` or `let`
<adam12> sgt_chuckles: Maybe not if it accepts a parameter. But share code if you can and we can look.
<comet23> i ended up doing this: while end_idx <= str.slice(curr_idx, end_idx).length
<comet23> it would be nice if someone could explain how this works... i have no idea why but my intuition told me to do it this way and i tried it and it worked
<comet23> i hate magic =(
<adam12> comet23: Can I share my example?
<comet23> sure
<adam12> I don't have time to fiddle with it any more. But I don't want to ruin homework or anything.
<sgt_chuckles> adam12: That's why I resorted to using a function for this, but im told it's not the best approach
<comet23> well it's sort of homework i'm doing a free online course... not getting graded or anything this is strictly for my knowledge
moo- is now known as moo
<comet23> your solution is a lot better than mine
<adam12> sgt_chuckles: I'd drop the method and always have the body of the method in the tests, IMHO. This doesn't necessarily answer your question.
<leah2> idk
dionysus69 has quit [Ping timeout: 272 seconds]
<leah2> i'd write it as 0.upto(s.size) { |a| (a+1).upto(s.size) { |b| yield s[a..b] } }
<leah2> does that work? :3
<adam12> sgt_chuckles: If you've heard of DRY for code, then you should look up DAMP for tests. Basically, some verbosity in tests are a good thing.
<sgt_chuckles> is that another testing framework?
<sgt_chuckles> kind of stuck with rspec atm
<adam12> sgt_chuckles: No. It's just a test strategy.
<comet23> how did you figure that out with the fancy slices and syntax adam12
<comet23> your code is really incredible
<adam12> comet23: Years of writing Ruby professionally, I guess.
<adam12> It's a fun challenge; probably why it caught my attention.
<comet23> how unprofessional is my solution?
roadie has quit [Ping timeout: 248 seconds]
<adam12> comet23: It's not unprofessional. But Ruby has a lot of shortcuts that I'd say a lot of other languages don't have.
<adam12> Just knowing when to use them is key. See leah2's example for even more code golf.
impermanence has quit [Quit: Connection closed]
<leah2> that's not golf, that's fortran thinking :p
<comet23> i missed his example because i was busy working on mine i'm scrolling up!
<leah2> but it should work nicely with string sharing
<sgt_chuckles> adam12: gee, thanks!
<adam12> sgt_chuckles: For your example, I'm just saying to duplicate the method body in your tests. There's less indirection.
<adam12> sgt_chuckles: Again, it doesn't answer your question, but rspec is notorious for indirection, which is horrible for tests.
<comet23> what's indirection?
<sgt_chuckles> yeah, im realizing how much i miss pytest :p
<adam12> sgt_chuckles: Technically you could extract `active` to a let, then setup a `before` block, and then have a bunch of `describe` blocks that set `active`.
<comet23> the course i'm taking now uses rspec exclusively
<adam12> sgt_chuckles: The rspec book is good, if you're spending any time with it. It's from the author of RSpec.
<sgt_chuckles> i'll check it out
<adam12> I find rspec has a lot of nice stuff, but too much indirection when people write it. You can be 6 levels deep looking for a `let`.
emcb54 has joined #ruby
<leah2> yeah
<leah2> embrace simplicity, use bacon :p
<adam12> I miss bacon
<adam12> I only write minitest anymore.
<leah2> it's close :p
<adam12> but it's not perfect either.
<adam12> bacon had a test runner I think? I do enjoy that from rspec.
<adam12> I use minitest-sprint, but it's just another gem I need to have handy.
<leah2> it just runs all tests always no?
<comet23> why did it get abandoned?
<leah2> it's not abandoned, it's finished :p
<adam12> leah2: It has a good path matcher. so you could `minitest test -test/slow.rb` or something.
<comet23> how is it finished? i thought nothing ever is finished
<adam12> leah2: But by default, it runs all files in `test`.
<adam12> or spec too, I think.
<adam12> It also supports running tests by name, showing test failures and how to re-run them, and passing a seed nicely.
<leah2> mhm
<adam12> Ahh. bacon supports TAP
<leah2> yes
<adam12> There was a new test framework out just recently that tried separating tests from running tests.
<adam12> I wonder if that has any merit.
<adam12> I feel like TAP was in that direction.
<leah2> i use tap for all my shell scripts testing C programs to
<adam12> I haven't used tap in a million years.
roadie has joined #ruby
<adam12> comet23: I annotated my gist with some comments. And removed the dup and slice! calls, since originally I wanted to slice! but I was actually re-assigning and not paying attention.
<comet23> i love line 11
<adam12> sgt_chuckles: If you just moved the `result` to a `let`, that might be OK. I'd keep the `expect` in the test body.
crankharder has quit [Ping timeout: 250 seconds]
<comet23> i love all of it but wow i'm just amazed :D
<comet23> i'm saving this
<comet23> thank you so much
jpn has joined #ruby
fritzgrabo has joined #ruby
<comet23> is it normal to intuitively write code you don't understand?
dionysus69 has joined #ruby
<adam12> Sometimes you can get a happy accident, for sure.
<adam12> Especially if it includes manual loops where you might be doing your own math.
<comet23> i'm really bad at math
<sgt_chuckles> adam12: i'll look into this, thanks
<comet23> i failed algebra
fritzgrabo has left #ruby [ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)]
<adam12> 4.times vs for(i = 0; i <= 4; i++)
cahoots has joined #ruby
<cahoots> hi, what's the easiest way to install gems for a github action run on a macos?
hololeap_ has joined #ruby
rawley has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
crankharder has joined #ruby
q3lont has quit [Ping timeout: 260 seconds]
hololeap_ is now known as hololeap
crankharder has quit [Ping timeout: 256 seconds]
Sheilong has quit [Quit: Connection closed for inactivity]
<sgt_chuckles> adam12: this is a much better approach i was aiming for. The results of the tests are more explicit this way
<sgt_chuckles> i really should take the time to learn rspec correctly
<adam12> sgt_chuckles: Definitely check out the book then! I read it a few years ago and it's good.
<adam12> Even tho I don't use rspec anymore.
<adam12> It will cover shared examples and the other goodies.
impermanence has joined #ruby
cahoots has quit [Quit: leaving]
jpn has quit [Quit: Lost terminal]
crankharder has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
some14u has joined #ruby
jpn has joined #ruby
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 272 seconds]
some14u- has joined #ruby
some14u has quit [Ping timeout: 248 seconds]
some14u has joined #ruby
jpn has quit [Client Quit]
jpn has joined #ruby
___nick___ has quit [Ping timeout: 240 seconds]
some14u- has quit [Ping timeout: 248 seconds]
_ht_ has quit [Remote host closed the connection]
some14u- has joined #ruby
some14u has quit [Ping timeout: 248 seconds]
hellstabber has joined #ruby
crankharder has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
some14u- has quit [Ping timeout: 240 seconds]
some14u has joined #ruby
comet23 has quit [Quit: Client closed]
hololeap_ has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
some14u- has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
some14u has quit [Ping timeout: 248 seconds]
hellstabber has quit [Quit: Textual IRC Client: www.textualapp.com]
hololeap_ is now known as hololeap
some14u- has quit [Ping timeout: 248 seconds]
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
hellstabber has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
hololeap has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
<sgt_chuckles> im trying to use this regex to verify a timestamp in a hash value: \d{10,}
<sgt_chuckles> but my rspec fails, am i entering it wrong?
<sgt_chuckles> im using the prescribed: // to surround the pattern
work has joined #ruby
ur5us has joined #ruby
jpn has joined #ruby
some14u has joined #ruby
rawley has quit [Remote host closed the connection]
roadie has quit [Remote host closed the connection]
jpn has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
Pixi has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 248 seconds]
roadie has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollysmith has quit [Ping timeout: 256 seconds]
<havenwood> sgt_chuckles: Share the code for the spec in question?
<havenwood> sgt_chuckles: `/\d{10,}/` is [0-9] consecutively, 10 or more times.
Pixi has joined #ruby
cout_ is now known as cout
jpn has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 240 seconds]
some14u has joined #ruby
o|||||o has quit [Ping timeout: 272 seconds]
jpn has joined #ruby
ule has joined #ruby
ule has quit [Changing host]
Guest4 has joined #ruby
<sgt_chuckles> havenwood: https://bpa.st/KEYQ
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest4 has quit [Client Quit]
roadie has joined #ruby
<havenwood> sgt_chuckles: I don't think #hash_including compares keys the way you expect. Sec, lemme check the rspec mocks code.
crankharder has joined #ruby
<sgt_chuckles> i want to verify the values in a fuzzy manner
<havenwood> sgt_chuckles: Yeah, RSpec Mock specs don't show matching fuzzily, just exact matches, not ===.
dionysus69 has quit [Ping timeout: 260 seconds]
<havenwood> sgt_chuckles: I follow your intention but think you'll have to iterate through to #match? if you want that behavior, since #hash_including doesn't seem to from waht I'm seeing.
some14u has joined #ruby
crankharder has quit [Ping timeout: 260 seconds]
<sgt_chuckles> havenwood: can you cite an example, or docs for this?
roadie has quit [Ping timeout: 248 seconds]
roadie has joined #ruby
ollysmith has joined #ruby
shokohsc has quit [Read error: Connection reset by peer]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has quit [Ping timeout: 248 seconds]
shokohsc has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
jpn has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
<havenwood> sgt_chuckles: Actually, I take it back. I was looking at the wrong code in a multitasking fail.
<havenwood> sgt_chuckles: I'm a Minitest user so someone else here might be a more trustworthy advisor on this one. :P
<havenwood> Looks like it uses #all? passing the pattern, so it'd be #=== matched.
<havenwood> sgt_chuckles: Sorry for the misdirection but that ^ example in the specs works.
TCZ has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
hellstabber has quit [Quit: Textual IRC Client: www.textualapp.com]
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
TCZ is now known as proportions
r3m has quit [Quit: WeeChat 3.6-dev]
o|||||o has joined #ruby
agrosant has quit [Ping timeout: 272 seconds]
sgt_chuckles has quit [Quit: Client closed]
roadie has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
roadie has quit [Ping timeout: 248 seconds]
agrosant has joined #ruby