   _regenerateGlobals: ->
     @GLOBALS = require('extend') true, {}, @_GLOBALS_DEFAULTS.defaults, (@_GLOBALS_DEFAULTS[gutil.env.env || "development"] || {})
 
-    for k, v of @GLOBALS
+    Object.keys(@GLOBALS).forEach (k) =>
       # You can replace any of @GLOBALS by defining ENV variable in your command line,
       # f.e. `BUNDLE_ID="com.different.bundleid" gulp`
       @GLOBALS[k] = process.env[k] if process.env[k]? && @GLOBALS[k]?

          else
            "www"

        # However, you can set this flag to true, and we'll change it to a random directory.
        # Could be useful f.e. in unit/e2e tests
        TMP_BUILD_DIR: false


      # `gulp --BUNDLE_ID="com.different.bundleid"`
      @GLOBALS[k] = gulp.env[k] if gulp.env[k]? && @GLOBALS[k]?

      # Last but not least, if a @GLOBALS[k] is a function,
      # then let's define it as a dynamic getter
      #
      # More information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
      if typeof @GLOBALS[k] == "function"
        getter = @GLOBALS[k]
        Object.defineProperty @GLOBALS, k, get: => getter(@GLOBALS)

    @filterPublicGlobals(@_PUBLIC_GLOBALS_KEYS)
    @filterShellGlobals(@_SHELL_GLOBALS_KEYS)
