Write a function to sort an array of integers in ascending order in Ruby
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
Ruby
🤖 Code Explanation
This code defines a method called sort_array, which accepts an array as an argument. The method sorts the array in ascending order and returns the sorted array.
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
More problems solved in Ruby
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)
![](https://cdn-icons-png.flaticon.com/512/919/919842.png)