Do programs written in Ruby work on both Windows and Linux?

Asked

Viewed 70 times

1

It is a doubt that I have regarding this programming language.

The Java, for example, has no distinction of SO’s, because it has something like a ONLY internal, so it does not need a port specific to each ONLY. The same code works for both Linux and Windows, however, there are languages that have distinction, as in the case of C. But I learned Ruby not long ago, and after a few tests I realized I didn’t have to do a port specific to my code run for each ONLY (Windows and Linux).

  • In the Ruby there is no need to do ports specific to a a given programme run in each ONLY?
  • The program works on both systems (Windows and Linux) regardless of which you choose to develop?

I thank anyone who can answer me.

Obs.: ONLY = Operating System

1 answer

1


The platform Ruby owns the Ruby MRI - To implementation reference for interpreters of this language, written in C.

The repository official testing of specifications Ruby informs that the Ruby MRI wheel in 30 platforms:

ruby/spec is known to be tested in These implementations for Every commit:

  • MRI on 30 Platforms and 4 versions
  • Jruby on Travis for Both 1.7 and 9.x
  • Truffleruby on Travis
  • Opal on Travis

In short, the compatibility of an application Ruby with different platforms can be broken if algorithms interact directly with particular features of a Operating System (eg.: Windows, Linux, Macos)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.