I had used Ruby 1.9 long ago and now I am trying Ruby 3.2 Fiddle. I tried the following snippet in the README.md, but it raised a NameError on the struct.
StudentCollegeDetail = struct [
'int college_id',
'char college_name[50]'
]
How can I use that struct? Where is the documentation of it?
Well, it was a stupid question. You can use the
structlike this.The documentation is at this.
As commented by Holger, the
Fiddle::Importeris designed to be used as an argument of theextend()inside a module like this.