Sha256: eaf2c2606da1ae6ef3b0d5909fb2536a0e8815939505c5e2946eab8534e804d2

Contents?: true

Size: 320 Bytes

Versions: 16

Compression:

Stored size: 320 Bytes

Contents

class ::Dir
  class << self
    def chdir(dir)
      prev_cwd = `Opal.current_dir`
      `Opal.current_dir = #{dir}`
      yield
    ensure
      `Opal.current_dir = #{prev_cwd}`
    end

    def pwd
      `Opal.current_dir || '.'`
    end

    def home
      ::ENV['HOME'] || '.'
    end

    alias getwd pwd
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
opal-1.7.4 opal/corelib/dir.rb
opal-1.7.3 opal/corelib/dir.rb
opal-1.7.2 opal/corelib/dir.rb
opal-1.7.1 opal/corelib/dir.rb
opal-1.7.0 opal/corelib/dir.rb
opal-1.7.0.rc1 opal/corelib/dir.rb
opal-1.6.1 opal/corelib/dir.rb
opal-1.6.0 opal/corelib/dir.rb
opal-1.6.0.rc1 opal/corelib/dir.rb
opal-1.6.0.alpha1 opal/corelib/dir.rb
opal-1.5.1 opal/corelib/dir.rb
opal-1.5.0 opal/corelib/dir.rb
opal-1.5.0.rc1 opal/corelib/dir.rb
opal-1.4.1 opal/corelib/dir.rb
opal-1.4.0 opal/corelib/dir.rb
opal-1.4.0.alpha1 opal/corelib/dir.rb