Skip to content

Commit 6d7363e

Browse files
kotpsaltamay
andauthored
Update Symbol conversion text (#1607)
I believe `String#to_sym` should be used to present a string as a symbol not vice versa. Co-authored-by: Sal Tamay <[email protected]>
1 parent cefd4b8 commit 6d7363e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/concept/port-palermo/.docs/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The benefit of symbols being immutable is that they are more memory efficient th
4343

4444
Symbols can be converted to strings and vice versa.
4545
This can be useful when you want to modify a symbol, or when you want to use a symbol as a string.
46-
To present a symbol as a string, you can use the `String#to_sym` method, and to do the opposite, you can use the `Symbol#to_s` method.
46+
To present a string as a symbol, you can use the `String#to_sym` method, and to do the opposite, you can use the `Symbol#to_s` method.
4747
Due to symbols having a limited set of methods, it can be useful to convert a symbol to a string to use string methods on it, if a new symbol is needed.
4848

4949
```ruby

0 commit comments

Comments
 (0)