Skip to content

Commit

Permalink
Added some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wedesoft committed Nov 17, 2010
1 parent eec23bf commit 5668758
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
require 'rbconfig'

PKG_NAME = 'malloc'
PKG_VERSION = '1.3.4'
PKG_VERSION = '1.3.5'
CFG = RbConfig::CONFIG
CXX = ENV[ 'CXX' ] || 'g++'
RB_FILES = FileList[ 'lib/**/*.rb' ]
Expand Down
8 changes: 8 additions & 0 deletions lib/malloc_ext.rb
Expand Up @@ -92,6 +92,14 @@ def inspect

# Duplicate object
#
# @example Duplicating a Malloc object
# m = Malloc.new 3
# m.write 'aaa'
# n = m.dup
# n.write 'bbb'
# m.read 3
# "aaa"
#
# @return [Malloc] A new malloc object with a copy of the data.
def dup
retval = Malloc.new @size
Expand Down

0 comments on commit 5668758

Please sign in to comment.