I had finished writing a piece of software in Ruby in for Linux and wanted to test it also on PC. Since the software involved reading in some data from files, I wanted to be sure that the pathnames could be handled on PC. In Lisp, this is handled with relative ease where it's possible to specify the subdirectory of interest, and the file(s) within that, and it's up to the Lisp implementation to handle the differences between different operating systems. I was rather expecting something similar for Ruby (given its influence from Lisp), but to my surprise, the official documentation on the File class had no information that I could find as to how pathnames would be handled differently on different operating systems. Then I looked at the docs for the Ruby IO class , and found the information there. It says: Ruby will convert pathnames between different operating system conventions if possible. For instance, on a Windows system the filename "/gumby/ruby/test.rb" will ...
Things about code and tech that I'm learning along the way. You can also find this blog in Gemini space at gemini://gemlog.blue/users/verachell/