From: Aleksei Guzev Date: 2001-07-11T10:48:19+09:00 Subject: [ruby-talk:17636] RE: SWIG and strings # Given the .i file for swig: # %module example # class Test { # public: # string str; # # Test() { str = "putz"; } # }; # Class Test attr_reader :str def initialize @str = "putz" end End --- or --- Class Test def initialize @str = "putz" end def str @str end End These are equivalent and I prefere the latter.