summaryrefslogtreecommitdiff
path: root/sample/div.rb
blob: 27b6f328ca0ff705d7c8e0bef8a7a549b017b603 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'coderay'

puts CodeRay.scan(DATA.read, :ruby).div

__END__
for a in 0..255
	a = a.chr
	begin
		x = eval("?\\#{a}")
		if x == a[0]
			next
		else
			print "#{a}: #{x}"
		end
	rescue SyntaxError => boom
		print "#{a}: error"
	end
	puts
end