Friday, May 9, 2014

How can I put the output of a code in a buffer ?

Say I wrote  a code :-

input = ['a','b','b','b','a','a','b','c','c']

prev = 0
output = input.slice_before do |e|
  input[prev = prev + 1] != e
end.to_a

p output

Now when I will run - !ruby %, I want the output to come to a new separate buffer in the same tab. how to do the same ?


 
Regards,
Arup Rakshit

No comments: