Burdette Lamar
Burdette Lamar

Reputation: 259

How to make irb output the same on Ubuntu and Windows?

I'm have irb 1.4.1 (2021-12-25) on Windows 10 and Ubuntu 16.04. On Windows, When I type in irb 1+2, on Windows I get # => 3, but on Ubuntu I get => 3.

For me this is not a trivial matter, because I generate hundreds of examples for ruby-lang.org, using irb on both systems; I need the output to be the same, so that the examples are consistent.

Thanks for any help.

Upvotes: 2

Views: 55

Answers (1)

Burdette Lamar
Burdette Lamar

Reputation: 259

I've found irb conf.return format, which is different on the two systems. To set in irb, conf.return_format = "# => %s\n".

Upvotes: 1

Related Questions