From: David Alan Black Date: 2002-01-12T13:20:14+09:00 Subject: RE: Another suggestion for FreeRIDE Hello -- I seem to be in thorn-in-the-side mode tonight :-) On Sat, 12 Jan 2002, Jack Dempsey wrote: > Here's the code for that: easy, but it'll do the subs...i left the > outputting of "require english.rb" to the end user... > > #!/usr/bin/ruby > > text = 'this is some text that uses variables like $!, $;, $=, and $0.' > > hash_map = { > '$!' => '$ERROR_INFO', > '$@' => '$ERROR_POSITION', # ... > } > > puts text > hash_map.each { |k,v| > text.gsub!(Regexp.escape(k),v) > } > puts text re = /[abc$!]$/ Trouble... David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav