puts '%6.4g' % 123.456 # ' 123.5': four significant digits in field six chars wideputs '%3s' % 'ruby' # 'ruby': string argument exceeds field widthputs '%3.3s' % 'ruby' # 'rub': precision forces truncation of string