@@ -456,28 +456,28 @@ Buffer.prototype.fill = function fill(val, start, end) {
456456
457457
458458// XXX remove in v0.13
459- Buffer . prototype . get = util . deprecate ( function get ( offset ) {
459+ Buffer . prototype . get = internalUtil . deprecate ( function get ( offset ) {
460460 offset = ~ ~ offset ;
461461 if ( offset < 0 || offset >= this . length )
462462 throw new RangeError ( 'index out of range' ) ;
463463 return this [ offset ] ;
464- } , '.get() is deprecated. Access using array indexes instead.' ) ;
464+ } , 'Buffer .get() is deprecated. Access using array indexes instead.' ) ;
465465
466466
467467// XXX remove in v0.13
468- Buffer . prototype . set = util . deprecate ( function set ( offset , v ) {
468+ Buffer . prototype . set = internalUtil . deprecate ( function set ( offset , v ) {
469469 offset = ~ ~ offset ;
470470 if ( offset < 0 || offset >= this . length )
471471 throw new RangeError ( 'index out of range' ) ;
472472 return this [ offset ] = v ;
473- } , '.set() is deprecated. Set using array indexes instead.' ) ;
473+ } , 'Buffer .set() is deprecated. Set using array indexes instead.' ) ;
474474
475475
476476// TODO(trevnorris): fix these checks to follow new standard
477477// write(string, offset = 0, length = buffer.length, encoding = 'utf8')
478478var writeWarned = false ;
479- const writeMsg = '.write(string, encoding, offset, length) is deprecated.' +
480- ' Use write(string[, offset[, length]][, encoding]) instead.' ;
479+ const writeMsg = 'Buffer .write(string, encoding, offset, length) is deprecated.'
480+ + ' Use write(string[, offset[, length]][, encoding]) instead.' ;
481481Buffer . prototype . write = function ( string , offset , length , encoding ) {
482482 // Buffer#write(string);
483483 if ( offset === undefined ) {
@@ -505,7 +505,7 @@ Buffer.prototype.write = function(string, offset, length, encoding) {
505505
506506 // XXX legacy write(string, encoding, offset, length) - remove in v0.13
507507 } else {
508- writeWarned = internalUtil . printDeprecationMessage ( writeMsg , writeWarned ) ;
508+ writeWarned = internalUtil . deprecate ( writeMsg , writeWarned ) ;
509509 var swap = encoding ;
510510 encoding = offset ;
511511 offset = length >>> 0 ;
0 commit comments