Skip to content

Commit

Permalink
Update ruby-doc links in Basic data types
Browse files Browse the repository at this point in the history
  • Loading branch information
isatsam authored Oct 23, 2023
1 parent 97b9866 commit c38cd32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby/basic_ruby/basic_data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ puts 'Hello, #{name}' #=> "Hello, #{name}"
#### Common string methods
There are many useful string methods that are built into Ruby. You need to capitalize a word? No problem! Reverse a string? Easy peasy. Extract the binary subatomic algorithm from any regex grep? We don't know, but since this is Ruby, let's go with *YES*.

Just remember, strings have loads of methods provided to you for free, and you can find them all in the [Ruby docs](https://ruby-doc.org/core-3.1.2/String.html). If you're working with strings and need to do something, check the Ruby docs first and see if there's a method that does it for you.
Just remember, strings have loads of methods provided to you for free, and you can find them all in the [Ruby docs](https://ruby-doc.org/3.2.2/String.html). If you're working with strings and need to do something, check the Ruby docs first and see if there's a method that does it for you.

Below is a quick recap of the more common string methods you might find yourself using:

Expand Down Expand Up @@ -266,7 +266,7 @@ To create a symbol, simply put a colon at the beginning of some text:
~~~

#### Symbols vs. strings
To get a better idea of how symbols are stored in memory, give this a whirl in irb or a REPL. The [`#object_id` method](https://ruby-doc.org/core-3.1.2/Object.html#method-i-object_id) returns an integer identifier for an object. (And remember: in Ruby, *everything* is an object!)
To get a better idea of how symbols are stored in memory, give this a whirl in irb or a REPL. The [`#object_id` method](https://ruby-doc.org/3.2.2/Object.html#method-i-object_id) returns an integer identifier for an object. (And remember: in Ruby, *everything* is an object!)

~~~ruby
"string" == "string" #=> true
Expand Down

0 comments on commit c38cd32

Please sign in to comment.