<ox1eef_>
havenwood: Yeah, I saw it on stdgems.org too. For some reason I don't have it installed locally. I ended up going with test-unit. More or less the same for Minitest::Test-style tests.
<Nonato>
I have two applications, A and B. When I was configuring nginx, only with the HTTP protocol, application A accessed its content, and b respectively, but when putting SSL, application A continued to access its content, but application B only to access the contents of application A, although all the settings in the NGINX configuration files point to
<Nonato>
their respective directories.
<Nonato>
Has any of your friends been through this situation?
<ruby[bot]>
panella32: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<panella32>
p integers = odds_n_ends.select(&:is_a?(Integer))
eddof13 has joined #ruby
<havenwood>
panella32: You can: odds_n_ends.grep(Integer)
<ox1eef_>
Nice!
<panella32>
havenwood thanks a lot for the suggestion, tbh I am totally new to the language and just wanted to know what wrong with that syntax?
<havenwood>
panella32: The `:is_a?` turns into `:is_a?.to_proc` via the `&` and doesn't take an argument, which is why it doesn't work.
<havenwood>
>> :is_a?.to_proc(Integer)
<ruby[bot]>
havenwood: # => wrong number of arguments (given 1, expected 0) (ArgumentError) (https://carc.in/#/r/ejiz)
gonix has joined #ruby
<panella32>
havenwood thank you! Now it's clear.
<havenwood>
panella32: You can: odds_n_ends.select { _1.is_a?(Integer) }
<havenwood>
Or `grep` and `grep_v` are the fancy ways to filter and reject.
<panella32>
May I know what that _1 is?
<havenwood>
panella32: It's an alternative syntax for block arguments. You could write instead: odds_n_ends.select { |odd_n_end| odd_n_end.is_a?(Integer) }
myusername_ has joined #ruby
<havenwood>
I'd just: grep(Integer)
<ox1eef_>
They're typically called "numbered parameters" if you want to do a google search for them.
<myappie>
Pretty odd, "vgrep" used to be my nickname in highschool
<myappie>
I used to hate it until this blonde in my class told me how much she liked it :thumbsup:
<panella32>
havenwood wow! Your knowledge is very impressive! Thanks a lot! Learned couple good things just in a few minutes! Nice way to learn Ruby!
<myappie>
panella32: Havenwood's the man!
myusername has quit [Ping timeout: 252 seconds]
<panella32>
myappie No doubt :)
kovital has quit [Ping timeout: 246 seconds]
aphorise has joined #ruby
<aphorise>
Is there a way I can parallel run my ruby script via `ruby file.rb` rather than for example launching it on 3x separate terminal sessions?
<Nonato>
it worked here guys, when implementing SSL in the domains, Certbot reconfigured the server blocks.
<panella32>
havenwood sorry I tagged you again just so curious to know if there's any course you suggest? The other day I completed a basic Ruby course on Udemy and for now I am quickly reviewing it with codecademy, and after that I am going to find a course on Rails. ngl based on your great answer I cannot wait to see which course/platform a true-pro rubyist is going to suggest :)
eddof13 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]