baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.4.6: 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!
kyrylo has joined #ruby
wallace_mu has quit [Remote host closed the connection]
samort7 has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
fphilipe has joined #ruby
jottr has joined #ruby
tdy has quit [Ping timeout: 268 seconds]
wallace_mu has joined #ruby
fphilipe has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 268 seconds]
wallace_mu has quit [Remote host closed the connection]
_whitelogger has joined #ruby
<quarters> hello. I was wondering if anyone can advise on how to debug specs with vs code's debugger
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace__ has joined #ruby
wallace_mu has quit [Read error: Connection reset by peer]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
donofrio_ has joined #ruby
donofrio has quit [Quit: Leaving]
fphilipe has joined #ruby
tdy has quit [Ping timeout: 255 seconds]
AJA4350 has quit [Remote host closed the connection]
wallace__ has quit [Remote host closed the connection]
pupsikov has joined #ruby
wallace_mu has joined #ruby
_whitelogger has joined #ruby
dsmythe has quit [Remote host closed the connection]
dsmythe has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
zachk has quit [Read error: Connection reset by peer]
hightower3 has quit [Ping timeout: 244 seconds]
donofrio_ has quit [Quit: Leaving]
jottr has joined #ruby
donofrio has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
uplime96 has joined #ruby
uplime96 is now known as also_uplime
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
duderonomy has joined #ruby
also_uplime has quit [Remote host closed the connection]
axsuul- has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
braincras has quit [Quit: bye bye]
jottr has quit [Ping timeout: 255 seconds]
braincrash has joined #ruby
hightower3 has joined #ruby
fphilipe has joined #ruby
hightower3 has quit [Ping timeout: 246 seconds]
hightower3 has joined #ruby
jottr has joined #ruby
houhoulis has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
fphilipe has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
rippa has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apparition has joined #ruby
wallace_mu has quit [Ping timeout: 245 seconds]
bambanx has joined #ruby
fphilipe has joined #ruby
dsmythe has quit [Ping timeout: 246 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
apparition has quit [Quit: Bye]
_whitelogger has joined #ruby
mangold has joined #ruby
hightower3 has quit [Ping timeout: 255 seconds]
fphilipe has quit [Ping timeout: 264 seconds]
stoller has joined #ruby
crankharder has joined #ruby
jottr has joined #ruby
stoller has quit [Client Quit]
jottr has quit [Ping timeout: 244 seconds]
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
mozzarella has quit [Remote host closed the connection]
jottr has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
Alison` has quit [Quit: Leaving]
Alison` has joined #ruby
dsmythe has joined #ruby
schleppel has joined #ruby
DmitryBochkarev has joined #ruby
cd has joined #ruby
mozzarella has joined #ruby
Swyper has quit [Remote host closed the connection]
Deesl has joined #ruby
Deesl has quit [Client Quit]
fphilipe has joined #ruby
bambanx has quit [Quit: Leaving]
kapil____ has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
duderonomy has joined #ruby
duckpupp- has joined #ruby
conta has joined #ruby
wallace_mu has joined #ruby
duckpuppy has quit [Ping timeout: 244 seconds]
lomex has joined #ruby
conta has quit [Client Quit]
wallace_mu has quit [Ping timeout: 246 seconds]
conta has joined #ruby
conta has quit [Quit: conta]
mangold has quit [Quit: This computer has gone to sleep]
bokwoon has joined #ruby
wallace_mu has joined #ruby
jefffrails35 has joined #ruby
wallace_mu has quit [Ping timeout: 245 seconds]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower3 has joined #ruby
phaul has quit [Quit: :wq]
vrih has joined #ruby
sameerynho has joined #ruby
lomex has joined #ruby
fphilipe has quit [Ping timeout: 257 seconds]
vrih has quit [Ping timeout: 246 seconds]
reber has joined #ruby
Dbugger has joined #ruby
kyrylo has joined #ruby
fphilipe has joined #ruby
dhollinger has quit [Read error: Connection reset by peer]
dhollinger has joined #ruby
vrih has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3_ has joined #ruby
uranoss has joined #ruby
jefffrails35 has quit [Remote host closed the connection]
nowhere_man has joined #ruby
vrih has quit [Remote host closed the connection]
vrih has joined #ruby
dellavg_ has quit [Ping timeout: 268 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
DTZUZO has quit [Ping timeout: 255 seconds]
znz_jp has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
dsmythe has quit [Ping timeout: 250 seconds]
Puffball has joined #ruby
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
clemens3_ has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
layer has joined #ruby
fphilipe has quit [Quit: WeeChat 2.4]
fphilipe has joined #ruby
agent_white has quit [Quit: bbl]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
hightower3 has quit [Changing host]
hightower3 has joined #ruby
Fernando-Basso has joined #ruby
_whitelogger has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
vrih has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
ricekrispie2 has joined #ruby
ricekrispie has quit [Ping timeout: 250 seconds]
layer has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 255 seconds]
psmolen has quit [Ping timeout: 245 seconds]
Puffball has quit [Read error: Connection reset by peer]
AKPWD has quit [Ping timeout: 244 seconds]
AKPWD has joined #ruby
al2o3-cr has joined #ruby
fphilipe_ has joined #ruby
psmolen has joined #ruby
fphilipe has quit [Ping timeout: 252 seconds]
fphilipe_ has quit [Ping timeout: 268 seconds]
lomex has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
clemens3_ has joined #ruby
Bob8989|2 has joined #ruby
Bob8989|2 has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
fphilipe_ has quit [Ping timeout: 252 seconds]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
mozzarella has quit [Quit: WeeChat 2.2]
mozzarella has joined #ruby
wallace_mu has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 246 seconds]
tdy has joined #ruby
Swyper has joined #ruby
DmitryBochkarev has quit [Ping timeout: 246 seconds]
elated has quit [Quit: Leaving]
reber has quit [Remote host closed the connection]
Rakete1111 has joined #ruby
<Rakete1111> hello I have a question about the Mail gem. Is this the appropriate channel to ask?
DmitryBochkarev has joined #ruby
<adam12> Rakete1111: Just ask. If someone knows the answer then they'll chime in. I can't think of any better channel, tbh.
<Rakete1111> ok thanks
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
<Rakete1111> Mail.read("/path/to/file").text_part is Nil but if I do `s = File.read("/path/to/file")` and then `Mail.new(s).text_part` it works.
<Rakete1111> and it seems like it's doing the same thing? but I don't really get why one way doesn't work and with the other it works
<Rakete1111> Or same question but asked differently: It seems like `File.open(filename, 'rb') { |f| f.read }` does something else than `File.read(filename)`?
<adam12> Rakete1111: Indeed that is kinda odd.
<adam12> Rakete1111: Does it happen on every file or just random ones?
<Rakete1111> well only on the files that have a multiple parts. I'll check if I can reproduce in the irb
<Rakete1111> (because that's when the function is used)
jottr has joined #ruby
<Rakete1111> yes so the output is different
<Rakete1111> the File.open way gives me a different string than File.read
<adam12> Rakete1111: That's odd. What OS?
<adam12> Maybe it's an encoding issue.
russt_ has quit [Ping timeout: 258 seconds]
<Rakete1111> linux
<Rakete1111> oh that's true
<adam12> Rakete1111: The binary flag to File.open does some things different. File.read by default doesn't set binary mode. That might be why you see different results as strings.
<Rakete1111> oh right, non ascii characters get encoded using \xNN in the first
<Rakete1111> you're right
<Rakete1111> so I guess it seems like
<adam12> Rakete1111: If you're getting what you want with File.read + Mail.new, I don't see any reason why you couldn't use that method.
<Rakete1111> Mail can't really work with \xNN characters
<Rakete1111> jup
<adam12> Rakete1111: It might. I'd look through the spec/fixtures and see if there are any files that match.
<adam12> Rakete1111: What's your locale, out of curiosity?
DmitryBochkarev has quit [Remote host closed the connection]
<Rakete1111> It should be en-us, but the email was German
russt has joined #ruby
DmitryBochkarev has joined #ruby
fphilipe_ has joined #ruby
<adam12> Rakete1111: Might be a mail bug. Hard to say. If you `s = File.read("/path/to/file", mode: "rb"); Mail.new(s).text_part` does it bug out?
agent_white has joined #ruby
<Rakete1111> So: "\xC3" == "ö" is false. Is there not a way to reverse the conversion that happens when File.read reads a file in binary mode?
<Rakete1111> yes it does bug out
<Rakete1111> and the output is the same (so indeed that was it)
<Rakete1111> Does ruby not have escaped characters in strings?
<adam12> Rakete1111: The 'b' flag forces external encoding to ASCII-8BIT.
<adam12> Rakete1111: Do you have a value for `Encoding.default_external` ?
<Rakete1111> It's #<Encoding:UTF-8>
<adam12> How about Encoding.default_internal?
<Rakete1111> nil
<adam12> Hm. I'd presume that to work just fine.
<adam12> Should "\xC3" == "ö" be true?
<Rakete1111> yes. doesn't work even for ASCII characters: "\x30" == "/" is false
<Rakete1111> nvm
<Rakete1111> Seems like ruby doesn't know my locale so misinterprets "\xC3" as nothing
<Rakete1111> and doesn't parse that as character
jottr has quit [Ping timeout: 255 seconds]
<Rakete1111> I guess that make sense. \xC3 could mean different things in different locales
<Rakete1111> omg I was wrong
<adam12> Rakete1111: I don't work too much with different locales so likely getting to the extend of my knowledge here.
<adam12> Rakete1111: What Ruby version is this?
<Rakete1111> 2.6.2p47
<adam12> So no issue there.
<Rakete1111> "\xC3\xB6" == "ö" is true
<Rakete1111> I didn't see the last part
<adam12> That looks right.
<Rakete1111> So why the different? funny
<Rakete1111> ce*
<Rakete1111> maybe worth filing a Mail bug I guess
<Rakete1111> or what do you think?
<adam12> Rakete1111: Maybe. I'm not sure if the `b` flag is necessary to read emails.
fribmendes has quit [Ping timeout: 258 seconds]
<Rakete1111> I'll file and see what they think :)
<adam12> Rakete1111: If you have the source, I'd remove the flag and run the specs. If they all pass, maybe it's a Windows-only thing.
<adam12> Rakete1111: Could search the issue tracker for encoding. Maybe it's been discussed before.
<Rakete1111> yeah I will do that thakns
lomex has joined #ruby
bokwoon has quit [Quit: WeeChat 2.5-dev]
hightower3 has quit [Ping timeout: 244 seconds]
houhoulis has joined #ruby
fphilipe_ has quit [Ping timeout: 252 seconds]
Swyper has quit [Remote host closed the connection]
Rakete1111 has quit [Quit: leaving]
fphilipe_ has joined #ruby
DmitryBochkarev has quit [Ping timeout: 255 seconds]
DmitryBochkarev has joined #ruby
suukim has joined #ruby
dviola has joined #ruby
venmx has joined #ruby
houhoulis has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 258 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
clemens3_ has quit [Ping timeout: 250 seconds]
delimited has joined #ruby
jottr has joined #ruby
hightower3 has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
fanta1 has joined #ruby
camilasan has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
conta has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
conta has quit [Client Quit]
dviola has quit [Ping timeout: 255 seconds]
AJA4351 has joined #ruby
dviola has joined #ruby
delimited has quit [Read error: Connection reset by peer]
delimited has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
AJA4351 is now known as AJA4350
jottr has quit [Ping timeout: 250 seconds]
dviola has quit [Changing host]
dviola has joined #ruby
crankharder has quit [Ping timeout: 244 seconds]
agent_white has quit [Quit: brb]
agent_white has joined #ruby
sphenxes has joined #ruby
crankharder has joined #ruby
laaron- has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
hightower3 has quit [Read error: Connection reset by peer]
hightower2 has joined #ruby
venmx has quit [Quit: leaving]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lord4163 has quit [Excess Flood]
jottr has joined #ruby
lord4163 has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
sphenxes has quit [Remote host closed the connection]
fanta1 has quit [Quit: fanta1]
seggy has joined #ruby
seggy has quit [Client Quit]
nowhere_man has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4350 has joined #ruby
lytol has joined #ruby
<quarters> I was wondering how to pass a hash's key, value pair as a hash into a proc
<quarters> while iterating over it using #each
<uplime> quarters: you mean like: myhash.each { |key, val| ... }
<uplime> ?
jottr has joined #ruby
wallace_mu has quit [Remote host closed the connection]
suukim has quit [Quit: Konversation terminated!]
jottr has quit [Ping timeout: 268 seconds]
rbasak has left #ruby [#ruby]
fphilipe_ has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
delimited has quit [Ping timeout: 246 seconds]
AJA4351 has joined #ruby
delimited has joined #ruby
AJA4350 has quit [Ping timeout: 255 seconds]
AJA4351 is now known as AJA4350
dsmythe has joined #ruby
wallace_mu has joined #ruby
vrih has joined #ruby
fphilipe_ has quit [Ping timeout: 252 seconds]
dsmythe has quit [Ping timeout: 264 seconds]
dsmythe has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
clemens3_ has joined #ruby
aqd has joined #ruby
fphilipe_ has joined #ruby
laaron- has quit [Remote host closed the connection]
laaron has joined #ruby
hiroaki has quit [Ping timeout: 246 seconds]
CrazyEddy has quit [Ping timeout: 245 seconds]
camilasan has quit [Remote host closed the connection]
uranoss has quit [Quit: Connection closed for inactivity]
kmckelvin has joined #ruby
hightower2 has quit [Ping timeout: 245 seconds]
camilasan has joined #ruby
vrih has quit [Ping timeout: 244 seconds]
lytol has quit [Quit: lytol]
sameerynho has quit [Ping timeout: 250 seconds]
schleppel has quit [Quit: Konversation terminated!]
reber has joined #ruby
fphilipe_ has quit [Ping timeout: 240 seconds]
tdy has quit [Ping timeout: 250 seconds]
nowhere_man has quit [Ping timeout: 255 seconds]
reber has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
DmitryBochkarev has quit [Ping timeout: 268 seconds]
cow[moo] has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
code_zombie has joined #ruby
cow[moo] has quit [Ping timeout: 268 seconds]
fphilipe_ has quit [Ping timeout: 268 seconds]
clemens3_ has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has quit [Ping timeout: 246 seconds]