datasift/datasift-ruby — pull request #45 by LeeXGreen (2014-03-13 20:34:09+00:00)
Title: [examples] The historic examples do not work properly

Running a historical example from the root of the tree:

`ruby -I. examples/historics/list.rb $MY_DS_USERNAME $MY_DS_API_KEY`

Yields the following error:

```
$MY_DIR/gem_datasift/lib/DataSift/user.rb:35:in `strip!': can't modify frozen String (RuntimeError)
from $MY_DIR/gem_datasift/lib/DataSift/user.rb:35:in `initialize'
from $MY_DIR/gem_datasift/examples/historics/env.rb:20:in `new'
from $MY_DIR/gem_datasift/examples/historics/env.rb:20:in `initialize'
from examples/historics/list.rb:14:in `new'
from examples/historics/list.rb:14:in `

'
```

This is because, in Ruby, command-line arguments are frozen (immutable).

This could probably be fixed in env.rb as well, but this fix is sufficient for my needs.