Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move File and IO::FileDescriptor's platform-specific parts to Crystal::System #5333

Merged
merged 3 commits into from Dec 13, 2017

Commits on Dec 13, 2017

  1. Separate platform-specific parts of IO::FileDescriptor

    In order to add windows support to Crystal, IO::FileDescriptor cannot depend on
    posix APIs. Here, we refactor out the platform-specific parts of
    IO::FileDescriptor into a mixin module in Crystal::System. Some
    platform-specific methods are refactored out of methods which contain both
    platform-specific and cross-platform behaviour. These methods are prefixed with
    `system_` and are private.
    RX14 committed Dec 13, 2017
    Copy the full SHA
    85c32c7 View commit details
    Browse the repository at this point in the history
  2. Make Tempfile inherit File

    Making Tempfile inherit from File allows the instance to be passed to methods
    which expect File, and makes Tempfile much more powerful. This requires adding a
    new private constructor to File which sets @path and calls super.
    RX14 committed Dec 13, 2017
    Copy the full SHA
    66daccf View commit details
    Browse the repository at this point in the history
  3. Separate platform-specific parts of File

    Similar to previous patch: Separate platform-specific parts of
    IO::FileDescriptor.
    RX14 committed Dec 13, 2017
    Copy the full SHA
    586846d View commit details
    Browse the repository at this point in the history