I'd like to split and do a substitution in a string in one chained command. Here's my example including the error message:
>> filebase
=> "Ueki_-_Hello_World"
>> filebase.split("_-_").gsub("_"," ")
NoMethodError: private method `gsub' called for ["Ueki", "Hello_World"]:Array
from (irb):16
It works when I save the result of "split" in a temporary variable. Do I really need that?