matlab-ruby 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 1.0.1 / 2007-04-27
2
+
3
+ * 1 bug fix
4
+ * Need to check for nil value during MATLAB to Ruby StructMatrix conversion otherwise it segfaults
5
+
1
6
  == 1.0.0 / 2007-04-06
2
7
 
3
8
  * 1 major enhancement
@@ -123,7 +123,7 @@ module Matlab
123
123
  n.times do |column_index|
124
124
  m.times do |row_index|
125
125
  value = Matlab::Driver::Native::API.mxGetCell(matrix, index).to_ruby
126
- cell_matrix[row_index, column_index] = (value.to_s == nil.to_matlab.to_s ? nil : value)
126
+ cell_matrix[row_index, column_index] = (value.nil? || value.to_s == nil.to_matlab.to_s ? nil : value)
127
127
  index += 1
128
128
  end
129
129
  end
@@ -165,7 +165,7 @@ module Matlab
165
165
  n.times do |column_index|
166
166
  names.each do |name|
167
167
  value = Matlab::Driver::Native::API.mxGetField(matrix, index, name)
168
- struct_matrix[row_index, column_index][name] = (Matlab::Driver::Native::API.mxIsEmpty(value) || value.to_ruby.to_s == nil.to_matlab.to_s ? nil : value.to_ruby)
168
+ struct_matrix[row_index, column_index][name] = (value.nil? || Matlab::Driver::Native::API.mxIsEmpty(value) || value.to_ruby.to_s == nil.to_matlab.to_s ? nil : value.to_ruby)
169
169
  end
170
170
  index += 1
171
171
  end
@@ -4,7 +4,7 @@ module Matlab
4
4
 
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
- TINY = 0
7
+ TINY = 1
8
8
 
9
9
  STRING = [ MAJOR, MINOR, TINY ].join( "." )
10
10
  #:beta-tag:
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: matlab-ruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-04-08 00:00:00 -06:00
6
+ version: 1.0.1
7
+ date: 2007-04-27 00:00:00 -06:00
8
8
  summary: A Ruby interface to the Matlab interpreted language.
9
9
  require_paths:
10
10
  - lib