[MacRuby] #363: IO.copy_stream dont handle copyfile.
#363: IO.copy_stream dont handle copyfile. --------------------------------+------------------------------------------- Reporter: kazuhisa@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: --------------------------------+------------------------------------------- I try to run folloing script. {{{ src = open("a") dst = open("b","w+") IO.copy_stream(src,dst) src.close dst.close }}} I expected to run via copyfile function . but not. because src/dst object is indicated as not T_FILE by rb_type.(T_NATIVE) -- Ticket URL: <http://www.macruby.org/trac/ticket/363> MacRuby <http://macruby.org/>
#363: IO.copy_stream dont handle copyfile. --------------------------------+------------------------------------------- Reporter: kazuhisa@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by lsansonetti@…): Currently, copyfile() is only used if both operands are file paths (strings), otherwise we simulate it. If an operand is of T_FILE and if its seek offset is 0 and if it has a path, we could potentially use copyfile() too (and update the seek offset in case it's the destination operand). -- Ticket URL: <http://www.macruby.org/trac/ticket/363#comment:1> MacRuby <http://macruby.org/>
#363: IO.copy_stream dont handle copyfile. --------------------------------+------------------------------------------- Reporter: kazuhisa@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by kazuhisa@…): ok. understand. but i have one question. * why is this routine not ported from matzruby 1.9 without copyfille? if i copied IO via IO.copy_stream, all memory for copy is allocated ( examply fille size is 500M , 1 G) * BUILDIN_TYPE should not be called in rb_type before NATIVE(obj) ? * why fcopyfile is not used ? the reason is exists? ( sorry i dont know detail of fcopyfile specification .... ) -- Ticket URL: <http://www.macruby.org/trac/ticket/363#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby