« Back to channel list

#ruby - 27 March 2019

« Back 1 day Forward 1 day »
[00:02:56] asat: we reached out to rubygems, they pulled it
[00:14:51] livcd: has joined #ruby
[00:30:03] Mia: has joined #ruby
[00:30:03] Mia: has joined #ruby
[00:35:43] Cra2yZer0: has joined #ruby
[00:37:04] Cra2yZer0: has joined #ruby
[00:41:03] Swyper: has joined #ruby
[00:41:48] Cra2yZer0: has joined #ruby
[00:44:56] tAn: has joined #ruby
[00:48:51] AJA4351: has joined #ruby
[00:49:39] jinie: has joined #ruby
[00:50:02] bambanx: has joined #ruby
[00:55:31] Tau: has joined #ruby
[01:08:01] tdy1: has joined #ruby
[01:21:50] D9: has joined #ruby
[01:28:44] Swyper: has joined #ruby
[01:29:17] orbyt_: has joined #ruby
[01:39:08] t0xik: has joined #ruby
[01:41:24] crankharder: has joined #ruby
[01:45:25] esrse: has joined #ruby
[01:48:12] Swyper: has joined #ruby
[01:57:24] Emmanuel_Chanel: has joined #ruby
[01:58:37] Swyper: has joined #ruby
[02:01:32] mangold: has joined #ruby
[02:06:48] Swyper: has joined #ruby
[02:06:48] orbyt_: has joined #ruby
[02:06:48] s00pcan: has joined #ruby
[02:07:35] s00pcan: ok, got a question related to rbenv. I installed a gem, yarn, found it out was a webserver, then uninstalled it. But rbenv keeps trying to create a ~/.rbenv/shims/yarn file to override my system executable. Why?
[02:11:57] s00pcan: Where is rbenv rehash getting its list of executables?
[02:19:19] havenwood: s00pcan: it looks at the bin/ dir for the rubies listed by rbenv-versions: https://github.com/rbenv/rbenv/blob/master/libexec/rbenv-rehash#L85-L87
[02:19:44] havenwood: https://github.com/rbenv/rbenv/blob/master/libexec/rbenv-versions
[02:20:00] s00pcan: I just ran rbenv rehash with strace, checking the output now
[02:23:07] havenwood: s00pcan: you might want to sanity check `gem which yarn`, `which -a yarn` and `head -n1 "$(command -v yarn)"`
[02:23:37] s00pcan: ok, so it was checking the directories in ~/.rbenv/bundles, then looping over those and checking each directory's ./bin for executables
[02:23:54] havenwood: s00pcan: time for chruby? :P
[02:24:02] s00pcan: two of my projects had the yarn packager executable there, which is not a ruby executable
[02:24:42] s00pcan: so this was dumb but at least I know what went wrong
[02:25:38] s00pcan: havenwood: chruby? Is that new hotness?
[02:25:58] s00pcan: hmm no updates since 2017
[02:26:28] havenwood: s00pcan: a new version might be out fairly soon. it *just works* so there's not a lot of need for updates.
[02:27:14] havenwood: s00pcan: the main functionality is this one file: https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh
[02:27:21] truenito: has joined #ruby
[02:27:42] havenwood: s00pcan: then you can optionally add .ruby-version switching for zsh/bash: https://github.com/postmodern/chruby/blob/master/share/chruby/auto.sh
[02:28:04] s00pcan: my vuejs app has an obvious memory leak that wasn't there… this is what I get for mass updating node modules
[02:28:14] s00pcan: wasn't there last week I mean.
[02:29:10] havenwood: https://thepracticaldev.s3.amazonaws.com/i/qulbq6dl1svpo6hxmqkl.png
[02:38:50] adam12: havenwood: lol
[02:57:02] arekushi: has joined #ruby
[02:57:09] Arahael: has joined #ruby
[02:57:36] Arahael: I've been rather confused, I thought if I specify an environment to IO.popen, it should use that environment? Eg: IO.popen(env, cmd)
[02:58:00] Arahael: However, I have the suspicion that it's still inheriting the parent environment, especially when I use env={}
[02:58:18] Arahael: How do I ensure that the environment truely is empty?
[03:04:15] adam12: Arahael: You likely need to pass a bunch of `nil`'s with corresponding keys that exist in current ENV.
[03:04:39] adam12: Arahael: passing an environment to IO.popen is the same as Process.spawn I believe, which is just a merge of environments and not a clean-room.
[03:04:55] iMadper: has joined #ruby
[03:04:59] iMadper: has joined #ruby
[03:05:35] adam12: Arahael: Actually, I'm not sure if IO.popen supports it, but Process.spawn supports `unsetenv_others: true` which will clean missing env variables. Maybe that's what you want.
[03:08:11] Arahael: adam12: Hmm, thanks, that does help actually.
[03:08:42] Arahael: Helps explain that I'm not going crazy: "This command works differently in the script, but fails on the command line"! :)
[03:08:53] Arahael: ACTION might still be crazy, none-the-less.
[03:09:45] adam12: Arahael: lol
[03:13:07] yokel: has joined #ruby
[03:20:20] mangold: has joined #ruby
[03:24:38] hightower3: has joined #ruby
[03:26:38] daqing: has joined #ruby
[03:27:03] i1nfusion: has joined #ruby
[03:27:35] hahuang65: has joined #ruby
[03:29:58] ur5us: has joined #ruby
[03:42:10] _whitelogger: has joined #ruby
[03:42:12] yield: has joined #ruby
[03:57:07] Swyper: has joined #ruby
[03:58:31] hahuang6-: has joined #ruby
[04:05:03] hahuang65: has joined #ruby
[04:05:34] soloxdead: has joined #ruby
[04:06:27] mangold: has joined #ruby
[04:06:57] soloxdead: I am unfamiliar with ruby, however I am trying to open a program that I have always opened without a problem, but now receiving this error ''cannot load such file -- bundler/setup'
[04:07:18] soloxdead: I have went into the directory, and ran bundle install which went successfully, however same error.
[04:07:33] soloxdead: any ideas or tips that may help?
[04:10:25] braincrash: has joined #ruby
[04:13:10] havenwood: soloxdead: Is Bundler installed for your current Ruby? Sanity check `which bundle` and `gem which bundler`.
[04:13:20] hahuang65: has joined #ruby
[04:14:17] roger_rabbit: has joined #ruby
[04:14:33] havenwood: soloxdead: If it's not installed on your current Ruby: gem install bundler
[04:15:45] duderonomy: has joined #ruby
[04:17:00] soloxdead: havenwood: when running 'gem which bundler' i receive /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler.rb
[04:17:12] hahuang6-: has joined #ruby
[04:17:32] soloxdead: havenwood: which bundle returns /usr/local/bin/bundle
[04:18:09] havenwood: soloxdead: hrmm, it seems the `bundle` in front of your PATH isn't the same as the one installed with your current Ruby
[04:19:28] havenwood: soloxdead: i'm assuming your `gem env gemdir` is?: /usr/share/rubygems-integration/all/gems/bundler-1.17.3
[04:20:13] soloxdead: havenwood: it returns: /var/lib/gems/2.5.0
[04:20:36] havenwood: soloxdead: mind gisting your?: gem env
[04:22:17] soloxdead: havenwood: https://dpaste.de/Dp9x
[04:22:53] Swyper: has joined #ruby
[04:24:06] havenwood: soloxdead: okay, i'm wrong - it looks like you just have an executable path that doesn't happen to be inside your GEM_PATH
[04:27:25] havenwood: soloxdead: what's the command you're running that results in the error?
[04:28:08] soloxdead: havenwood: msfconsole
[04:29:02] Xiti: has joined #ruby
[04:29:30] havenwood: soloxdead: does it work with?: bundle exec msfconsole
[04:30:26] soloxdead: complete error would be [*] Bundler failed to load and returned this error: 'cannot load such file -- bundler/setup' [*] You may need to uninstall or upgrade bundler
[04:31:09] havenwood: soloxdead: And the same error if you prefix `bundle exec` to the command?
[04:31:14] soloxdead: havenwood: that did work!
[04:31:48] havenwood: soloxdead: 👍🏽
[04:32:38] soloxdead: havenwood: any reason why that would have changed?
[04:34:14] havenwood: soloxdead: When you run just `msfconsole` you're using the latest version of each gem that metasploit depends on. If one of those gems gets updated so it's no longer compatible with you app, your app might break. Prefixing `bundle exec` to the command "runs the app in the context of your bundle," meaning it uses the exact versions of gems specified in the Gemfile.lock.
[04:34:44] havenwood: soloxdead: TL;DR: A gem got updated. Prefixing `bundle exec` ensures the gem versions known to work are used.
[04:35:06] soloxdead: havenwood: ahh alright!
[04:35:21] soloxdead: havenwood: Thanks for the help and info!
[04:36:37] havenwood: soloxdead: you're welcome!
[04:37:04] jcarl43: has joined #ruby
[04:37:19] havenwood: I've suggested Bundler change their logo to "Prefix `bundle exec` or it's not your bundle!" but I didn't actually open a PR. ¯\_(ツ)_/¯
[04:37:38] havenwood: Here's what that would look like: https://i.imgur.com/9P4SpWl.png
[04:38:48] havenwood: ooh, Bundler has a new logo! now my silliness is woefully dated
[04:46:05] Xiti: has joined #ruby
[04:47:56] tdy1: has joined #ruby
[04:50:53] Renich: has joined #ruby
[04:57:46] Renich_: has joined #ruby
[05:09:33] sauvin: has joined #ruby
[05:11:23] aupadhye: has joined #ruby
[05:15:50] contradictioned: has joined #ruby
[05:19:50] kapil____: has joined #ruby
[05:27:58] SeepingN: has joined #ruby
[05:33:02] hahuang65: has joined #ruby
[05:40:16] Renich_: has joined #ruby
[05:46:04] mochiyoda: has left #ruby: ("Konversation terminated!")
[06:07:57] v01d4lph4: has joined #ruby
[06:11:57] Swyper: has joined #ruby
[06:12:15] Swyper: has joined #ruby
[06:18:47] conta: has joined #ruby
[06:21:23] zeroquake: has joined #ruby
[06:22:15] zeroquake: If hash x is not initialized and is nil , how do i safely call/return nil when i do something like x[:something]
[06:25:02] reber: has joined #ruby
[06:25:59] Swyper: has joined #ruby
[06:33:17] yield: has joined #ruby
[06:38:22] yield: has joined #ruby
[06:49:42] aqd: has joined #ruby
[06:54:10] _whitelogger: has joined #ruby
[06:55:36] havenwood: zer, ah, too late
[06:56:18] havenwood: &>> nil&.[](:something)
[06:56:20] rubydoc: # => nil (https://carc.in/#/r/6lc4)
[06:56:29] havenwood: &>> nil&.dig(:something)
[06:56:29] rubydoc: # => nil (https://carc.in/#/r/6lc5)
[07:02:25] aufi: has joined #ruby
[07:04:43] M0bPsycho: has joined #ruby
[07:09:58] ferr: has joined #ruby
[07:12:04] dinfuehr_: has joined #ruby
[07:18:42] olspookishmagus: has joined #ruby
[07:24:10] pwnd_nsfw`: has joined #ruby
[07:27:21] andikr: has joined #ruby
[07:29:10] dinfuehr: has joined #ruby
[07:29:23] clemens3: has joined #ruby
[07:32:55] dinfuehr_: has joined #ruby
[07:42:36] nones: has joined #ruby
[07:49:33] jmcgnh: has joined #ruby
[07:54:04] pwnd_nsfw: has joined #ruby
[08:11:12] someuser: has joined #ruby
[08:13:29] Milos: has joined #ruby
[08:14:46] TomyWork: has joined #ruby
[08:15:51] M0bPsycho: has joined #ruby
[08:17:59] Swyper: has joined #ruby
[08:18:31] clemens3: has joined #ruby
[08:18:51] _joes_: has joined #ruby
[08:19:05] lxsameer: has joined #ruby
[08:24:30] Swyper: has joined #ruby
[08:26:03] schleppel: has joined #ruby
[08:29:17] _joes_: has joined #ruby
[08:37:16] za1b1tsu: has joined #ruby
[08:52:53] Milos: has joined #ruby
[09:01:18] dhollin3: has joined #ruby
[09:03:29] _joes_: has joined #ruby
[09:03:58] claudiuinberlin: has joined #ruby
[09:05:22] _joes_: has joined #ruby
[09:09:07] aqd: has joined #ruby
[09:12:24] mikecmpbll: has joined #ruby
[09:24:20] mangold: has joined #ruby
[09:33:15] yield: has joined #ruby
[09:37:18] yield: has joined #ruby
[09:41:17] alem0lars: has joined #ruby
[09:42:10] ur5us: has joined #ruby
[09:44:56] balo: does anyone running puma in clustered mode on ruby 2.6.2 and having shutdown issues with systemd?
[09:47:09] Swyper: has joined #ruby
[09:48:19] hightower3: has joined #ruby
[09:52:50] _joes_: has joined #ruby
[09:56:39] kyrylo: has joined #ruby
[09:57:04] alem0lars: has joined #ruby
[09:58:40] dionysus69: why is there no to_sym! method :\
[09:58:56] dionysus69: var = var.to_sym
[10:00:26] akem: has joined #ruby
[10:02:25] tbuehlmann: dionysus69: there's String#to_sym, but String#to_sym! doesn't make sense
[10:03:08] dionysus69: dunno, i would expect it would change object type to symbol too
[10:03:14] dionysus69: https://gist.github.com/webzorg/d66931fa9e6036f440e8ce72e5a06800
[10:03:19] dionysus69: how would you optimize this?
[10:03:56] phaul: you can't change an objects type
[10:04:20] dionysus69: I guess I didnt know that pretty important detail xD
[10:06:33] tbuehlmann: what's your usecase? why is it that you don't know var's type? there's Symbol#to_sym as well, which should be a no-op, so `var = var.to_sym` would work. also, why do you need it as a symbol?
[10:06:56] dionysus69: I know I could just know what I will pass in
[10:07:06] dionysus69: just trying to overengineer a bit
[10:09:03] dionysus69: was there a precompilation step before 2.6's new JIT compiler? as I now know, the new JIT compiler compiles code and then runs
[10:11:20] kyrylo: has joined #ruby
[10:23:14] ams__: has joined #ruby
[10:27:50] lido: has joined #ruby
[10:27:50] lido: has joined #ruby
[10:41:31] johnny56: has joined #ruby
[10:42:15] Devalo: has joined #ruby
[10:47:05] gregf_: has joined #ruby
[10:48:45] ellcs: has joined #ruby
[11:00:17] mozzarella: has joined #ruby
[11:01:52] gigintsune: has joined #ruby
[11:01:58] gigintsune: has left #ruby: ()
[11:05:05] Sylario: has joined #ruby
[11:12:59] yield: has joined #ruby
[11:15:38] jrafanie: has joined #ruby
[11:15:44] Swyper: has joined #ruby
[11:20:57] octos: has joined #ruby
[11:29:27] AJA4350: has joined #ruby
[11:31:15] ldnunes: has joined #ruby
[11:32:06] v01d4lph4: has joined #ruby
[11:32:33] i1nfusion: has joined #ruby
[11:48:17] _joes_: has joined #ruby
[11:48:33] layer: has joined #ruby
[12:08:11] DmitryBochkarev: has joined #ruby
[12:22:09] bmurt: has joined #ruby
[12:38:34] ravioli: has joined #ruby
[12:59:05] _joes_1: has joined #ruby
[13:00:54] _joes_: has joined #ruby
[13:10:07] i1nfusion: has joined #ruby
[13:27:19] dostoyevsky: has joined #ruby
[13:28:11] marmotini_: has joined #ruby
[13:29:48] D9: has joined #ruby
[13:30:40] marmotini: has joined #ruby
[13:32:04] griffindy: has joined #ruby
[13:36:54] crankharder: has joined #ruby
[13:41:45] SeepingN: has joined #ruby
[13:43:30] dviola: has joined #ruby
[13:48:11] griffindy: has joined #ruby
[13:55:16] aupadhye: has joined #ruby
[14:00:03] Deesl: has joined #ruby
[14:00:04] Rapture: has joined #ruby
[14:00:41] vondruch_: has joined #ruby
[14:02:46] Swyper: has joined #ruby
[14:03:16] crankharder: has joined #ruby
[14:05:32] agent_white: has joined #ruby
[14:05:50] kapil____: has joined #ruby
[14:08:49] Swyper: has joined #ruby
[14:11:44] leah2: has joined #ruby
[14:19:16] lucasb: has joined #ruby
[14:31:43] spacesuitdiver: has joined #ruby
[14:38:10] stryek: has joined #ruby
[14:38:57] Swyper: has joined #ruby
[14:40:28] layer: has joined #ruby
[14:45:17] Tau: has joined #ruby
[14:50:18] grilix: has joined #ruby
[15:00:33] yokel: has joined #ruby
[15:13:27] Dbugger: has joined #ruby
[15:24:55] Swyper: has joined #ruby
[15:25:24] rippa: has joined #ruby
[15:26:06] LenPayne: has joined #ruby
[15:26:11] alem0lars_: has joined #ruby
[15:27:14] PepeLePewPew: has joined #ruby
[15:27:57] Cuzner: has joined #ruby
[15:32:58] crankharder: The AWS ruby sdk doesn't support showing progress for multipart uploads. As such, I'm trying to PUT that request with something super low level that could spit information s.t. I can figure out upload speed and time to completion. So, +
[15:33:27] crankharder: I'm looking for something super low level that I can PUT a file and somwhoe get progress. not sure if I'm looking in the right place in net/http, or if there's something else I could look at. Any suggestions?
[15:34:27] crankharder: in short: how can I PUT a file to some endpoint and get some output that I can calculate progress from?
[15:34:58] polishdub: has joined #ruby
[15:35:01] Renich: has joined #ruby
[15:36:16] i1nfusion: has joined #ruby
[15:40:26] brool: has joined #ruby
[15:40:46] spacesuitdiver: has joined #ruby
[15:41:26] zleap: has joined #ruby
[15:41:26] zleap: has joined #ruby
[15:42:46] mangold: has joined #ruby
[15:51:32] Inline: has joined #ruby
[15:57:28] DmitryBochkarev: has joined #ruby
[16:02:19] Ai9zO5AP: has joined #ruby
[16:03:16] Deesl: has joined #ruby
[16:17:43] Azure: has joined #ruby
[16:18:47] tdy1: has joined #ruby
[16:19:14] Swyper: has joined #ruby
[16:24:31] havenwood: dionysus69: since Ruby 1.9, CRuby has had a virtual machine (YARV) that parses the grammar and compiles to an abstract syntax tree (AST) as an intermediary representation before compiling on to machine code.
[16:24:31] Lytol: has joined #ruby
[16:24:59] havenwood: dionysus69: Here's an article I wrote about Ruby's JIT that introduces the basics: https://medium.com/square-corner-blog/rubys-new-jit-91a5c864dd10#662a
[16:35:56] havenwood: crankharder: yes, you can do streaming uploads with net/http, but you have to do it manually
[16:36:19] havenwood: crankharder: some other Ruby HTTP libs support it more directly
[16:36:58] havenwood: crankharder: take a look at the "streaming upload" column on this spreadsheet: https://docs.google.com/spreadsheets/d/1vPlk6nMIFa3sI5ISl7zZ5r6lDNpVQX6Jxi3ksXCyVbs/edit?usp=sharing
[16:37:35] havenwood: crankharder: https://journal.missiondata.com/streaming-data-to-s3-with-ruby-fee0681ffa49
[16:38:30] Swyper: has joined #ruby
[16:40:05] alem0lars__: has joined #ruby
[16:40:10] orbyt_: has joined #ruby
[16:40:12] zachk: has joined #ruby
[16:41:17] Stan: has joined #ruby
[16:46:24] faitswulff: has joined #ruby
[16:46:56] mikecmpbll: has joined #ruby
[16:47:12] SuperLag: has joined #ruby
[16:52:17] conta: has joined #ruby
[16:53:03] orbyt_: has joined #ruby
[16:53:42] hiroaki: has joined #ruby
[16:54:08] SuperL4g: has joined #ruby
[16:55:49] Devalo: has joined #ruby
[17:00:23] granitepub: has joined #ruby
[17:08:16] Devalo: has joined #ruby
[17:13:59] rob264: has joined #ruby
[17:15:38] gnufied: has joined #ruby
[17:28:21] r29v: has joined #ruby
[17:29:42] zachk: has joined #ruby
[17:40:53] reber: has joined #ruby
[17:47:58] CrazyEddy: has joined #ruby
[17:48:13] Devalo: has joined #ruby
[17:52:01] Nicmavr: has joined #ruby
[18:00:24] Swyper: has joined #ruby
[18:03:29] laaron-: has joined #ruby
[18:03:42] Devalo: has joined #ruby
[18:03:47] crankharder: havenwood: thanks, yea i found a streaming example for a get request in the net/http docs here: http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Streaming+Response+Bodies
[18:03:51] crankharder: thanks for those other links!
[18:06:24] jrafanie: has joined #ruby
[18:06:30] jinie: has joined #ruby
[18:07:27] i1nfusion: has joined #ruby
[18:12:06] gix: has joined #ruby
[18:14:15] Swyper: has joined #ruby
[18:15:21] jinie_: has joined #ruby
[18:19:16] Deesl: has joined #ruby
[18:26:49] jinie: has joined #ruby
[18:27:40] cagomez: has joined #ruby
[18:27:54] Swyper: has joined #ruby
[18:35:04] orbyt_: has joined #ruby
[18:36:33] jcarl43: has joined #ruby
[18:41:26] Swyper: has joined #ruby
[18:42:54] nowhere_man: has joined #ruby
[18:51:50] poguez_: has joined #ruby
[18:52:44] kyrylo: has joined #ruby
[18:53:59] clemens3: has joined #ruby
[19:05:20] claudiuinberlin: has joined #ruby
[19:27:59] mikecmpbll: has joined #ruby
[19:29:04] Xiti: has joined #ruby
[19:35:02] crankharder: havenwood: where do you see that http.rb supports streaming uploads? I dont see anything in the readme wiki or yard docs over there: https://github.com/httprb/http
[19:37:38] crankharder: fwiw, not sure i've found any lib that can stream a file upload and provide status of that upload whlie it's in progress
[19:48:32] Devalo: has joined #ruby
[19:53:31] jrafanie: has joined #ruby
[19:54:00] brool: has joined #ruby
[20:03:40] brool: i have a map on a string i'm trying to do a caesar cypher on, and i don't understand why my map function isn't returning on the first line for chars that aren't included in the alphabet. https://ghostbin.com/paste/rqbqg
[20:04:00] brool: on line 6 it should just return c when c isn't alphabetic, right?
[20:05:17] adam12: brool: Are you missing a call to `return` on that line?
[20:05:42] brool: adam12: i was pretty sure `return` would terminate the map
[20:05:53] adam12: brool: Oh right. You likely want next.
[20:06:05] brool: adam12: but i *do* want to spit out that char
[20:06:11] brool: so i don't loose spaces and punctuation
[20:06:32] adam12: brool: You should be able to `next c unless alphabet.include? c.downcase`
[20:08:21] brool: adam12: that did it
[20:09:24] SeepingN: has joined #ruby
[20:10:04] fredolinhares: has joined #ruby
[20:11:12] brool: actually that introduces a new bug
[20:11:34] brool: sending capital letters through will translate only the first capital letter and then let all the next letters through un-mutated
[20:12:26] brool: "test TEST test" (offset 2) => "vguv VEST test"
[20:12:46] Devalo: has joined #ruby
[20:12:48] adam12: brool: presumably you might be mutating alphabet? I didn't look and it's a wild guess.
[20:12:50] brool: if i remove `next`, then it works with capitals again but fails to catch non-alphabetic characters
[20:13:02] brool: i'm not mutating alphabet
[20:13:07] adam12: brool: but a = alphabet; a.upcase! but be mutating alphabet by reference.
[20:13:14] ur5us: has joined #ruby
[20:13:22] brool: it should copy by value :/
[20:13:31] brool: let me test
[20:13:37] adam12: brool: It might be? I never bothered to look that closely, but it stuck out to me.
[20:13:47] dinfuehr_: has joined #ruby
[20:13:48] brool: ffffffff you're right
[20:13:51] brool: it copies by reference
[20:14:00] adam12: brool: just call dup on it. alphabet.dup.
[20:14:18] adam12: brool: or more specifically, a = alphabet.dup
[20:14:43] bmurt: has joined #ruby
[20:14:44] brool: works now
[20:15:04] brool: can't believe strings copy by reference >.>
[20:16:16] adam12: I wonder if there's a list of what's reference and value. I can't remember ever looking for one. But the bang-methods in stdlib stick out to me like a sore thumb for unintended side-effects.
[20:16:59] rindolf: has joined #ruby
[20:19:26] adam12: brool: frozen string literals would of likely caught it. `ruby --enable-frozen-string-literal caesar.rb` # caesar.rb:9:in `upcase!': can't modify frozen String (FrozenError)
[20:19:29] adam12: rindolf: o/
[20:20:06] brool: adam12: interesting. i was just running tests in pry after requiring my source file
[20:20:19] rindolf: adam12: hi
[20:30:02] Devalo: has joined #ruby
[20:31:52] Swyper: has joined #ruby
[20:59:50] iNs: has joined #ruby
[21:07:58] Fernando-Basso: has joined #ruby
[21:08:31] Azure: has joined #ruby
[21:10:37] _joes_: has joined #ruby
[21:12:08] kyrylo: has joined #ruby
[21:12:33] _joes_: has joined #ruby
[21:14:47] kyrylo: has joined #ruby
[21:16:18] griffindy: has joined #ruby
[21:23:47] Swyper: has joined #ruby
[21:38:47] _joes_: has joined #ruby
[21:48:19] _joes_: has joined #ruby
[22:09:41] gell5: has joined #ruby
[22:21:26] cagomez: I have the same set of methods that I need to delegate across classes. They only differ in the object they are delegating to. eg `delegate :id, to: :foo` in one class, and `delegate :id, to: :bar` in another. How do I define a module such that my classes only need to define `foo` or `bar`?
[22:24:57] phaul: def self.delegate_to(obj) ; %i(foo bar).each { |meth| def_delegator(obj, meth) ); end
[22:26:21] phaul: require 'forwardable'
[22:31:59] hahuang6-: has joined #ruby
[22:33:56] phaul: cagomez: https://gist.github.com/phaul/3b86fe7492a02ef4c934ee9f0d148836
[22:34:10] hahuang6-: has joined #ruby
[22:34:38] cagomez: phaul: thank you! looks perfect
[22:34:57] ellcs: has joined #ruby
[22:35:16] cagomez: how long have you worked with Ruby?
[22:36:58] phaul: few years :) not too long
[22:37:31] phaul: tried 1.8 something and sort of learnt it. then picked up 2.4 again
[22:40:16] jacksoow: has joined #ruby
[22:41:28] hahuang6-: has joined #ruby
[22:42:57] Swyper: has joined #ruby
[22:44:08] gell5: has joined #ruby
[22:59:37] moei: has joined #ruby
[23:00:34] kent\n: has joined #ruby
[23:09:27] conta: has joined #ruby
[23:11:49] levifig: has joined #ruby
[23:13:30] Deesl: has joined #ruby
[23:18:29] gell5: has joined #ruby
[23:24:58] dsuper7: has joined #ruby
[23:29:23] clemens3_: has joined #ruby
[23:29:54] houhoulis: has joined #ruby
[23:30:20] jrafanie: has joined #ruby
[23:31:25] Deesl: has joined #ruby
[23:34:39] dsuper7: has joined #ruby
[23:43:07] dsuper7: has joined #ruby
[23:52:06] gell5: has joined #ruby