Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Are there some gotchas in the process of marshalling Ruby data types into .NET?

0
Posted

Are there some gotchas in the process of marshalling Ruby data types into .NET?

0

Yes. Ruby strings are mutable but are still marshalled by value to a .net System.String for convenience, so you need to be aware that subsequent changes to the original string will not be seen in .net. If the .net string is marshalled back to ruby it will be a new copy too. Ruby integers can be of arbitrary size. If a ruby integer is small enough to be represented by a .net int it will be, otherwise it is converted to a float with loss of precision as a result.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123