00:06
skryking_ has joined #ruby
00:09
skryking__ has quit [Ping timeout: 258 seconds]
00:22
TomyLobo has quit [Read error: Connection reset by peer]
00:22
fphilipe has joined #ruby
00:25
jelera has joined #ruby
00:27
AndChat87561 has quit [Ping timeout: 245 seconds]
00:37
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:56
weteamsteve1 has joined #ruby
00:56
fphilipe has quit [Ping timeout: 240 seconds]
00:57
sameerynho has quit [Ping timeout: 245 seconds]
00:59
weteamsteve has quit [Ping timeout: 276 seconds]
01:02
jottr has joined #ruby
01:04
dar123 has joined #ruby
01:07
jottr has quit [Ping timeout: 258 seconds]
01:24
anesthesia has joined #ruby
01:29
anesthesia has left #ruby ["WeeChat 2.4"]
01:35
jenrzzz has joined #ruby
01:40
houhoulis has joined #ruby
01:48
AJA4350 has quit [Remote host closed the connection]
02:25
agent_white has quit [Quit: brb]
02:26
laaron has quit [Remote host closed the connection]
02:30
laaron has joined #ruby
02:35
dviola has quit [Read error: Connection reset by peer]
02:39
znz_jp has quit [Ping timeout: 276 seconds]
02:41
jenrzzz has quit [Ping timeout: 268 seconds]
02:45
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:46
jelera has joined #ruby
02:46
jelera has quit [Client Quit]
02:47
jelera has joined #ruby
02:47
jelera has quit [Client Quit]
02:47
znz_jp has joined #ruby
02:47
jelera has joined #ruby
02:48
jelera has quit [Client Quit]
02:48
jelera has joined #ruby
02:48
jelera has quit [Client Quit]
02:49
jelera has joined #ruby
02:49
jelera has quit [Client Quit]
02:50
dviola has joined #ruby
02:53
fphilipe has joined #ruby
02:56
pupsikov has joined #ruby
02:58
tpanarch1st has quit [Quit: Thanks for your help, nice to see you, take care.]
03:03
jottr has joined #ruby
03:05
braincrash has quit [Quit: bye bye]
03:08
jottr has quit [Ping timeout: 255 seconds]
03:10
braincrash has joined #ruby
03:25
laaron has joined #ruby
03:26
fphilipe has quit [Ping timeout: 258 seconds]
03:35
violentE has quit [Quit: Leaving]
03:37
gix has joined #ruby
03:39
sleetdrop has joined #ruby
03:39
gix- has quit [Ping timeout: 246 seconds]
03:40
laaron has quit [Remote host closed the connection]
03:42
laaron has joined #ruby
03:50
jenrzzz has joined #ruby
03:52
weteamsteve2 has joined #ruby
03:55
fphilipe has joined #ruby
03:57
weteamsteve1 has quit [Ping timeout: 276 seconds]
03:58
<
quarters >
hello. I have a file "foo.txt" in the same folder as "foo.rb" where I have a line "foo = File.new("foo.txt","r")" but am getting an error saying that such a file doesn't exist. The documentation here
https://ruby-doc.org/core-2.1.4/File.html#method-c-open doesn't really clarify for me.
03:58
jenrzzz has quit [Ping timeout: 246 seconds]
04:02
cow[moo] has joined #ruby
04:03
comet23 has quit [Quit: Connection closed for inactivity]
04:10
cd has quit [Quit: cd]
04:29
fphilipe has quit [Ping timeout: 258 seconds]
04:47
imadper has joined #ruby
04:47
ruby[bot] has quit [Read error: Connection reset by peer]
04:47
<
quarters >
I found that I would need to check Dir.pwd
04:47
ruby[bot] has joined #ruby
04:47
laaron has quit [Remote host closed the connection]
04:48
<
quarters >
I was wondering how to check whether or not a key in a hash starts with a particular string
04:48
laaron has joined #ruby
04:48
suryc has joined #ruby
04:58
suryc has left #ruby [#ruby]
05:04
jottr has joined #ruby
05:06
imadper has quit [Remote host closed the connection]
05:09
jottr has quit [Ping timeout: 245 seconds]
05:18
_whitelogger has joined #ruby
05:20
edwardly has quit [Read error: Connection reset by peer]
05:23
<
woodruffw >
quarters: `find` and `find_all` both work on hashes: `foo.find_all { |k, _| k.start_with? "prefix" }` should work
05:23
edwardly has joined #ruby
05:23
edwardly has joined #ruby
05:25
<
woodruffw >
(you can use `to_h` to turn the result of `find_all` back into a hash`
05:26
PuercoPop has left #ruby ["rcirc on GNU Emacs 26.1"]
05:26
<
woodruffw >
alternatively, `filter`/`filter!` will work just fine and the latter will return the modified hash
05:29
weteamsteve2 has quit [Read error: Connection reset by peer]
05:31
reber has joined #ruby
05:42
_whitelogger has joined #ruby
05:48
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
06:06
_whitelogger has joined #ruby
06:06
Mutsuhito has joined #ruby
06:07
mattwc has quit [Ping timeout: 240 seconds]
06:08
tdy1 has quit [Remote host closed the connection]
06:08
ctp has quit [Ping timeout: 268 seconds]
06:09
mattwc has joined #ruby
06:18
_whitelogger has joined #ruby
06:18
pwillard has joined #ruby
06:18
tdy1 has joined #ruby
06:22
Liothen has quit [Client Quit]
06:23
Liothen has joined #ruby
06:23
hightower3 has quit [Changing host]
06:23
hightower3 has joined #ruby
06:25
ricekrispie2 has joined #ruby
06:26
Liothen has quit [Changing host]
06:26
Liothen has joined #ruby
06:26
fphilipe has joined #ruby
06:27
ricekrispie has quit [Ping timeout: 245 seconds]
06:43
dellavg_ has joined #ruby
06:47
kapil____ has joined #ruby
06:54
shtirlic has joined #ruby
06:55
shtirlic has quit [Read error: Connection reset by peer]
06:57
shtirlic has joined #ruby
06:58
shtirlic has quit [Client Quit]
06:59
shtirlic has joined #ruby
07:01
fphilipe has quit [Ping timeout: 258 seconds]
07:05
shtirlic_ has joined #ruby
07:06
shtirlic has quit [Ping timeout: 246 seconds]
07:06
shtirlic_ is now known as shtirlic
07:06
Swyper has joined #ruby
07:13
sameerynho has joined #ruby
07:13
fphilipe has joined #ruby
07:30
_whitelogger has joined #ruby
07:31
laaron has quit [Remote host closed the connection]
07:32
laaron has joined #ruby
07:33
laaron has quit [Remote host closed the connection]
07:36
laaron has joined #ruby
07:44
ricekrispie has joined #ruby
07:45
ricekrispie2 has quit [Ping timeout: 244 seconds]
07:47
fanta1 has quit [Quit: fanta1]
07:58
Swyper has quit [Remote host closed the connection]
07:59
queip has quit [Ping timeout: 255 seconds]
08:00
dsmythe has quit [Remote host closed the connection]
08:07
tdy1 has quit [Ping timeout: 245 seconds]
08:14
fanta1 has joined #ruby
08:20
queip has joined #ruby
08:22
waheedi has joined #ruby
08:34
dionysus69 has joined #ruby
08:54
cow[moo] has quit [Ping timeout: 245 seconds]
08:55
wildermind has joined #ruby
08:55
jenrzzz has joined #ruby
09:01
dionysus69 has quit [Remote host closed the connection]
09:01
dionysus69 has joined #ruby
09:03
jenrzzz has quit [Ping timeout: 246 seconds]
09:04
jottr has joined #ruby
09:07
ricekrispie2 has joined #ruby
09:08
ricekrispie has quit [Ping timeout: 244 seconds]
09:10
jottr has quit [Ping timeout: 240 seconds]
09:18
_whitelogger has joined #ruby
09:27
TomyLobo has joined #ruby
09:28
jottr has joined #ruby
09:32
kyrylo has joined #ruby
09:36
jenrzzz has joined #ruby
09:39
shtirlic has joined #ruby
09:41
jottr has quit [Ping timeout: 264 seconds]
09:42
jottr has joined #ruby
09:43
jottr_ has joined #ruby
09:45
jottr__ has joined #ruby
09:46
jottr has quit [Ping timeout: 258 seconds]
09:47
jenrzzz has quit [Ping timeout: 245 seconds]
09:49
jottr_ has quit [Ping timeout: 255 seconds]
09:49
jottr has joined #ruby
09:49
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:52
jottr__ has quit [Ping timeout: 245 seconds]
10:01
dsmythe has joined #ruby
10:04
jefffrails35 has joined #ruby
10:10
dsmythe has quit [Ping timeout: 250 seconds]
10:16
laaron has quit [Remote host closed the connection]
10:17
laaron has joined #ruby
10:18
dsmythe has joined #ruby
10:26
Fernando-Basso has joined #ruby
10:29
laaron has quit [Remote host closed the connection]
10:32
laaron has joined #ruby
10:37
fphilipe has quit [Ping timeout: 240 seconds]
10:57
wildermind has quit [Quit: Connection closed for inactivity]
10:57
dsmythe has quit [Remote host closed the connection]
10:58
AJA4350 has joined #ruby
10:58
dsmythe has joined #ruby
11:03
vyrus001 has quit [Ping timeout: 255 seconds]
11:03
zleap has joined #ruby
11:03
zleap has joined #ruby
11:03
zleap has quit [Changing host]
11:04
vyrus001 has joined #ruby
11:06
dsmythe has quit [Ping timeout: 246 seconds]
11:11
jottr has quit [Ping timeout: 246 seconds]
11:12
<
ruby[bot] >
Next question, please!
11:13
<
Zarthus >
you nailed that one, my friend
11:24
dionysus69 has quit [Ping timeout: 246 seconds]
11:28
jottr has joined #ruby
11:31
zleap has left #ruby ["WeeChat 1.6"]
11:31
zleap has joined #ruby
11:32
zleap has left #ruby [#ruby]
11:33
jottr has quit [Ping timeout: 258 seconds]
11:40
zleap has joined #ruby
11:40
zleap has quit [Changing host]
11:40
zleap has joined #ruby
11:43
jenrzzz has joined #ruby
11:43
Azure has joined #ruby
11:47
jenrzzz has quit [Ping timeout: 250 seconds]
11:48
dsmythe has joined #ruby
11:49
jottr has joined #ruby
11:54
jottr has quit [Ping timeout: 246 seconds]
11:55
zleap has quit [Quit: WeeChat 1.6]
12:01
dsmythe has quit [Ping timeout: 240 seconds]
12:03
BTRE has joined #ruby
12:10
jottr has joined #ruby
12:15
jottr has quit [Ping timeout: 246 seconds]
12:16
galaxie has quit [Ping timeout: 256 seconds]
12:18
galaxie has joined #ruby
12:19
BTRE has quit [Remote host closed the connection]
12:22
BTRE has joined #ruby
12:25
BTRE has quit [Read error: Connection reset by peer]
12:31
jottr has joined #ruby
12:34
fphilipe has joined #ruby
12:35
jottr has quit [Ping timeout: 245 seconds]
12:39
fphilipe has quit [Ping timeout: 268 seconds]
12:41
Dbugger has joined #ruby
12:41
BTRE has joined #ruby
12:43
jenrzzz has joined #ruby
12:47
jenrzzz has quit [Ping timeout: 245 seconds]
12:48
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
12:51
nowhere_man has joined #ruby
12:52
jottr has joined #ruby
12:56
jottr has quit [Ping timeout: 246 seconds]
12:59
conta has joined #ruby
13:04
kyrylo has joined #ruby
13:13
jottr has joined #ruby
13:14
nowhere_man has quit [Ping timeout: 245 seconds]
13:15
agent_white has joined #ruby
13:17
jottr has quit [Ping timeout: 246 seconds]
13:29
dsmythe has joined #ruby
13:34
jottr has joined #ruby
13:34
dsmythe has quit [Ping timeout: 264 seconds]
13:36
rippa has joined #ruby
13:44
jottr has quit [Ping timeout: 246 seconds]
13:46
jelera has joined #ruby
13:59
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:00
jelera has joined #ruby
14:00
jelera has quit [Client Quit]
14:00
jottr has joined #ruby
14:01
jelera has joined #ruby
14:01
jelera has quit [Client Quit]
14:01
jelera has joined #ruby
14:02
jelera has quit [Client Quit]
14:02
dsmythe has joined #ruby
14:02
jelera has joined #ruby
14:02
jelera has quit [Client Quit]
14:03
lypsis has joined #ruby
14:04
Fernando-Basso has quit [Remote host closed the connection]
14:05
jottr has quit [Ping timeout: 245 seconds]
14:07
dsmythe has quit [Ping timeout: 264 seconds]
14:07
dionysus69 has joined #ruby
14:10
lypsis has joined #ruby
14:11
lypsis has quit [Client Quit]
14:14
lypsis has joined #ruby
14:18
lypsis has quit [Client Quit]
14:19
lypsis has joined #ruby
14:19
lypsis has quit [Client Quit]
14:21
lypsis has joined #ruby
14:21
marmotini_ has joined #ruby
14:21
jottr has joined #ruby
14:21
marmotini_ has quit [Max SendQ exceeded]
14:23
marmotini_ has joined #ruby
14:23
lypsis has quit [Client Quit]
14:24
lypsis has joined #ruby
14:25
lypsis has quit [Client Quit]
14:26
jottr has quit [Ping timeout: 246 seconds]
14:26
lypsis has joined #ruby
14:28
fphilipe has joined #ruby
14:35
nowhere_man has joined #ruby
14:37
zapata_ is now known as zapata
14:41
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:42
jottr has joined #ruby
14:43
jenrzzz has joined #ruby
14:46
jottr has quit [Ping timeout: 246 seconds]
14:47
jenrzzz has quit [Ping timeout: 250 seconds]
15:03
dsmythe has joined #ruby
15:03
jottr has joined #ruby
15:06
fanta1 has quit [Quit: fanta1]
15:07
dsmythe has quit [Ping timeout: 258 seconds]
15:08
jottr has quit [Ping timeout: 250 seconds]
15:11
thebigj has joined #ruby
15:12
<
thebigj >
I am on Gentoo GNU/Linux distribution.
15:12
<
thebigj >
Ruby version is 2.4.0
15:12
<
thebigj >
I don't have any experience with Ruby.
15:12
<
thebigj >
Can anyone guide me about the error?
15:14
<
phaul >
it's rake24 not found, do you have rake? execute: which rake
15:14
dar123 has joined #ruby
15:15
<
thebigj >
phaul: It is giving "/usr/bin/rake
15:15
<
thebigj >
* /usr/bin/rake
15:15
<
thebigj >
phaul: I think the rake is installed
15:15
<
phaul >
tryo ln -s /usr/bin/rake /usr/bin/rake24
15:15
<
thebigj >
phaul: okay. Trying
15:16
<
phaul >
and see where that takes you, this probably would be considered a hack by many, but.. if it works..
15:18
nowhere_man has quit [Ping timeout: 250 seconds]
15:20
nowhere_man has joined #ruby
15:20
<
thebigj >
phaul: It worked!
15:20
<
thebigj >
phaul: Thanks :)
15:24
jottr has joined #ruby
15:35
jottr has quit [Ping timeout: 246 seconds]
15:41
nowhereman has joined #ruby
15:41
nowhere_man has quit [Ping timeout: 258 seconds]
15:47
dellavg_ has quit [Ping timeout: 245 seconds]
15:49
RiPuk has quit [Ping timeout: 246 seconds]
15:49
RiPuk has joined #ruby
15:51
dionysus69 has quit [Remote host closed the connection]
15:52
jottr has joined #ruby
15:52
dionysus69 has joined #ruby
15:52
buckworst has joined #ruby
15:56
jottr has quit [Ping timeout: 258 seconds]
15:57
buckworst has quit [Client Quit]
16:04
dsmythe has joined #ruby
16:09
dsmythe has quit [Ping timeout: 276 seconds]
16:12
jottr has joined #ruby
16:14
jelera has joined #ruby
16:14
laaron has quit [Remote host closed the connection]
16:15
laaron has joined #ruby
16:17
jottr has quit [Ping timeout: 258 seconds]
16:24
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:33
jottr has joined #ruby
16:35
<
donst >
I have a ruby loop which reads from serial
16:35
<
donst >
and i want to expose "current status" to another machine
16:35
<
donst >
I thought of using TCPServer
16:36
<
donst >
but not sure how to keep both socket loop and serial loop work simultaneously
16:36
<
donst >
without breaking each other
16:36
<
donst >
is there a quick workaround?
16:36
<
donst >
I need to share only single variable
16:36
weteamsteve has joined #ruby
16:36
<
donst >
I guess if socket gets stuck on write, it will stall serial loop , right?
16:38
<
strmpnk >
Threads + a queue would work, alternatively IO.select.
16:38
jottr has quit [Ping timeout: 255 seconds]
16:38
<
strmpnk >
And if this is just a simple project, you could check out DRb, which might be easier than hand-rolling a TCP setup.
16:39
<
donst >
it's a really small ruby script with loop that reads and writes to serial
16:40
dar123 has joined #ruby
16:41
<
donst >
unfortunately on the other side i'm going to catch it with node
16:41
<
donst >
so drb is no go
16:41
<
strmpnk >
I'd use a thread to do the TCP stuff then and a queue to shuttle commands to the socket then.
16:42
Swyper has joined #ruby
16:43
jenrzzz has joined #ruby
16:46
suukim has joined #ruby
16:48
jenrzzz has quit [Ping timeout: 250 seconds]
16:50
waheedi has quit [Quit: waheedi]
16:53
<
strmpnk >
It could, it depends what lexical context you run the thread's block in.
16:54
<
strmpnk >
Better to not use instane variables for the interoperation though.
16:54
jottr has joined #ruby
16:56
fphilipe has quit [Ping timeout: 276 seconds]
16:56
<
donst >
strmpnk: heeey it works
16:56
<
strmpnk >
I'd create two objects, one that reads serial and the other which does TCP communication and provide a shared queue instance to the constructors of both. They could then run their own thread and use the queue. On the main thread I'd add a join method to both which calls Thread#join. This keeps the top-level clean and allows the classes to keep their own concerns with jus the queues for shuttling things between the two.
17:04
dsmythe has joined #ruby
17:06
waheedi has joined #ruby
17:06
jottr has quit [Ping timeout: 246 seconds]
17:07
Dbugger has quit [Quit: Leaving]
17:10
dsmythe has quit [Ping timeout: 276 seconds]
17:13
tdy1 has joined #ruby
17:19
fphilipe has joined #ruby
17:23
jottr has joined #ruby
17:29
fphilipe has quit [Ping timeout: 276 seconds]
17:35
jottr has quit [Ping timeout: 250 seconds]
17:42
Swyper has quit [Remote host closed the connection]
17:42
kenichi has joined #ruby
17:42
Swyper has joined #ruby
17:45
Swyper has quit [Remote host closed the connection]
17:50
Swyper_ has joined #ruby
17:51
jottr has joined #ruby
17:54
Swyper_ has quit [Ping timeout: 246 seconds]
17:55
kapil____ has quit [Quit: Connection closed for inactivity]
17:56
jottr has quit [Ping timeout: 246 seconds]
18:05
dsmythe has joined #ruby
18:10
dsmythe has quit [Ping timeout: 250 seconds]
18:10
ivanskie has joined #ruby
18:12
jottr has joined #ruby
18:13
fphilipe has joined #ruby
18:17
jottr has quit [Ping timeout: 258 seconds]
18:17
fphilipe has quit [Ping timeout: 250 seconds]
18:19
marmotini_ has quit [Ping timeout: 246 seconds]
18:21
hightower2 has joined #ruby
18:24
hightower3 has quit [Ping timeout: 258 seconds]
18:27
suukim has quit [Quit: Konversation terminated!]
18:27
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:28
marmotini_ has joined #ruby
18:31
dellavg_ has joined #ruby
18:31
dsmythe has joined #ruby
18:33
jelera has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:33
jottr has joined #ruby
18:33
jelera has joined #ruby
18:33
jelera has quit [Client Quit]
18:34
jelera has joined #ruby
18:34
jelera has quit [Client Quit]
18:35
jelera has joined #ruby
18:35
jelera has quit [Client Quit]
18:35
jelera has joined #ruby
18:36
jelera has quit [Client Quit]
18:36
jelera has joined #ruby
18:36
jelera has quit [Client Quit]
18:41
nowhereman has quit [Ping timeout: 246 seconds]
18:44
jenrzzz has joined #ruby
18:44
jottr has quit [Ping timeout: 245 seconds]
18:47
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:48
jenrzzz has quit [Ping timeout: 255 seconds]
18:51
ivanskie has joined #ruby
18:56
jottr has joined #ruby
19:01
jottr has quit [Ping timeout: 244 seconds]
19:05
russellx has joined #ruby
19:06
russellx has quit [Client Quit]
19:07
fphilipe has joined #ruby
19:07
dionysus69 has quit [Ping timeout: 250 seconds]
19:09
dsmythe has quit [Remote host closed the connection]
19:10
dsmythe has joined #ruby
19:12
fphilipe has quit [Ping timeout: 264 seconds]
19:17
jottr has joined #ruby
19:20
houhoulis has joined #ruby
19:22
jottr has quit [Ping timeout: 245 seconds]
19:34
comet23 has joined #ruby
19:34
armyriad has quit [Ping timeout: 250 seconds]
19:35
<
comet23 >
what's a good way to ensure that i will always iterate through an array without comparing to out of bounds "nil" comparisons?
19:35
armyriad has joined #ruby
19:35
<
comet23 >
"comparison of integer with nil failed"
19:36
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
19:37
m_antis has joined #ruby
19:47
nowhereman has joined #ruby
19:48
marmotini_ has quit [Ping timeout: 246 seconds]
19:49
siaw23 has joined #ruby
19:49
xco has joined #ruby
19:50
siaw23 has left #ruby [#ruby]
19:51
<
xco >
I wrote a blog post I’d like to share. I’m new to blogging and so far I know if only two place I can share my blog post: reddit and
http://www.rubyflow.com/ are there any Ruby groups online that I can share my blog with?
19:52
conta has quit [Quit: conta]
19:54
jottr has joined #ruby
19:55
RiPuk has quit [Ping timeout: 258 seconds]
19:58
jottr has quit [Ping timeout: 250 seconds]
19:59
waheedi has quit [Quit: waheedi]
19:59
RiPuk has joined #ruby
20:01
orbyt_ has joined #ruby
20:01
fphilipe has joined #ruby
20:03
segy has quit [Ping timeout: 250 seconds]
20:04
lypsis has quit [Remote host closed the connection]
20:04
lypsis has joined #ruby
20:06
fphilipe has quit [Ping timeout: 276 seconds]
20:08
suryc has joined #ruby
20:12
violentE has joined #ruby
20:15
jottr has joined #ruby
20:20
jottr has quit [Ping timeout: 258 seconds]
20:31
fphilipe has joined #ruby
20:31
dinfuehr_ has joined #ruby
20:32
clemens3_ has quit [Ping timeout: 245 seconds]
20:32
gix has quit [Ping timeout: 255 seconds]
20:33
dinfuehr has quit [Ping timeout: 268 seconds]
20:33
clemens3 has joined #ruby
20:33
khalella has joined #ruby
20:34
khalella has quit [Client Quit]
20:36
jottr has joined #ruby
20:37
fphilipe has quit [Ping timeout: 276 seconds]
20:38
dellavg_ has quit [Ping timeout: 250 seconds]
20:40
jottr has quit [Ping timeout: 250 seconds]
20:41
jefffrails35 has quit [Remote host closed the connection]
20:44
jenrzzz has joined #ruby
20:47
<
miah >
nice little microblogging site about software dev
20:48
jenrzzz has quit [Ping timeout: 245 seconds]
20:57
jottr has joined #ruby
20:57
uranoss has joined #ruby
20:58
clemens3 has quit [Ping timeout: 276 seconds]
21:01
dar123 has joined #ruby
21:01
jottr has quit [Ping timeout: 245 seconds]
21:03
prestorium has joined #ruby
21:12
weteamsteve has quit [Ping timeout: 276 seconds]
21:13
nowhereman has quit [Ping timeout: 244 seconds]
21:17
m_antis has quit [Read error: Connection reset by peer]
21:23
ua_ has joined #ruby
21:25
ua has quit [Ping timeout: 245 seconds]
21:28
AndreYuhai has joined #ruby
21:31
<
AndreYuhai >
Hello there, I have this example string "J & M AUTO BODY" that I need to add to my query string for making requests. But using CGI.escape or URI.escape does not work as expected. CGI.escape gives me "J+%26+M+AUTO+BODY", URI.escape gives me "J%20&%20M%20AUTO%20BODY". Is there a way to escape '&' instead of gsub and etc.?
21:34
<
havenwood >
AndreYuhai: what all do you want to escape beyond &?
21:35
<
havenwood >
&>> 'J & M AUTO BODY'.gsub('&') { '\&' }
21:35
jottr has joined #ruby
21:36
prestorium has quit [Quit: prestorium]
21:38
<
AndreYuhai >
havenwood: I just want to escape ampersand properly as it should be. & => %26
21:38
<
AndreYuhai >
I mean gsub works as well but I was wondering whether there is any other way.
21:39
ur5us has joined #ruby
21:40
<
havenwood >
&>> URI.escape 'J & M AUTO BODY', '&'
21:40
<
havenwood >
AndreYuhai: ^
21:41
<
AndreYuhai >
&>> URI.escape 'J & M AUTO BODY', '& '
21:42
<
AndreYuhai >
havenwood: This worked as expected but I didn't know about that second parameter. Thanks I will check out the docs.
21:42
jottr has quit [Ping timeout: 246 seconds]
21:44
jenrzzz has joined #ruby
21:48
jenrzzz has quit [Ping timeout: 246 seconds]
21:51
ur5us has quit [Read error: Connection reset by peer]
21:51
weteamsteve has joined #ruby
21:51
ur5us has joined #ruby
21:59
AndreYuhai has quit [Quit: Leaving]
21:59
jottr has joined #ruby
22:00
dinfuehr_ has quit [Ping timeout: 250 seconds]
22:01
fphilipe has joined #ruby
22:01
dinfuehr has joined #ruby
22:04
jottr has quit [Ping timeout: 246 seconds]
22:05
reber has quit [Read error: Connection reset by peer]
22:06
fphilipe has quit [Ping timeout: 257 seconds]
22:09
houhoulis has quit [Remote host closed the connection]
22:18
m_antis has joined #ruby
22:20
jottr has joined #ruby
22:25
jottr has quit [Ping timeout: 268 seconds]
22:41
jottr has joined #ruby
22:46
jottr has quit [Ping timeout: 250 seconds]
22:46
clemens3 has joined #ruby
22:55
lucasb has joined #ruby
22:55
hightower2 has quit [Ping timeout: 246 seconds]
22:55
jottr has joined #ruby
22:59
queip has quit [Ping timeout: 258 seconds]
23:15
E3lit3h4XX0r666 has joined #ruby
23:16
jelera has joined #ruby
23:17
agent_white has quit [Remote host closed the connection]
23:17
RyanMcCoskrie has joined #ruby
23:18
queip has joined #ruby
23:19
Swyper has joined #ruby
23:20
jottr has quit [Ping timeout: 258 seconds]
23:21
Swyper has quit [Remote host closed the connection]
23:21
Swyper has joined #ruby
23:23
RyanMcCoskrie has quit [Ping timeout: 244 seconds]
23:23
jottr has joined #ruby
23:23
segy has joined #ruby
23:27
jottr has quit [Ping timeout: 246 seconds]
23:27
Swyper has quit [Remote host closed the connection]
23:28
Swyper has joined #ruby
23:31
sameerynho has quit [Ping timeout: 246 seconds]
23:37
clemens3 has quit [Ping timeout: 250 seconds]
23:39
weird_error has quit [Quit: weird_error]
23:42
xco has quit [Quit: xco]
23:43
ByronJohnson has quit [Ping timeout: 245 seconds]
23:43
jottr has joined #ruby
23:47
agent_white has joined #ruby
23:50
landakram has joined #ruby
23:55
landakram has quit [Ping timeout: 246 seconds]
23:55
jottr has quit [Ping timeout: 246 seconds]
23:58
TomyLobo has quit [Read error: Connection reset by peer]
23:59
chaus has joined #ruby