Type-checking in Ruby 3 using RBS

Ruby 3 has introduced a new syntax language for dynamic typing called RBS. In short, it is a language that we can use to describe the data types used in a Ruby class. We can define the data type of variables and the return type of methods used in a class using RBS. Why do we need type-checking? Since Ruby is a dynamically typed language, we don't need to define the data type of the variables we are using. Ruby automatically assigns a type based on the variable's value at runtime. Let's take the below class as an example. # basic_

Introduction to Ractors in Ruby 3

Ruby 3 has introduced an experimental feature called Ractors. In this article, let's learn more about Ractor with example usage.