# frozen_string_literal: false # # menubar sample 2 : use 'menu' option of root/toplevel widget # require 'tk' radio_var = TkVariable.new('y') menu_spec = [ [['File', 0], {:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0}, '---', ['Check_A', TkVariable.new(true), 6], {:type=>'checkbutton', :label=>'Check_B', :variable=>TkVariable.new, :underline=>6}, '---', ['Radio_X', [radio_var, 'x'], 6, '', {:foreground=>'black'}], ['Radio_Y', [radio_var, 'y'], 6], ['Radio_Z', [radio_var, 'z'], 6], '---', ['cascade', [ ['sss', proc{p 'sss'}, 0], ['ttt', proc{p 'ttt'}, 0], ['uuu', proc{p 'uuu'}, 0], ['vvv', proc{p 'vvv'}, 0], ], 0, '', {:font=>'Courier 16 italic', :menu_config=>{:font=>'Times -18 bold', :foreground=>'black'}}], '---', ['Quit', proc{exit}, 0]], [['Edit', 0], ['Cut', proc{puts('Cut clicked')}, 2], ['Copy', proc{puts('Copy clicked')}, 0], ['Paste', proc{puts('Paste clicked')}, 0]], [['Help', 0, {:menu_name=>'help'}], ['About This', proc{puts('Ruby/Tk menubar sample 2')}, 6]] ] mbar = Tk.root.add_menubar(menu_spec, # followings are default configure options 'tearoff'=>'false', 'foreground'=>'grey40', 'activeforeground'=>'red', 'font'=>'Helvetica 12 bold') # This (default configure options) is NOT same the following. # # mbar = Tk.root.add_menubar(menu_spec) # mbar.configure('foreground'=>'grey40', 'activeforeground'=>'red', # 'font'=>'Helvetica 12 bold') TkText.new(:wrap=>'word').pack.insert('1.0', 'Please read the sample source, and check how to override default configure options of menu entries on a menu_spec.') Tk.mainloop refslogtreecommitdiff
path: root/test/json/test_json_addition.rb
69b080e
AgeCommit message (Expand)Author
2013-02-12* ext/json: merge JSON 1.7.7.naruse
2012-12-12* ext/json: merge JSON 1.7.5.naruse
2012-05-07* ext/json: Merge JSON 1.7.1.naruse
2012-03-11* ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.naruse
2011-09-01Remove tests of json/add/{complex, rational}.naruse
2011-08-31* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).naruse
2011-08-30* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).naruse
2011-07-10* ext/json: Merge json gem 1.5.4+ (f7f78896607b6f6226cd).naruse
2011-05-15* remove trailing spaces.nobu
2010-12-01* ext/json: Update github/flori/json from 1.4.2+ tonaruse
2009-07-12 * complex.c: use k_exact_{zero,one}_p macro.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-12 * numeric.c (fix_divide): added an entry to rational.tadf
* rational.c (rb_rational_reciprocal): added. * complex.c (f_reciprocal): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-05 * rational.c: edited rdoc.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-03 * rational.c: renamed equal_p to eqeq_p.tadf
* complex.c: ditto. * complex.c (nucomp_equal_p): added. Complex(NaN).equal?(Complex(NaN)) should return true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29added a comment.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-29 * rational.c (float_to_r): always returns rational.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c (nucomp_div): raises ZeroDivisionError immediatelytadf
when the given second argument is zero. * rational.c (nurat_fdiv): never raise even if the given second argument is zero. * rational.c (rb_raise_zerodiv): changed the message (zero to 0). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c (nucomp_expt): convert to a float when the given powertadf
is a bignum. * rational.c (nurat_expt): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c (nucomp_expt): some improvements.tadf
* rational.c (nurat_expt): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-28 * complex.c: renamed some static functions.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27 * rational.c (nurat_cmp): use rb_num_coerce_cmp.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-27 * complex.c: revised rdoc.tadf
* rational.c: ditto. * numeric.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-20 * numeric.c (num_div): don't use num_floor which is actuallytadf
flo_floor. * numeric.c (num_modulo): don't call '%'. * numeric.c (num_divmod): use num_modulo. * numeric.c: defined '%'. * rational.c (nurat_idiv,nurat_mod,nurat_divmod,nurat_rem): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: edited rdoc.tadf
* rational.c: ditto. * numeric.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: edited rdoc.tadf
* rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c; edited rdoc.tadf
* rational.c; ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * rational.c (nurat_abs); removed.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * rational.c; edited rdoc.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19due to conflicttadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * complex.c: constant COMPLEX_NAME has been removed.tadf
* rational.c: constant RATIONAL_NAME has been removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * rational.c: added rdoc. a patch from Run Paint Run Run.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-19 * numeric.c (*_numerator,*_denominator): moved to rational.c.tadf
* rational.c (*_numerator,*_denominator): moved from numeric.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-18 * rational.c (nurat_s_convert): calls to_r when the given argumenttadf
is non-integer. * rational.c (nurat_s_convert): raises TypeError when the given argument is nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-17 * rational.c (nurat_coerce): accepts Complex when the imag istadf
exact zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-17 * bignum.c (rb_big_fdiv): checks whether the given second argumenttadf
can be converted to float properly. * numeric.c (fix_fdiv): calls rb_big_fdiv when the given second argument is a bignum. * rational.c (nurat_fdiv): should calculate Float(x/y), not Float(x)/Float(y). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16 * complex.c (nucomp_coerce): accepts Complex instances.tadf
* rational.c (nurat_coerce): accepts Rational instances. [ruby-core:23859] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-13 * complex.c (nucomp_fdiv): use fdiv recursively.tadf
* complex.c (nucomp_expt): reduced code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-13 * rational.c (nurat_to_f): use fdiv.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e