SecureRandom and CSV gems

Hi,

I’ve seen here that there are some issues using gems with the SU API:-

Does the above apply to default gems like SecureRandom and CSV (which I think are already and always installed)? Is it necessary to “mak[e] a copy of the gem you want to use and wrap it in your own namespace” as the above link says, Or is it OK to just go ahead and use: require ‘securerandom’ and require ‘csv’? Perhaps, for compatibility with various versions of SU (and the Ruby API therein), it is necessary.

Thanks,

Yes, as long as they are unmodified, as distributed with SketchUp’s Ruby.
They are actually part of the Ruby Standard Library and only recently distributed as default gems.
So just use them as you always did use any of the standard libraries that come with Ruby.

But if you need to modify them or need a specific version to support your extension, then you would need to wrap the modified library in your own namespace module or your extension’s submodule.

Thanks Dan for your helpful response.