Ruby .collect not executing in Atom Runner


#1

Hi, i’m just starting to learn Ruby and practicing with Atom. It’s been working fine, but I encountered this code that produces no results on Atom Runner: I looked at other discussions and found no reference to this so I created a new topic.

a = [“a”, “b”, “c”, “d”]
a.collect {|x| x + “!”}

However, if I run the same code on irb, it produces the expected results.

Am I missing something? Thanks for your help!


#2

Are you able to run different Ruby code in atom-runner?


#3

Hi,

Yes I have been running several other Ruby code examples and they all worked fine, it is this one that I can’t get to work with Atom.

Trauton


#4

What happens when you run the same code from a different package? script is configured to run Ruby by default according to its documentation, and packages like process-palette and termination can be used for more detailed testing.


#5

I tried this in script and atom-runner and both don’t output anything unless I specifically print something out e.g.:

a = ["a", "b", "c", "d"]
puts a.collect {|x| x + "!"}