Hello!
I have never written Ruby before but played around with getting a function, script to run it, and test working.
So far it is quite fun!
To run the script:
ruby flat_array_script.rb [1,2,4,6,[1,2,5,[2],6],3]
The array can be replaced with any nested array!
To run the test
ruby flat_array_test.rb