No person shall be excused from attending and testifying or producing any books, papers, or other documents, before any court or magistrate, upon any investigation, proceeding, or trial for a violation of any of the provisions of § 27-4-6, upon the ground or for the reason that the testimony or evidence, documentary or otherwise, required of that person may tend to convict him or her of a crime or subject him or her to a penalty or forfeiture. No person shall be prosecuted or subjected to any penalty or forfeiture for or on account of any transaction, matter, or thing concerning which that person may testify or produce evidence, documentary or otherwise, and no testimony given or produced shall be received against him or her upon any criminal investigation or proceeding.
R.I. Gen. Laws § 27-4-7