malloc 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +3 -3
  2. data/lib/malloc_ext.rb +8 -0
  3. metadata +3 -3
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
7
7
  require 'rbconfig'
8
8
 
9
9
  PKG_NAME = 'malloc'
10
- PKG_VERSION = '1.3.4'
10
+ PKG_VERSION = '1.3.5'
11
11
  CFG = RbConfig::CONFIG
12
12
  CXX = ENV[ 'CXX' ] || 'g++'
13
13
  RB_FILES = FileList[ 'lib/**/*.rb' ]
@@ -15,7 +15,7 @@ CC_FILES = FileList[ 'ext/*.cc' ]
15
15
  HH_FILES = FileList[ 'ext/*.hh' ] + FileList[ 'ext/*.tcc' ]
16
16
  TC_FILES = FileList[ 'test/tc_*.rb' ]
17
17
  TS_FILES = FileList[ 'test/ts_*.rb' ]
18
- SO_FILE = "ext/#{PKG_NAME}.#{CFG[ 'DLEXT' ]}"
18
+ SO_FILE = "ext/#{PKG_NAME.tr '\-', '_'}.#{CFG[ 'DLEXT' ]}"
19
19
  PKG_FILES = [ 'Rakefile', 'README.md', 'COPYING', '.document' ] +
20
20
  RB_FILES + CC_FILES + HH_FILES + TS_FILES + TC_FILES
21
21
  BIN_FILES = [ 'README.md', 'COPYING', '.document', SO_FILE ] +
@@ -46,7 +46,7 @@ desc 'Compile Ruby extension (default)'
46
46
  task :all => [ SO_FILE ]
47
47
 
48
48
  file SO_FILE => OBJ do |t|
49
- sh "g++ #{$LDSHARED} -o #{t.name} #{OBJ} #{$LIBRUBYARG}"
49
+ sh "#{CXX} #{$LDSHARED} -o #{t.name} #{OBJ} #{$LIBRUBYARG}"
50
50
  end
51
51
 
52
52
  task :test => [ SO_FILE ]
data/lib/malloc_ext.rb CHANGED
@@ -92,6 +92,14 @@ module Hornetseye
92
92
 
93
93
  # Duplicate object
94
94
  #
95
+ # @example Duplicating a Malloc object
96
+ # m = Malloc.new 3
97
+ # m.write 'aaa'
98
+ # n = m.dup
99
+ # n.write 'bbb'
100
+ # m.read 3
101
+ # "aaa"
102
+ #
95
103
  # @return [Malloc] A new malloc object with a copy of the data.
96
104
  def dup
97
105
  retval = Malloc.new @size
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 3
8
- - 4
9
- version: 1.3.4
8
+ - 5
9
+ version: 1.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-27 00:00:00 +01:00
17
+ date: 2010-11-17 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency