<havenwood>
Exuma: There's ^ an example of it working. Show an example of it not working?
<havenwood>
Exuma: Or you mean it's not breaking twice?
<havenwood>
Exuma: Do you have an each nested within a loop?
<Exuma>
havenwood ............. what in the.............
<Exuma>
hold on WTF
<Exuma>
i dunno, ... i am gonna just shut my laptop
<havenwood>
Exuma: It can be confusing where the point of return is with nested loops.
<Exuma>
i think what happened is i had multple function calls in my example which perfectly matched the number of loops, so it was actually breaking but it appeared it was looping 5 times
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 272 seconds]
noobineer has joined #ruby
duderonomy has joined #ruby
fphilipe_ has joined #ruby
noobineer has quit [Remote host closed the connection]
dellavg has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
JoeA2552 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r3m is now known as Pascal
Pascal is now known as r3m
r3m has quit [Quit: WeeChat 2.6-dev]
tdy has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dellavg has quit [Ping timeout: 268 seconds]
mb^ has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has quit [Ping timeout: 244 seconds]
Norrin has quit [Ping timeout: 258 seconds]
fphilipe_ has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
tdy has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
ur5us has quit [Ping timeout: 268 seconds]
tdy has joined #ruby
Inline has quit [Quit: Leaving]
tdy has quit [Ping timeout: 258 seconds]
Norrin has joined #ruby
tdy has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
ferhaty has joined #ruby
s2013 has joined #ruby
gix- has quit [Ping timeout: 268 seconds]
absolutejam2 has joined #ruby
tdy has joined #ruby
podlech has quit [Quit: WeeChat 2.5-dev]
fphilipe_ has quit [Ping timeout: 245 seconds]
fphilipe_ has joined #ruby
schne1der has joined #ruby
chalkmonster has joined #ruby
absolutejam3 has joined #ruby
absolutejam2 has quit [Ping timeout: 246 seconds]
absolutejam3 has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
DTZUZO has quit [Ping timeout: 248 seconds]
schne1der has quit [Ping timeout: 245 seconds]
vondruch has quit [Quit: vondruch]
aupadhye has joined #ruby
deepreds1 has quit [Ping timeout: 272 seconds]
andikr has joined #ruby
jmcgnh has quit [Ping timeout: 248 seconds]
sylario has joined #ruby
jefffrails35 has joined #ruby
jefffrails35 has quit [Client Quit]
jmcgnh_ has joined #ruby
jmcgnh_ is now known as jmcgnh
schne1der has joined #ruby
soniya29 has joined #ruby
vondruch has joined #ruby
conta has joined #ruby
deepreds1 has joined #ruby
absolutejam3 has joined #ruby
galaxie has quit [Ping timeout: 260 seconds]
galaxie has joined #ruby
soniya29 has quit [Ping timeout: 272 seconds]
andikr has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
conta has quit [Ping timeout: 245 seconds]
absolutejam4 has joined #ruby
absolutejam3 has quit [Ping timeout: 272 seconds]
deepreds1 has quit [Ping timeout: 244 seconds]
TomyWork has joined #ruby
deepreds1 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
absolutejam4 has quit [Ping timeout: 244 seconds]
andikr has quit [Quit: No Ping reply in 180 seconds.]
ur5us has joined #ruby
gregf_ has joined #ruby
andikr has joined #ruby
conta has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
absolutejam4 has joined #ruby
exmortus has quit [Remote host closed the connection]
exmortus has joined #ruby
TomyWork has quit [Remote host closed the connection]
absolutejam4 has quit [Ping timeout: 245 seconds]
esrse has quit [Ping timeout: 245 seconds]
TomyWork has joined #ruby
bitwinery has quit [Quit: Leaving]
deepreds1 has quit [Ping timeout: 258 seconds]
soniya29 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ryouba has left #ruby ["WeeChat 2.3"]
gregf_ has quit [Remote host closed the connection]
DTZUZO has joined #ruby
Obats has joined #ruby
<Obats>
Hi guys. Is it possible to see which file that ruby loads the config from? Is it called environment.rb?
<Obats>
..either from within the code or from command line. Hopefully they're the same in my case..
<Obats>
Encoding.default_internal seems to be empty, I'm trying to track it down to see where this comes from
Nicmavr has quit [Read error: Connection reset by peer]
<Obats>
Reading the web I thought default encoding for Ruby 2.0 would be UTF-8. So perhaps there's something in environment.rb that changes it in my case?
Nicmavr has joined #ruby
ferhaty has quit [Quit: ferhaty]
deepreds1 has joined #ruby
<Obats>
Is Encoding.default_internal=Encoding::UTF_8 forbidden in the code?
queip has quit [Ping timeout: 258 seconds]
deepreds1 has quit [Ping timeout: 248 seconds]
queip has joined #ruby
chalkmonster has joined #ruby
<Obats>
Strange thing is I have '# encoding: UTF-8' at the top of the file, right before checking Encoding.default_internal. But still Encoding.default_internal is empty =[
Obats has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
Obats has joined #ruby
ur5us has joined #ruby
<Obats>
Strange thing is I have '#encoding: UTF-8' at the top of the file, right before checking Encoding.default_internal. But still Encoding.default_internal is empty =[
<Obats>
Is the comment "just" to tell ruby about the encoding of that specific source file?
<voker57>
yes
<voker57>
environment.rb is rails stuff, not ruby
<voker57>
it basically does Encoding.default_internal= for you
fphilipe_ has quit [Ping timeout: 258 seconds]
<voker57>
protip: run ruby with -U
ur5us has quit [Ping timeout: 258 seconds]
<voker57>
it should default to utf-8 if your locale is utf-8 but shit's complicated
<Obats>
Ahh, that wasn't listed on the command line -h. Thanks :).
chalkmonster has quit [Quit: WeeChat 2.5]
<Obats>
My default encodings problem is like this: 'TCPSocket.open(..) do |sock| .. sock.each_line do |line| ..' (Hope that was sort of readable, basically two lines) The content of line is UTF-8, but still line.encoding.name seems to be ASCII-8BIT. It seems Encoding.default_* doesn't cover that?
JoeA2552 has joined #ruby
<voker57>
did you try running this code directly in ruby, w/o rails and other environment?
<Obats>
voker57: Not yet. Can I do that with -e ?
deepreds1 has joined #ruby
<voker57>
why do you need -e?
<voker57>
ruby yourfile.rb
<voker57>
also can do with -e, yes
<Obats>
Got it. Sorry, new to this.
<dionysus69>
hmm
<dionysus69>
so I have a method with lots of hash key arguments
<dionysus69>
yea just read that too, but doesnt do my thing
<leftylink>
there's also **args but then there is no longer the way to make some required and/or error if an extra one is passed... unless maybe you make index_data_validator do that
<leftylink>
def f(**a)
<leftylink>
ops
<leftylink>
wasn't ready to hit enter on that
fphilipe_ has joined #ruby
<leftylink>
&>> def g(a: 5, b:) a.is_a?(Integer) end; def f(**a) g(**a) ? a : :no end; f
<dionysus69>
yea I will try stay away from def f(**a)
<leftylink>
will need to merge the default values back in somehow too, that is too bad
<dionysus69>
ok I guess I will just save returning hash in a var
<dionysus69>
and then pass it to validator
<dionysus69>
anyways, as for the conventions go, how am I doing, am I breaking too many rules? :D
<dionysus69>
even the way I am outputing an exception error
conta has joined #ruby
Jonopoly has joined #ruby
<dionysus69>
also, is any one of the two ways preferred? raise ArgumentError if index_data_invalid?(data) || raise ArgumentError unless index_data_valid?(data)
Jonopoly has quit [Client Quit]
<dionysus69>
I kind of prefer negating method name instead of negating if to unless
<voker57>
yeah i also think second way is better
<voker57>
eh, misread. s/yeah i also/i/
<voker57>
because unless index_data_invalid becomes too hard to read
Jonopoly has joined #ruby
<dionysus69>
yea that is double negation, horrible thing :D
<dionysus69>
word twister game :D
<Obats>
I got a lot of 'incompatible character encodings: UTF-8 and ASCII-8BIT' now after updating to ruby 2, I don't think that happened before. Am I right in assuming the handling of string mismatches has changed?
soniya29 has quit [Remote host closed the connection]
<voker57>
hard to say, it's ancient history
fphilipe_ has quit [Ping timeout: 250 seconds]
za1b1tsu has joined #ruby
ellcs has joined #ruby
themsay has quit [Ping timeout: 246 seconds]
sagax has quit [Ping timeout: 258 seconds]
gregf_ has joined #ruby
gregf_ has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 264 seconds]
fphilipe_ has joined #ruby
chalkmonster has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
<ZAJDAN>
some tip for array differences?
<dionysus69>
ZAJDAN: [1,2,3] - [2,3] ?
<dionysus69>
(...).empty? <-- if this happens then arrays are same
absolutejam4 has joined #ruby
<ZAJDAN>
okok will try
absolutejam4 has quit [Ping timeout: 245 seconds]
sh7d has quit [Ping timeout: 272 seconds]
CrazyEddy has joined #ruby
themsay has joined #ruby
Obats has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 268 seconds]
jefffrails35 has joined #ruby
sh7d has joined #ruby
ua has quit [Read error: Connection reset by peer]
ua has joined #ruby
conta has joined #ruby
yalue has joined #ruby
cow[moo] has joined #ruby
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
jcalla has quit [Ping timeout: 258 seconds]
krandi has joined #ruby
andikr has quit [Ping timeout: 246 seconds]
fphilipe_ has joined #ruby
DTZUZO has joined #ruby
hogetaro has quit [Quit: Leaving...]
conta has quit [Ping timeout: 248 seconds]
griffindy has joined #ruby
conta has joined #ruby
yqt has joined #ruby
deepreds1 has quit [Ping timeout: 245 seconds]
tdy has quit [Ping timeout: 272 seconds]
deepreds1 has joined #ruby
yqt has quit [Ping timeout: 248 seconds]
andikr has joined #ruby
absolutejam4 has joined #ruby
krandi_ has joined #ruby
krandi__ has joined #ruby
krandi___ has joined #ruby
krandi has quit [Ping timeout: 272 seconds]
andikr has quit [Ping timeout: 244 seconds]
krandi_ has quit [Ping timeout: 245 seconds]
krandi__ has quit [Ping timeout: 244 seconds]
absolutejam4 has quit [Ping timeout: 258 seconds]
deepreds1 has quit [Ping timeout: 258 seconds]
aphprentice__ has quit [Quit: Connection closed for inactivity]
involans has joined #ruby
mikecmpbll has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
ZAJDAN has quit [Quit: Konversation terminated!]
jcalla has joined #ruby
chalkmonster has joined #ruby
andikr has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
vondruch_ has joined #ruby
donofrio has joined #ruby
krandi has joined #ruby
jcalla has quit [Ping timeout: 244 seconds]
krandi_ has joined #ruby
krandi___ has quit [Ping timeout: 268 seconds]
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
andikr has quit [Ping timeout: 244 seconds]
andikr has joined #ruby
krandi has quit [Ping timeout: 258 seconds]
krandi_ has quit [Ping timeout: 246 seconds]
jcalla has joined #ruby
absolutejam4 has joined #ruby
jcalla has quit [Remote host closed the connection]
jcalla has joined #ruby
absolutejam4 has quit [Ping timeout: 258 seconds]
skryking has joined #ruby
involans has quit [Remote host closed the connection]
yqt has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
sagax has joined #ruby
yqt has quit [Ping timeout: 245 seconds]
cd has quit [Quit: cd]
krandi has joined #ruby
krandi_ has joined #ruby
aupadhye has quit [Ping timeout: 244 seconds]
andikr has quit [Ping timeout: 246 seconds]
conta has quit [Ping timeout: 246 seconds]
krandi has quit [Ping timeout: 272 seconds]
sparc_ has quit []
andikr has joined #ruby
sparc_ has joined #ruby
krandi has joined #ruby
krandi_ has quit [Ping timeout: 245 seconds]
andikr has quit [Ping timeout: 272 seconds]
chalkmonster has quit [Ping timeout: 245 seconds]
s2013 has joined #ruby
BH23 has joined #ruby
andikr has joined #ruby
krandi_ has joined #ruby
krandi has quit [Ping timeout: 246 seconds]
krandi__ has joined #ruby
pwnd_nsfw` has joined #ruby
andikr has quit [Ping timeout: 258 seconds]
andikr has joined #ruby
pwnd_nsfw has quit [Ping timeout: 248 seconds]
krandi_ has quit [Ping timeout: 248 seconds]
krandi__ has quit [Ping timeout: 245 seconds]
help_me12398 has joined #ruby
krandi has joined #ruby
krandi_ has joined #ruby
andikr has quit [Ping timeout: 245 seconds]
<help_me12398>
hey everybody, i have a question about some weird (rails) scopes we use - we need three scopes on a model "A" which has a beginning and ending field. all scopes are about dates (two date parameters), one scope needs to talk about how A is completely inside the two parameters, one scope is about all As which completely include the two parameters an
<help_me12398>
d one scope is about where the dates just overlap in any way
krandi has quit [Ping timeout: 245 seconds]
<help_me12398>
currently we're naming one A.in_date_range and another one A.including_date_range but we dont like the naming
shtirlic has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
absolutejam4 has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
sgen has quit [Ping timeout: 276 seconds]
mikecmpbll has joined #ruby
conta has quit [Quit: conta]
wildermind has joined #ruby
themsay has joined #ruby
absolutejam4 has quit [Ping timeout: 245 seconds]
cca4 has joined #ruby
yqt has joined #ruby
involans has joined #ruby
involans has quit [Remote host closed the connection]
greengriminal has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jinie_ has joined #ruby
jenrzzz has joined #ruby
<cca4>
Hello everyone, I use the gem omniauth facebook https://github.com/mkdynamic/omniauth-facebook so that people can connect to my application via facebook. I would like to test my OmniauthCallbacksController < Currency::OmniauthCallbacksController but I don't see how to do it. I found this article but we use minitest for testing. How can I adapt this