#ruby - 06 January 2019
« Back 1 day Forward 1 day »
[02:38:10] cnsvc: Ruby 2.5.3 has the same error.. I guess it's related to my setup. No idea how to figure out..
[02:39:21] baweaver: Worst case I'd report this on the Rails github page as something screwy is going on there
[02:42:49] hays: is this use of class_eval the way to implement something like attr_reader? https://mikeyhogarth.wordpress.com/2011/12/01/creating-your-own-attr_accessor-in-ruby/
[02:53:42] Iambchop: cnsvc: it looks like the BigDecimal warning was fixed in Rails 5.x: https://github.com/rails/rails/pull/31435 I don't know about the segfault :)
[03:11:10] poprocks: Dumb question, but I just upgraded from 2.2.10 to 2.5.3, and I now want to migrate my gems from /usr/lib/ruby/gems/2.2.0/* to 2.5.0/. Is there a simple 'gem' command (other than a for loop with a shell script running 'gem install' on all gems in 2.2.0 to migrate these to 2.5.0?
[03:34:58] poprocks: I landed up just doing it with a shell script. Very silly, but I know there has to be a better way (maybe this "rvm" thing is the answer).
[10:01:03] phaul: hays: define_method takes a symbol no need to convert. instance_variable_get also takes a symbol. As you were saying passing strings feels iffy but all these reflective methods work without strings, symbol is always an option
[13:39:13] phaul: for your method a can be anything that define_method accepts. why narrow it down. If define_method doesn't accept something it will raise exception, why do it's job half way?
[13:40:17] phaul: also if define_method accepts something new in the future or stops accepting something, it can handle it, your code wouldn't need to be modified.
[13:47:49] phaul: thinking about it, if one really wants to avoid instance_variable_get one could with instance_eval with a block and getting the value out into an outer local variable. But it's really just overcomplicating things.
[19:21:26] faraazahmad: Hi!, I've been using Ruby for quite a while now and I want to start making some contributions to it
[19:28:39] faraazahmad: Is there any beginner stuff i could do? it doesn't seem to have any filters for that
[19:33:03] go|dfish: faraazahmad: i'm not sure, sorry. hopefully someone with more knowledge can help.
[20:00:38] havenwood: faraazahmad: Documentation improvements is one nice thing that's more accessible.
[20:01:12] havenwood: faraazahmad: If Ruby is your strong suit, consider contributing to an implementation that is written in a much higher percent Ruby - like TruffleRuby.
[20:03:29] havenwood: faraazahmad: https://github.com/oracle/truffleruby/blob/master/doc/contributor/workflow.md
[20:07:18] havenwood: faraazahmad: For example, you could implement Array#append and Array#prepend from Ruby 2.5. You can see those failing specs with:
[20:08:31] havenwood: Actually, that one looks fun. I'm going to do it right now. Feel free to join me!
[20:10:24] havenwood: faraazahmad: There're also some doable RubyGems issues in Ruby. Or lots of Gems to contribute to, of course.
[20:11:07] havenwood: faraazahmad: Of if you're in a shell mood, I have lots of chruby, ruby-install and RVM issues to triage if you want to pair on one of those.