« Back to channel list

#ruby - 20 December 2018

« Back 1 day Forward 1 day »
[00:00:24] Arkantos: has joined #ruby
[00:01:56] Arkantos: has joined #ruby
[00:03:19] Arkantos: has joined #ruby
[00:03:31] hutch: has joined #ruby
[00:04:20] JoshS: has joined #ruby
[00:04:47] Arkantos: has joined #ruby
[00:08:15] uplime: has joined #ruby
[00:08:30] nowhere_man: has joined #ruby
[00:18:57] blackmesa: has joined #ruby
[00:24:25] dbz_: has joined #ruby
[00:25:11] cnsvc_: has joined #ruby
[00:36:23] hutch: has joined #ruby
[00:43:57] evdubs: has joined #ruby
[00:54:00] jthomas1: has joined #ruby
[00:54:32] m0w: has joined #ruby
[00:54:35] kapil____: has joined #ruby
[00:56:47] Renich: has joined #ruby
[00:58:19] Exuma: has joined #ruby
[01:00:16] orbyt_: has joined #ruby
[01:03:20] elphe: has joined #ruby
[01:03:29] ixti: has joined #ruby
[01:04:32] havenwood: cah, oh - they left :(
[01:05:41] havenwood: &>> 0.1.yield_self.to_a.pack(?g).unpack1('B*')
[01:05:41] rubydoc: # => "00111101110011001100110011001101" (https://carc.in/#/r/5ttx)
[01:06:58] havenwood: ACTION does a binary solo
[01:09:49] blackmesa: has joined #ruby
[01:10:39] Exuma: has joined #ruby
[01:18:13] tiff: has joined #ruby
[01:18:34] Exuma: has joined #ruby
[01:19:48] remi: has joined #ruby
[01:21:16] Arkantos: has joined #ruby
[01:23:05] tiff: has joined #ruby
[01:31:36] elphe: has joined #ruby
[01:38:51] bmurt: has joined #ruby
[01:40:11] cnsvc_: has joined #ruby
[01:49:19] haylon: has joined #ruby
[01:57:23] AJA4350: has joined #ruby
[02:07:51] cnsvc_: has joined #ruby
[02:20:26] Exuma: has joined #ruby
[02:23:10] nine_milli: has joined #ruby
[02:23:11] ChanServ: +b *!*@c-76-28-115-114.hsd1.ct.comcast.net
[02:23:11] ChanServ: ChanServ kicked nine_milli: is banned from this channel
[02:25:08] cnsvc_: has joined #ruby
[02:27:49] EminenceHC: has joined #ruby
[02:28:21] tiff: has joined #ruby
[02:35:33] Arkantos: has joined #ruby
[02:38:53] tiff: has joined #ruby
[02:40:44] tiff: has joined #ruby
[02:44:05] iovis: has joined #ruby
[02:54:22] Exuma: has joined #ruby
[02:56:06] tiff: has joined #ruby
[02:58:42] nowhereman: has joined #ruby
[02:59:11] tiff: has joined #ruby
[02:59:38] jthomas1: has joined #ruby
[03:01:00] akem: has joined #ruby
[03:10:52] Tau: has joined #ruby
[03:23:42] tiff: has joined #ruby
[03:36:30] dbz: has joined #ruby
[03:51:02] Azure: has joined #ruby
[03:56:10] haylon: has joined #ruby
[03:57:57] Exuma: has joined #ruby
[04:03:24] dinfuehr: has joined #ruby
[04:10:04] braincrash: has joined #ruby
[04:16:21] cnsvc_: has joined #ruby
[04:19:51] roshanavand: has joined #ruby
[04:24:53] Freshnuts: has joined #ruby
[04:36:16] cnsvc_: has joined #ruby
[04:39:15] code_zombie: has joined #ruby
[04:39:26] dbz: has joined #ruby
[04:42:05] dbz: has joined #ruby
[04:48:22] sauvin: has joined #ruby
[04:51:17] AndBobsYourUncle: has joined #ruby
[04:51:54] Exuma: has joined #ruby
[05:07:53] roshanavand: has joined #ruby
[05:09:01] davidw: has joined #ruby
[05:15:36] dbz: has joined #ruby
[05:17:04] Fusl: has joined #ruby
[05:18:08] dbz: has joined #ruby
[05:33:29] roshanavand: has joined #ruby
[05:35:15] paranoicsan: has joined #ruby
[05:38:24] dbz: has joined #ruby
[05:58:30] jthomas1: has joined #ruby
[06:00:08] klaas: has joined #ruby
[06:10:29] venmx: has joined #ruby
[06:17:53] venmx_: has joined #ruby
[06:30:46] roshanavand: has joined #ruby
[06:39:36] endemic: has joined #ruby
[06:42:52] stooj: has joined #ruby
[06:47:27] coderphive: has joined #ruby
[06:51:56] rippa: has joined #ruby
[06:56:41] clemens3_: has joined #ruby
[06:58:58] za1b1tsu: has joined #ruby
[06:59:35] s3nd1v0g1us: has joined #ruby
[07:00:14] aupadhye: has joined #ruby
[07:08:06] neuraload: has joined #ruby
[07:12:53] kapil____: has joined #ruby
[07:25:54] tiff: has joined #ruby
[07:30:52] ansraliant: has joined #ruby
[07:40:12] conta: has joined #ruby
[07:41:40] cats: has joined #ruby
[07:41:59] coderphive6: has joined #ruby
[07:42:37] coderphive: has joined #ruby
[07:48:37] Furai: has joined #ruby
[07:56:12] blackmesa: has joined #ruby
[07:59:41] cnsvc_: has joined #ruby
[08:09:15] marz_d`ghostman: has joined #ruby
[08:09:50] marz_d`ghostman: Why is the job I'm passing in to concurrent-ruby doesn't seem to be registered. Tried to output completed_task_count but it's zero: https://gist.github.com/marzdgzmn/e42976cfd10a45690d29e751104d0f7a
[08:18:33] Zarthus: has joined #ruby
[08:21:46] dviola: has joined #ruby
[08:57:17] akem: has joined #ruby
[09:00:01] keden: has joined #ruby
[09:06:27] m0w: has joined #ruby
[09:09:04] mikecmpbll: has joined #ruby
[09:10:14] powerbit: has joined #ruby
[09:11:55] m0w: has joined #ruby
[09:12:44] paranoicsan: has joined #ruby
[09:15:23] cnsvc_: has joined #ruby
[09:16:25] powerbit: has joined #ruby
[09:18:07] dionysus69: has joined #ruby
[09:21:23] akem: has joined #ruby
[09:43:06] Guest49234: has joined #ruby
[09:49:05] venmx: has joined #ruby
[09:49:09] venmx_: has joined #ruby
[09:53:21] cnsvc_: has joined #ruby
[09:53:38] prestorium: has joined #ruby
[09:59:31] jthomas1: has joined #ruby
[10:01:07] jottr: has joined #ruby
[10:19:11] Guest78161: has joined #ruby
[10:32:28] mikecmpb_: has joined #ruby
[10:39:38] Exagone313: has joined #ruby
[10:45:50] paranoicsan: has joined #ruby
[10:46:23] phaul: has joined #ruby
[10:49:17] coderphive: has joined #ruby
[10:53:25] saTchymoto: has joined #ruby
[11:15:35] venmx: has joined #ruby
[11:19:18] mikecmpbll: has joined #ruby
[11:21:08] alxd: Is there any Ruby OpenAPI / Swagger gem which works as well as Django REST Swagger?
[11:21:35] Guest78161: has joined #ruby
[11:23:07] alxd: I found https://github.com/fotinakis/swagger-blocks to be popular, but it requires writing stuff by hand for every single view
[11:23:15] alxd: s/view/endpoint/
[11:31:14] lambarena: has joined #ruby
[11:40:14] RougeR: has joined #ruby
[11:54:45] paranoicsan: has joined #ruby
[12:00:37] lypsis: has joined #ruby
[12:00:37] yokel: has joined #ruby
[12:05:13] keden: has joined #ruby
[12:06:55] lypsis: has joined #ruby
[12:11:30] dbz: has joined #ruby
[12:12:00] RougeRR: has joined #ruby
[12:15:36] lypsis: has joined #ruby
[12:17:03] lypsis: has joined #ruby
[12:19:52] lucasb: has joined #ruby
[12:26:06] keden: has joined #ruby
[12:33:19] Guest78161: has joined #ruby
[12:34:51] Guest49234: has joined #ruby
[12:36:12] Sylario: has joined #ruby
[12:38:05] m0w: has joined #ruby
[12:41:18] cnsvc_: has joined #ruby
[12:46:58] keden: has joined #ruby
[12:55:55] Guest49234: has joined #ruby
[12:57:46] mostlybadfly: has joined #ruby
[12:58:25] m0w: has joined #ruby
[12:59:10] jthomas1: has joined #ruby
[13:12:40] saTchymoto: has joined #ruby
[13:15:49] roshanavand: has joined #ruby
[13:19:39] Guest78161: has joined #ruby
[13:26:23] Zarthus_: has joined #ruby
[13:32:03] bathtub_shark: has joined #ruby
[13:37:16] EminenceHC: has joined #ruby
[13:39:42] cd: has joined #ruby
[13:45:45] AJA4350: has joined #ruby
[13:46:22] tjarvis: has joined #ruby
[13:47:13] Guest49234: has joined #ruby
[13:57:26] bmurt: has joined #ruby
[14:04:14] alan_w: has joined #ruby
[14:09:31] ixti: has joined #ruby
[14:14:49] regedit: has joined #ruby
[14:23:59] paranoicsan: has joined #ruby
[14:27:17] Guest49234: has joined #ruby
[14:31:47] haylon: has joined #ruby
[14:32:55] reber: has joined #ruby
[14:39:52] ellcs: has joined #ruby
[14:41:46] d10n-work: has joined #ruby
[14:42:25] jgpawletko: has joined #ruby
[14:46:22] akaiiro: has joined #ruby
[14:46:23] krawchyk: has joined #ruby
[14:48:02] Guest78161: has joined #ruby
[14:50:40] Inline: has joined #ruby
[14:57:01] catphish: has joined #ruby
[14:57:43] catphish: i'm a little confused, i found some documentation that states that Process.setproctitle will change a process name, but when i use it, it seems to instead change the cmdline
[14:57:59] catphish: which is correct? has this behaviour changed?
[14:58:57] jhass: I think it does different things on different platforms
[14:59:00] catphish: oh, i'm quite certain it changes the cmdline on linux, the documentation was on OSX
[14:59:04] jhass: best effort basically
[14:59:11] catphish: jhass: yeah you're right, thanks
[14:59:40] catphish: i'm quite happy with the cmdline behaviour, it shows up in process lists and isn't truncated as process names are
[15:15:37] armyriad: has joined #ruby
[15:16:22] ixti: has joined #ruby
[15:23:51] twobitsprite: has joined #ruby
[15:25:00] twobitsprite: I'm just now trying to learn a little ruby, coming from a python background... Looking at some docs, I two different block notations and I'm curious what the difference is between something like << Find.find("mydir") do |path| ... end >> and << Find.find("mydir
[15:25:22] twobitsprite: sorry << Find.find("mydir") { |path| ... } >>
[15:25:38] jhass: mostly style
[15:25:51] jhass: there's a technical differencence in precedence
[15:25:59] twobitsprite: jhass: ok, but the behavior is identical?
[15:26:16] jhass: foo bar do x end; # foo will receive the block
[15:26:28] jhass: foo bar { x }; # bar will receive the block
[15:27:16] jhass: but most people follow do/end for multiline, { / } for single line
[15:27:23] twobitsprite: Can you use parenthesis to affect that? I.e: foo (bar do x end)
[15:28:11] twobitsprite: cool... thanks :)
[15:28:18] jhass: there's also a semantic style some people follow, see http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/
[15:30:59] jhass: or for probably the earliest formulation https://web.archive.org/web/20041011120013/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc
[15:43:15] ixti: has joined #ruby
[15:44:00] Emmanuel_Chanel: has joined #ruby
[15:45:35] tjmcginnis: has joined #ruby
[15:47:14] jsc: has joined #ruby
[15:48:48] NL3limin4t0r: has joined #ruby
[15:51:05] jthomas1: has joined #ruby
[15:54:33] krawchyk: has joined #ruby
[15:56:12] NL3limin4t0r: Hey. I want the inform the maintainers of ruby-community.com that there are two links under resourses > links > tutorials & learning that changed. 1) The CodeCademy link changed, CodeCademy changed their file structure "https://www.codecademy.com/tracks/ruby" should be changed to "https://www.codecademy.com/learn/learn-ruby", "https://tryruby.org" is bought by Pluralsight and now redirects to
[15:56:14] NL3limin4t0r: "https://www.pluralsight.com/search?q=ruby" this should be changed to "https://ruby.github.io/TryRuby/".
[15:58:38] davidw: has joined #ruby
[15:59:52] impermanence: has joined #ruby
[16:01:37] krawchyk_: has joined #ruby
[16:02:49] zapata_: has joined #ruby
[16:07:59] status402: has joined #ruby
[16:15:19] prestorium: has joined #ruby
[16:19:59] spacesuitdiver: has joined #ruby
[16:21:47] krawchyk: has joined #ruby
[16:25:14] davidw: has joined #ruby
[16:28:12] Guest49234: has joined #ruby
[16:30:36] conta: has joined #ruby
[16:30:55] akaiiro: has joined #ruby
[16:34:15] twobitsprite: Trying to understand blocks/iterators/etc... I have a file with one word per line, and I'm trying to count the number of times each word is used in another file, so I'm trying to read the words file in to a hash. Here's what I have:
[16:34:19] twobitsprite: --module_list = Hash[File.readlines(__dir__ + "/modules.txt").each { |line| [line.strip, 0] }]
[16:34:45] twobitsprite: (oops, ignore the -- at the beginning, that's my editor)
[16:35:10] twobitsprite: anyway, module_list just ends up getting set to the raw lines, including the \n
[16:35:49] twobitsprite: What I'm trying to get is a hash like {word1: 0, word2: 0} etc
[16:36:31] catphish: has left #ruby: ("Leaving")
[16:38:04] phaul: twobitsprite: it's a each vs map misunderstanding
[16:38:15] rubydoc: I found 69 entries matching method each. Use &list each if you would like to see a list
[16:38:26] phaul: ffs rubydoc
[16:38:37] phaul: &ri Array#each
[16:38:37] rubydoc: https://ruby-doc.org/core-2.5.3/Array.html#method-i-each
[16:38:45] phaul: &ri Array.map
[16:38:46] rubydoc: Found no entry that matches class Array class method map
[16:39:00] phaul: &ri Enumerable#map
[16:39:00] rubydoc: https://ruby-doc.org/core-2.5.3/Enumerable.html#method-i-map
[16:48:24] impermanence46: has joined #ruby
[16:49:42] Emmanuel_Chanel: has joined #ruby
[16:50:52] cthulchu: has joined #ruby
[16:54:57] polishdub: has joined #ruby
[16:57:28] gnufied: has joined #ruby
[17:10:19] dbz: has joined #ruby
[17:13:43] epochwolf: has joined #ruby
[17:14:05] JoshS: has joined #ruby
[17:16:21] grenierm_: has joined #ruby
[17:18:39] cnsvc_: has joined #ruby
[17:21:50] Guest49234: has joined #ruby
[17:26:40] heydonovan: has joined #ruby
[17:29:09] themsay: has joined #ruby
[17:30:36] planigan: has joined #ruby
[17:36:14] prestori_: has joined #ruby
[17:36:37] RougeR: has joined #ruby
[17:37:29] nchambers: has joined #ruby
[17:47:35] marz_d`ghostman: has joined #ruby
[17:48:02] marz_d`ghostman: Why am I getting a ruby_executable_hooks: end of file reached (EOFError) when sending emails? https://gist.github.com/marzdgzmn/614969af17f74b3f6fdc2422d7c4cfae
[18:02:35] hiroaki: has joined #ruby
[18:02:45] ua: has joined #ruby
[18:09:01] themsay: has joined #ruby
[18:12:11] m0w: has joined #ruby
[18:12:47] marz_d`ghostman: I have created two ruby files under /config/initializers. How do I run one when I'm testing and the other when I'm not testing?
[18:13:03] themsay: has joined #ruby
[18:17:25] r29v: has joined #ruby
[18:18:56] orbyt_: has joined #ruby
[18:19:03] mikecmpbll: has joined #ruby
[18:19:03] code_zombie: has joined #ruby
[18:20:35] cnsvc_: has joined #ruby
[18:21:07] Exuma: has joined #ruby
[18:22:04] bmurt: has joined #ruby
[18:29:19] hiroaki: has joined #ruby
[18:29:53] jordanm: marz_d`ghostman: you can check Rails.env.test? in your initializer
[18:30:09] marz_d`ghostman: jordanm: I'm not using Rails though
[18:31:08] jordanm: what are you using that is loading config/initializers?
[18:32:15] marz_d`ghostman: under /lib I have my main ruby file say main.rb then I require the initializer file under project/config/initializers/production.rb via require File.join(__dir__, '../../config/initializers/production) in main.rb
[18:32:40] dellavg_: has joined #ruby
[18:33:03] marz_d`ghostman: the production.rb has this require line for Foo::Bar::Configuration but it doesn't seem to be able to find it though
[18:33:21] darkhanb: has joined #ruby
[18:33:22] marz_d`ghostman: it says cannot load such file -- foo/bar/configuration
[18:35:22] marz_d`ghostman: Ohhh, I may need to add it to load_path
[18:37:08] Pisuke: has joined #ruby
[18:43:52] hutch: has joined #ruby
[18:46:27] mostlybadfly: has joined #ruby
[19:01:11] nchambers: has joined #ruby
[19:02:44] postmodern: has joined #ruby
[19:05:13] justinmrkva: has joined #ruby
[19:11:24] twobitsprite: phaul: sorry, got pulled away... So, I'm just trying to understand the syntax/semantics... if I do << lines = File.readlines(__dir__ + "/modules.txt") >> I get an array of lines, with newlines, like I expect
[19:12:21] twobitsprite: phaul: but then if I do << lines.each { |line| line.strip } >> I still get lines with newlines at the end... I expected an array of stripped lines... so I guess that's where my misunderstanding is.
[19:12:33] phaul: twobitsprite: bascially what I said meant that .each returns the array unmodified
[19:12:50] twobitsprite: phaul: ahh, ok, so I need .map?
[19:12:54] stooj: has joined #ruby
[19:13:26] twobitsprite: phaul: so, .each is purely for side-effect?
[19:22:08] Dbugger: has joined #ruby
[19:22:38] samort7: has joined #ruby
[19:25:33] za1b1tsu: has joined #ruby
[19:36:14] conta: has joined #ruby
[19:37:08] akemot: has joined #ruby
[19:39:33] Arkantos: has joined #ruby
[19:53:57] Nicmavr: has joined #ruby
[19:59:27] elphe: has joined #ruby
[19:59:57] Arkantos: has joined #ruby
[20:18:05] themsay: has joined #ruby
[20:19:07] ixti: has joined #ruby
[20:24:37] Nicmavr: has joined #ruby
[20:27:07] Sembei: has joined #ruby
[20:37:31] lxsameer: has joined #ruby
[20:42:35] ua: >Warning, new version of rvm available '1.29.6', you are using older version '1.29.7'.
[20:44:31] orbyt_: has joined #ruby
[20:44:49] havenwood: ua: When a project is written in tens of thousands of lines of shell... the versions sometimes start going backwards.
[20:45:32] havenwood: ¯\_(ツ)_/¯
[21:00:04] hutch: has joined #ruby
[21:00:11] bjpenn: has joined #ruby
[21:06:11] roshanavand: has joined #ruby
[21:12:04] prestorium: has joined #ruby
[21:20:06] gix: has joined #ruby
[21:26:01] hahuang6-: has joined #ruby
[21:31:19] elcontrastador: has joined #ruby
[21:31:58] hutch: has joined #ruby
[21:37:49] dbz: has joined #ruby
[21:48:34] themsay: has joined #ruby
[21:49:17] Eiam: reminds me of all the people using ruby to parse version strings in macOS and getting that 10.10 was less than 10.9
[21:49:22] Nahra: has joined #ruby
[21:56:38] themsay: has joined #ruby
[22:02:36] havenwood: Eiam: It's kinda baffling how hard it is to do on BSD/macOS.
[22:03:01] havenwood: Eiam: GNU `sort` is nice with its -g, --general-numeric-sort
[22:03:45] agent_white: has joined #ruby
[22:04:42] havenwood: Eiam: I end up doing monstrosities like: sort -t "." -k "1,1" -k "2,2n" -k "3,3n" -k "4,4n"
[22:06:14] havenwood: Eiam: Reminds me of this PR: https://github.com/postmodern/chruby/pull/278
[22:19:51] \void: has joined #ruby
[22:21:27] m0w: has joined #ruby
[22:25:31] tiff: has joined #ruby
[22:32:12] nchambers: has joined #ruby
[22:34:35] themsay: has joined #ruby
[22:35:11] maetthew: has joined #ruby
[22:35:41] jottr: has joined #ruby
[22:43:58] themsay: has joined #ruby
[22:46:32] s3nd1v0g1us: has joined #ruby
[22:49:05] themsay: has joined #ruby
[22:56:31] Xenosine: has joined #ruby
[23:06:07] RougeR: has joined #ruby
[23:06:22] cthulchu: has joined #ruby
[23:06:32] jottr: has joined #ruby
[23:12:06] go|dfish: has joined #ruby
[23:18:20] ellcs: has joined #ruby
[23:24:07] stooj: has joined #ruby
[23:27:02] cd: has joined #ruby
[23:29:04] jsrtr: has joined #ruby
[23:30:14] jsrtr: I have to generate a hash for a rake task which looks like { "1" => 8, "2" => 16, ... }
[23:30:35] jsrtr: Is there some way to do that using a loop in line so the result is a constant?
[23:31:09] jsrtr: Oh hi @ixti
[23:32:23] havenwood: ua: It was a yak shave, but fixed. Just waiting on CI and a review to merge: https://github.com/rvm/rvm/pull/4539
[23:32:52] havenwood: jsrtr: How high do you want to go?
[23:34:01] havenwood: jsrtr: What's the third pair value? 24 or 32?
[23:34:24] jsrtr: So the first kvp would be "1" => 8 and the last would be "32" => 256
[23:34:35] jsrtr: The third would be 24
[23:34:41] jsrtr: "3" => 24
[23:35:17] jsrtr: Oh wait, you can pass a proc to the Hash constructor and it will call it when the hash is evaluated? O_o
[23:37:34] ixti: jsrtr: it's not called when evaluated
[23:37:39] ixti: It's default value proc
[23:38:01] havenwood: jsrtr: Yes, you can vivify. For example:
[23:38:02] havenwood: &>> jsrtr = Hash.new { |h, k| h[k] = k.to_i * 8 }; jsrtr['32']
[23:38:04] rubydoc: # => 256 (https://carc.in/#/r/5u1i)
[23:38:13] ixti: `Hash.new { 42 }[:xxx] # => 42`
[23:38:35] havenwood: &>> 1.upto(32).map { |n| [n.to_s, n * 8] }.to_h # jsrtr
[23:38:36] rubydoc: # => {"1"=>8, "2"=>16, "3"=>24, "4"=>32, "5"=>40, "6"=>48, "7"=>56, "8"=>64, "9"=>72, "10"=>80, "11"=>88, ...check link for more (https://carc.in/#/r/5u1j)
[23:38:38] ixti: havenwood: from description above at the end he needs to freeze
[23:39:01] jsrtr: Well, I guess it doesn't have to be a constant
[23:39:13] jsrtr: It's just a little rake task, no need to be that efficient
[23:39:17] havenwood: ixti: JSRTR = Hash.new { |h, k| h[k] = k.to_i * 8 }.freeze
[23:39:33] havenwood: ixti: it actually does work frozen
[23:39:44] havenwood: not that i'd do it
[23:39:52] ixti: `1.upto(32)` IMO is probably the best option
[23:40:15] havenwood: in 2.6, there's a slightly nicer version:
[23:40:19] havenwood: 1.upto(32).to_h { |n| [n.to_s, n * 8] }
[23:40:27] ixti: havenwood: it won't work forzen
[23:40:30] jsrtr: we're on 2.4
[23:40:46] havenwood: ixti: ah, yeah - you're right
[23:41:25] Eiam: havenwood: or just call the appkit API? =)
[23:42:01] havenwood: jsrtr: Or: Array.new(32) { |n| [n.succ.to_s, n.succ * 8] }.to_h
[23:42:35] ixti: IMO `1.upto(32).map { |i| [i.to_s, i * 8] }.to_h.freeze` looks cleaner
[23:42:36] havenwood: jsrtr: Or: 32.times.with_object({}) { |n, h| h[n.succ.to_s] = n.succ * 8 }
[23:42:54] havenwood: ixti: Yeah, that's what I'd do too.
[23:43:39] segy: has joined #ruby
[23:43:56] ixti: or: `1.upto(32).with_object({}) { |i, o| o[i.to_s] = i * 8 }.freeze` :D
[23:44:02] havenwood: ixti: I like the 2.6 way best. :)
[23:44:27] ixti: havenwood: no doubts, me too. I was actually going to add a shim for meself ;))
[23:46:20] ixti: `FutureIsUnwritten` module with refinements ;))
[23:49:29] jsrtr: I'm not clear on why to_h has to be used, but ok
[23:50:33] jsrtr: I guess the concept of a key-value pair doesn't exist outside the context of having a hash to contain it?
[23:51:04] s3nd1v0g1us: has joined #ruby
[23:52:01] havenwood: jsrtr: The new #to_h will create a Hash from a block. If you want to use an intermediary Array of pairs, the current #to_h is handy.
[23:54:42] RougeR: has joined #ruby
[23:55:27] spacesuitdiver: has joined #ruby
[23:56:03] isene: has joined #ruby
[23:56:14] jottr: has joined #ruby
[23:57:25] isene: Upgrade from 18.04 to 18.10: Now when I do "require 'fileutils'" I get "false". How do I fix this (a 2.5 issue?)?
[23:57:36] isene: (Ubuntu that is)