Skip to content

Commit

Permalink
Backwards Compatible Dotenv::Environment
Browse files Browse the repository at this point in the history
* Commit 7f82f73 introduced a backwards-incompatible change with
  the current API with respect to `Dotenv::Environment#intialize`
  by changing the method signature.
* Make the new parameter default to false to retain backwards
  compatibility.
* Similar changes were made for `Dotenv::Parser` in bkeepers#338.

SEE: bkeepers#323
SEE: bkeepers#338
  • Loading branch information
jessedoyle committed May 1, 2018
1 parent 089e9bd commit 6894e83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dotenv/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ module Dotenv
class Environment < Hash
attr_reader :filename

def initialize(filename, is_load)
def initialize(filename, is_load = false)
@filename = filename
load(is_load)
end

def load(is_load)
def load(is_load = false)
update Parser.call(read, is_load)
end

Expand Down

0 comments on commit 6894e83

Please sign in to comment.