I guess you could also do

attr_reader :blah

but I kind of like the more explicit style in this case.

Anyone do

attr_reader :blah
private :blah

? Just occurred to me as a way to avoid `@blah` inside the class but also avoid exposing instance variables to the world.

I've updated the eligibility requirements for getting a free commercial license to DragonRuby Game Toolkit. The income eligibility has been relaxed. And I've added a bullet point for teachers, mentors, parents. You can read it all at dragonruby.org

Please boost <3

Ruby Easter egg 

Noooooo... Ruby! Why?! 😭

2.5.1 :001 > a = [1, 2, 3]
=> [1, 2, 3]
2.5.1 :002 > a [2]
=> 3
2.5.1 :003 > a [2] = 4
=> 4
2.5.1 :004 > a[2]
=> 4

(Note space before brackets)

RubyGems 3 released! blog.rubygems.org/2018/12/19/3

looks like Ruby 2.6 on Christmas is landing with RubyGems 3 and Bundler 2


Random Ruby performance tip: if you are using anything more complicated than strings/symbols for hash keys, you may want to consider caching their hash values (override the Object#hash method to do so).

I wrote up a blog post about how I found some easily-addressed performance issues in RubyParser: blog.presidentbeef.com/blog/20

Thanks to @zenspider as always for the great gem!

I need to remember this for writing weird Ruby:

def x a
yield a

x -> do
end do |y|
puts y[]

git config --global diff.algorithm patience

Ahhhhh that's so much better.

Already gave up. Generating the XML by hand instead.

Actually going to use REXML. Wish me luck. 👷

can someone in the Rails world (aka: core team) help resolve this? github.com/rails/execjs/pull/7. it fixes multiple bugs across several projects, but no one is picking it up

Hi all!
I've been using Ruby since at least 2006. I use Seattle style and I'm not (too) ashamed of it. A while back I created a Rails security tool called Brakeman that people seem to like.


A Mastodon instance for Rubyists & friends