I have a class like this:
class Example
def printThisVar(printThing)
print 'this is the var: #{printThing}'
end
end
However, the string that is printed is printed is "this is the var: #{printThing}" not "this is the var: exampleText".
Is there any way to fix this? thanks!
Example.new.printThisVar("exampleText\n")and it behaved as expected.printis being overloaded somewhere in your code. Have you tried usingputsinstead ofprint?