RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

#to_s or #to_str? Explicitly casting vs. implicitly coercing types in Ruby

This week in AppSignal Academy: the difference between explicit casting (with #to_s) and implicit coercing (with #to_str) in Ruby, and the difference between typecasting Leonard Nimoy and Michael Keaton. 🖖🦇 http://blog.appsignal.com/2018/09/25/explicitly-casting-vs-implicitly-coercing-types-in-ruby.html

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in