ruby/bigdecimal-1.2.0/lib/bigdecimal.so000075500000211140147207305410013437 0ustar00ELF> @` @8@   HH H  $$Ptd@@@ddQtdRtd GNUj8=xQ{!kUh@D@UZ^BE|X=|/\؁9wqX2Y %S =6R5#J=EZq-@' &QROr\ _a 8 MhR"|do!p!p | !x!d!up!v! 0 |__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassesgOne_ABCED9B4_CE73__00400511F31DgZero_ABCED9B1_CE73__00400511F31Drb_str_newruby_xfreerb_obj_classrb_class_namerb_str_duprb_str_catrb_exc_new3rb_exc_raiserb_inspectrb_thread_currentrb_thread_local_asetstrlenrb_isspacememmove__sprintf_chkrb_thread_local_arefrb_num2ulongrb_uint2bigrb_yieldrb_protect__stack_chk_failrb_jump_tagrb_fix2uintrb_eFloatDomainErrorrb_raiserb_fatalruby_xmallocmemsetruby_xreallocmemcpyrb_check_typeddatarb_str_tmp_newrb_isdigitrb_str_resizerb_warnrb_cBigDecimalrb_data_typed_object_allocrb_string_valuerb_check_safe_objrb_eTypeErrorrb_fix2intrb_bugrb_check_typerb_eArgErrorrb_scan_argsrb_funcallrb_typeddata_is_kind_ofrb_big2strrb_int2big__isnan__isinfsqrtrb_assoc_newrb_num_coerce_binrb_memhashrb_intern2rb_ary_new2rb_ary_pushrb_Rationalrb_eZeroDivErrorrb_num_coerce_cmprb_num_coerce_reloprb_string_value_cstrrb_eMathDomainErrorruby_snprintfrb_num2long__errno_locationstrtodrb_float_new_in_heaplroundrb_ll2inumrb_mBigMathInit_bigdecimalrb_cNumericrb_define_classrb_define_alloc_funcrb_define_global_functionrb_define_singleton_methodrb_define_constrb_define_methodrb_define_modulelibruby.so.2.0libpthread.so.0librt.so.1libdl.so.2libcrypt.so.1libm.so.6libc.so.6_edata__bss_start_endGLIBC_2.3.4GLIBC_2.14GLIBC_2.4GLIBC_2.2.5ePti ii ui [ ui 'ui  !   $ P!@ @ h p  x Z  V  [ * , / C I K N Y O! !(!0!8!@!H!P! X! `! h! p!x!!!!!!!!!!!!!!!! !!!"!#!$!% !&(!'0!(8!)@!*H!+P!-X!.`!0h!1p!2x!3!4!5!6!7!8!9!:!;!<!=!>!?!@!A!B!D!E!F!G!H !J(!L0!M8!O@!PH!QP!RX!S`!THHe HtkH5 % @% h% h% h% h% h% h% h%z hp%r h`%j h P%b h @%Z h 0%R h %J h %B h%: h%2 h%* h%" h% h% h% h% h% hp% h`% hP% h@% h0% h % h% h% h% h % h!% h"% h#% h$% h%% h&%z h'p%r h(`%j h)P%b h*@%Z h+0%R h, %J h-%B h.%: h/%2 h0%* h1%" h2% h3% h4% h5% h6% h7p% h8`% h9P% h:@% h;0% h< % h=% h>% h?% h@% hA% hB% hC% hD% hE% hF%z hGp%r hH`%j hIP@SHuHHt?HHHeH5F!HHHH~HV@H H= UH)HHw]H Ht]@H H= UH)HHHH?HHu]H Ht]H@= u'H= UHt H=R h] @f.H= t&H HtUH= H]WKf.HtHGH(fD1D!f.Hff.fW f.{^. H f.{f(^ @uH ^3fW Duff.J fffOffHzALFJfWMt5 1@^HDD L9I*YXuHBfHH~iAYи f.z$u"H H ^ HffDH1H f.zuHE Hz ^ fW^ wHHt$H<$H<$Ht$1HH0 f.(zuH ^ HH=oDf.Ht fD@f.USHH-X HHTH[H]DHt W fu ffu @ft>Fu%HOHWHHD x#H9sH)HHHGHDfDHHHH)HDf.fftYfffuu-0.0FfD1tZ0.0@t;u+HHInfinityFHNaN@fD HH-InfinitHyfF@+0.0F 0.0FAWAVAUIATUSHHt$UHItmA]tdImAE1-DEtKIL;t$wPM9v;]IIHt(u܀+t׀-tҀ.uE1M9wDH[]A\A]A^A_ÐILHLE1L)HAE f.AWIAVAUATUSH8H|$ HT$(Ht$ fA HD$ 0Lx@.HD$H@HHD$HD$AfHD$Ht$A Dt$+@HȹHHu#AA)AtY1DtH LAH1L1IDH8[]A\A]A^A_fHD$HD$H9D$JEOHt$HFv$Lw$I1tA0uIAA0tH 41HLdHt$(HNH|$ H8[]A\A]A^A_NH|$ H-HbH|$ H HNHH+?A.'ff.SH SHHHt"tH[f[HgHQ HH1[ATUSHHH?H9w*H\L% HHL[H]A\HHΐf.USHdH%(HD$1%H= HT$HþHHa|$uHL$dH3 %(HuH[]jDSHp #HHxHtH[HA HH1[ATAUHSf tf@t EuftQKfw0H t!H H5HH81fDH=ȩH1?[]1A\ÐUHSHHHtHH1HH[]H5{@:UHSHHFH4$HHtFHEHUH{$Hu$HCHEHSHHCE fC E"fC"EHH[]H5@ATUHH53 SHzH5# HIhH9tHLHHC H[]A\ff.USHdH%(HD$1H=v HT$þH|$uHL$dH3 %(HuH[] vfDHGHH0~KH~KH HH9}>f G$HG~{fW H5 1ҿHxHWfH HH9~f G$HG~-fw H51ҿAfG DfO DUSHHO ftfuC$HC1H[]AfvHWfHB|$u4HHufC$HC1fS s$HSuu1HL$tHpH)HHHHSaSHCHt$H{$H/DfC 1fDAWAVAUATIIUHSH8cH88HLHHHHBHD$ufH}su}#Hft-HH88HHHD$HHH9HFHT$HIHxPHD$H HD$HD$LhE1E1MIO|5H|@A?tIA?_uMuALHuADHtA|uH=/ L~H= LgH= LlAE@ME1@IC<>O$>@I/uA<$.JM1ADDHD$IHIt=L9|$MHD$L9|$rHD$ Hl$NLLT$E1Lt$(MtXHLLHHA}$I}fLLҍTY1HIOGf.AWHE1AVIAUIATUSHHXF$HFfDV p HT$(HQ HD$(AV @ ff4f*ffҍDTƒ6AE$IEfAu HD$(fx 1fA~ DTƒC$HCfS DIEHHX[]A\A]A^A_Ðf>f0f&IFHHD$HRI}Ht$(H|$8HFH{H9H|$HC$HfL L$HH9uH9D$HT$vHH9D u1H|$8HT$8tHH9AD uH|$HAF$ HxAV(Hiʚ;H|$@HHHD$ 1H|$HHHD$HD$H|$8HH9HGH|$HHD$H HHHL$0we@HH;l$RL}BDtAËT(HuMiʚ;IL;\$ L9\$L1Ht$AD$IIFHDH;D$OHL$0HDL$HHpE1E1L$MXAʚ;FDA)DL(EDL$tE9Aʚ;E)ADL$IHFL9HAL$1IHɚ;v&HHSZ/DH HH ЉHiʚ;H)DH9jA)ADL(nE1H5AE$IEfEM 1ҿ/H8AE$IEfAM fIE)E1L9DL$HF1CTE)DL$ɚ;ID 2fD0ʚ;HPVPɚ;w fDH9t$8VL1Ht$@AD$IHIF9HD$HHMHv8T,A9V,wr,HHHIfDDT$D9T$rw HH9uIVLRJDH9D$-H)1M1#@ʚ;HD)ɉL$HI9r*ED L$E 0D9rD)H)1L$HI9sIDH$QP$fAE$IEfҍDTƒAfEE H5)1ҿHHXH[]A\A]A^A_HD$8LIEHD$(H@IE$u1IvLH tL|$(LfA 1fA~ DTƒfAE HD$HHCIGHCtfA HfC QtfA} A~$I~fL|$(LҍTLfA  C$HCfC Hiʚ;HD$@H|$ H|$ }H= 1N@f.ATGUfSv[]A\DL% tHT-HLT[]A\f.USHdH%(HD$15H= HT$þHr|$uHL$dH3 %(HuH[]fDSHBHJHHx[H: H5H81fATUHSHdH%(HD$1HHHLdH1AtHT$dH3%(Lu4H[]A\H<$HtھH<$xHcD;H H5 H81CU1H1SHH HHHHH[]Df.AWAVIAUIHR ATU1SHH8v 1t@AN fuOAE ffC$HCfK H8H[]A\A]A^A_ftA} f{fqIvM]AAAL9gM}MfHMLMIE1fC$A1fDAFLHfC fEIHkLM)K&H}L9HCH9L9D$w AL IL$H9D$ HsHkHLD$DL$Q1ɅDL$LD$1fAfC HC1HtT 1HHCH4fM~MeMfD`fs [DLH`HCH49IHkLM)K!H}L9HCH9E1L9wE\ IH9D$HsHkHD\$,LL$ LD$DT$11ɅDT$LD$LL$ D\$,M91fAx EDD1AfC f.f6LHiHCH4B@MFMeLM9IFHt@AE$A9F$ 1fE|$E9|$HH9uM9E1fAA1fTBDHC$HCfS fDHiD$ D$gHiD$E1b@IAIH9JL)AD$ID$6IFIH9 L)AD$ID$ IILL$L$ @K4&L9v#HMICD$K4&L9D$wI9I6HL)LLHA|$H9A|$uHL)MHHL)HHJ4JLI1@T$1H9tEHAT$T$ɚ;vʚ;T$ID$'M)MHtEL)I)K<fT$1H9t%HT$ɚ;vʚ;T$@HT fDIID9\$w D+L$0K< L9vFʚ;(I)ljC+D$D$K< L9vHMu։I)lj|$L9HL)LLf.HEL$H9EL$uHL)MHtjHL)HHLJ4MIfAʚ;A)A)DL$H9t,HAt$EL$D<0E9rA)A)1DL$fDL)HIt=I)H)I<D$ɚ;L9tHt$9r)1t$MtB)D jDMMuDMMVD1fA~ fC DLƺH߉L$DT$LD$L$DT$LD$LH߉L$DL$L$DL$1uML{fH@t[uvHH9HHH?fWH)H HHD$1L$f.af.HtHʃ tbtt;1<eHH@H?HH@fW1f.GHDH Hȃf@tt#H1Hu%tHHHt@ t3Hƒ u%@uHÐH1tfD@SHtF@HOH藿PfHC H5vH81fHtuHH;¤ H; H; t~H; H;r H;] H;H H;3 H; H; H; Df[fD[ÐH@ 1H4[Ð[f[f[ø[fSHuH dH%(HD$1HL$LD$5H|$譽H|$賿HuL=AH|$Ht dHT$dH3%(HDH [fHT$HtHtǁHuftǁH|$ePtǁH|$t{F1tǁH|$t,'f7HD$f.VDkDzH H5yH81HH8 H59yH81AWL=g{AVI@IAUIATA4USHHdH%(H$1HD6HD$HD$ HD$tattHl$0HH tIغH1覽HH$dH3 %(H[]A\A]A^A_Hu7g1؃HHHtր twIcLf.M>I4L9tH{HHHsHCMHD$ HD$r HHD$(Ht$H¿`3HH5 H豸HC H߾ H HXtHXHʸHx HfMxbIH5b H11H0fDIHy HH8fDLHT$SHT$bHHH H5vH81^9fUSHHqHHdH%(HD$81H踷HH$HHH5rHHD$躿Hp21迺HD$HD$H t}HD$HXHEH pHHL1HgH411HHOH|$H袷HD$HT$8dH3%(uHH[]fDH\$H0HHKP 1ftftft HD1HÐHH @ ftfHHDDH@f.HHfx HHÐf.HHH@ HHDff.HH[p$HPtQHHIHHHDw+DHHIHH1HHHtHcHD?HDATHIUSH@dH%(HD$81HHH5gpHHD$ZHH@ H1HHHCHD$HD$H HD$HhH EnMHH1tHLd1ɺ HL5LʹHKHSI<1L LH mHH藴H|$HHD$H\$8dH3%(uH@[]A\@Hl$HFuDSHHP fu[f.fHt[DHHKP fuH1ftHUHSH8dH%(HD$(1HHH53mH$HEHHfD/LLPH.E1E1דAWAVAUIATIԺUSHHHhdH%(HD$X1HHHD$؃OH1HHHIHHD$E ft S fH5N HHH5kNHD$ HI$I]HT$(HL$XdH3 %(Hh[]A\A]A^A_fDHM6HEHߺH4H-f~ftff fff"fHUHKH5KH?H?HH3EH)HH3SHEH)HSH9HCL| LѬIHK|? H5JHD$ 赬IHHHLLHD$(IFH5%KHUSHPdH%(HD$H1LD$H]$H|$芼HH1WH}H5>ITHHLHHD$ H<$IHHHD$(eIHIt$IvHD$0HCHHPH9HFH| H5=HڟHLHHHT$8LѳL詑褪HH趤s H H\$HdH3%(HP[]A\A]A^fH4$LfH4$HL$HT$LHD$HuH]j Ht0H4$L褆fH|$w 肤HzkDH==?Hj H@f.AVAAUIATUպSHHH0dH%(HD$(1IHH$ti1HHHHT$HT$AT$ f@*1HL$(dH3 %(=H0[]A\A]A^fDHuG*@"H D@HcHfD؃HHHt twHNDHcHID$1HH4HHT$HT$AT$ f.H f!f:f0fXfNft ff5f+1f@Ht6f.*@"HC@Hc HH5b H艁L@1ҾH HHT$E@HUfDGfDHu4DHtf"HtH@HD6fDHg H?HL轂Ht@Hg H/HL腃Hg HuH=t:Hdg HHLNbfH)g HuH=;:ӃH g HIwfDH=?1f1Ifft fu)ȃ@@H1f@Ht6H=h<(Hqf HH=m9HIf HffffɾnHxI9|$cEL@I|$ML9LFMt.p$A9t$$w;1\$A9\$w&HL9uI9rf1f@Ht61HfaDf.GfD>fDLfD<fD=fD*fDUH7S1H(Hl$LD$dH%(HD$1H~t H|$@HH|$@t2@tdH[HL$dH3 %(H([]HuOH}Ht$H HvHяt>HHHt@ twH?HcHfHwKH|$t`HEH5] |UHD$H@ #fDHVH` H56H81G|"}HHc` H5L<H81"|fAUIH5t] ATUHSHHdH%(HD$1}LI2HHs HH$Hu7MtL}HL$dH3 %(H] HH+u H[]A\A]DHL%H[|f.SHdH%(HD$1HHs HH$pHt H1ъHH_ H\ HH8~HL$dH3 %(HuH[{AWAVAUATUSHHdH%(H$1H|$(HT$uBu!HtHHD$D$ H^ H55H81|z@Hl$HHqt:thH1HH? H_^ H5:H81.zfDHHЃHn=Hc H؃HHH uHCE1t E1HA1<HzHD CHH艿I4H] H59H81YyH5Z HyfHi] HH8}fD@*HйHt%DKEVHtHsH<H HЃ؃iKfW1Af.DDf.@AƈD$ @Af(t$L$E1}yL$Af(xt$D EE EMAt$ LL}RH5Q2HΓp H2H5`2HD$8謓p HHD$@H@HKD?At$$HD$0ID$<HHHD$ w=HIHIHHH1HHHtLD$ H|$ HL$ Hl$pH11HHwHLt$0ܒp H@HLH2Lt$HLd$8HLHLHH\$HD$`HD$`HHHD$H\$hHIHHHD$HLl$PL\$PL\$XHD$XL@ A@ ffILf.IC E1ҋx$HPt?LHLw/fHHIHH1HHHtIAx$1I@t?HHHHHIHH1HHHtI)MLH?I1I)M)MH@IM,wI@AHT$H|$HHHHH@HHDMHD$`KD$Ht$HHD$hH|$PIHHD$XME HD$PIAP ft fHt$@LH|$ HHD$PH$dH3%(HĘ[]A\A]A^A_@LHtXH8t5HD$0HD$ HD$^HEH5-HHfH @$H@H@NHT$H|$(HH@HHD$ HH|Hӹp HHH|HHqH5-HMH11fP H@$H@蛔1HHeILc AD$ fAfE1A fAfEf 1fDLr2HCHHsDEu,HHyfHHE1D$ AfWcHV H5(2H81qrfATHUSH@dH%(HD$81跷HHHt$(H|$ HHD$wHD$(fWH==H=H5-Hz1HuHD$0HD$0H HD$0Hh11HH9|$q1IHAqA<$"D$ `fWf.zFuD@H511ҿf{ H(5{qfD(5fTf.4fDH5111ҿL$7f{ L$&W f.d^H/T HdT ^D$HT$QW H0HH9u.HT$D$p=DHT$ H0H9HtHH<tgHuHH\$8dH3%(H@[]A\fD$HD$H0H9HH<@H=HHf.Hl$0H f`V f.zBu@HS HFS ^ ~3fWD$HT$V fD$HT$H fof.UHSHH(dH%(HD$1@t@HߺH|HH$HH qHL$dH3 %(u_H([]Htt-uHE HߺH@H4H8H<$fDH(HHpnfDAWHAVAUATUSHHdH%(H$1HT$8HHH|$ H|$ 1HH聳HHHH$HD$ Lp1fz D$, fJ H5k'p HOHD$HHD$HHD$XHD$`Ll$`HD$0Ll$PHD$hHD$PLH AA ffKD6I@L|$ E1HHD$HD$pL|$HD$IE E1p$HPt?LHLw/fHHHHH1HHHtIAq$1IAt?HHH HHHHH1HHHtI)LLH?I1I)L)HI@IHwI@H|$HT$@H4$H|$XIIHD$XH@LKt$H|$hDMHD$hHD$pHD-Ht$LHD$xEH|$`HHHD$PLM HD$`IAQ ft foD$,IE 1x$HPH|$ H@H)H6HD?Ht$8LHD$8GH$dH3%(HĘ[]A\A]A^A_fDHu7HN HH8nD؃hHHHt΀ tɋwH-HcHHt$ 1H*HH5kK HsjtHS E1B fAf@f f@'E^Ht$ 躯p HΊfHHi'L8iHL(iH[lHD$ HHHIfDHHIHH1HHHt؃fWE1Kf.Af( $i $f(h1 H輮H6@*H|$ H5"G1H@$fp H@1H蕉H|$ H5!@$fx H@HHWkHHD$8HT$0Ht$pLl$pHD$x;HH9t:HڸE1H?fWH)HHH HH$ $f.AE1fWXgHfhHK H5'H81ng@f.AWAVAUATIH>!USHhdH%(HD$X1HL$LD$ gLH%H|$ HHHHD$0@aHIf} H\$Lt$(tqE1U f~ H1<1gHkHuGHiHH J H5'H814f@؃HHHt twH)HcHH{@bHUH5NM 1fH\$HDP @H1<1fHÅ HD$kH5F He.HT$LHD$(H|$=HHk H|$HD$HffH؃H]H5&L 1HeHH5L/p H蓅fD؃Kf(L$VdL$f.  f(dHcHD$H,ff} HEL, H5LE1@$H@fDX 1HHHL$XdH3 %(Hh[]A\A]A^A_fI@1HfHH9HڸH?H)HHH HHD$L$1Hf.H?H5qL~f} HwA@$H@fDH HHHH@  H{@tn@H1HH[H\$Tf.H|$@1@1HyH5GtHKH5TI 1bHH\$mDHGH!HH@LyKT-I<$HT$( HHH@ HW1HO/HH"H1HHH ʃ GfWf.SfH\$H؃HH5LF 1_Hf.K HߺL莤H\$I؃HHH  x7HHH&@  LHS1HK!HH H1HfDfWGHT$HaA@$H@fDP HGH|f.H|$@@ 1<]1H@Džf} HD$HwH5fH|$@uHt i`LcHLHMx IEU ft fYH5\wIHHD$8u ft fM{fMAF$IFfAv fL|H  H ΃ @cHf1AF$IFfAV H?rHH9HڸHH?fWH)H 1HHD$l$f.HH9hHڸHH?fWH)H 1HHD$d$f.)H\$Ls HߺuH\$IAF$IFIFfAF HHHЃ =B.fWO1f.@8H5Luf} H@$H@AfDC HzHQH H˃vH H˃fft<IAF$IFfAF ifH~ pHу l@MH=fHEHyH5HHHJtIHHD$8H\$HLHt$XHt$HrHXL%< HuHI<$9HHD$WHt$HH}IHD$IHD$IFH5\H|jHH@H5DHH| jHLI/It|HHIA IHHL߂LHK?I9sLHLLI)貂LLMH|$ZMtLdXH\XAv RHRH|$@u1@uHt  tH: H5H81VȘC$HCfC 4H@L薪HRHHHH1<RWHH|$S,Sf} H|$tAF$IFfA~ HH9HHH?fWH)H HHD$L$H}n}$dfAF f} AF$IFIFfAF UfAF iHH5v< 1HVHH HHٕH5SLbpH|$H赖wf} C$HCwfC s fAF ;HHH* !t# fH\$HK1HSHHH1HtH(; LHLrHL"||fWf(fAF .MxUyAF$IFfAN vf} C$HCfC AAF$IFfAF &fDHHHt$Ht$EHUH=G SHdH%(HD$1VH=; H^: qVH=< H>: YVfWH&: f.~9 z f.f9 z f.N9 z0u.H6 H86 ^ pfW9 WH5 dH5 H39 dH9 H5 H= H0UHz5 H5KHH0UH5 H=r SH;HH5B -TH;HSH5 TH;HVH5, 1SH;HrH5 SH;HEYH5 1SH;HMaH5 1SH;H%H5 1SH;H^H5 1SH;H5 5wTH;H5 TH;H5 TH;H5 oTH;H5 [TH;H5 GTH;H5 !3TH;H5 TH;H5  TH;H5 SH;H5 SH;H5 SH;H5 SH;H5 SH;H5 SH;H5 SH;H5 kSH;H5 HUSH;H5 ASH;H5 H+SH;H5 SH;H5 HSH= RHHH$LH;H5/ HRH= iRHHH$H;H5+ HRH;HIH5 (QH;Hn^H5  QH;HH5 1PH;H۪H5 PH;HH5 PH;HH5 PH;HH5#PH;HH5 1qPH;H'H5w VPH;HH51>PH;HH5I 1&PH;HH58 1PH;H4H5% 1OH;HH5 OH;HH5 OH;HRH5 1OH;HH5 1OH;HH5uOH;HH5 ZOH;HH5 ?OH;HH5l $OH;HH5S  OH;HH5bNH;HdH5fNH;H)H5 1NH;HH51NH;HٙH5NH;H.H51pNH;H&H5UNH;HkH51=NH;HH5"NH;HH5{NH;HH5eMH;HRH5TMH;H7H5WMH;H H5MH;HH5MH;HH5eMH;HH5JMH;HH5/MH;HUH5cMH;H*H5LH;HϖH5k1LH;HwH5P1LH;H?H5ALH;HH5-1LH;H\H51~LH;HH51fLH;H̓H51NLH;HdH516LH;H H51LH;HtH5LH;HّH5KH=LH, HH5HǹHKH;HH5vKH=nLH=mH0 LH=!Hh0 LH=(HH0 LH=H(0 kLH= H0 SLH= H/ ;LH=H/ #LH=H/ LH=.H/ KH=Hh/ KH=HH/ KH=H(/ KH/ HD$dH3%(WH[]fH+ ^ . "HA+ Hv+ ^ n. HHH1.1.0%luE%zd%sfailed to allocate memoryExponent underflowExponent overflow+Infinity-Infinityexponent overflowComputation results to 'NaN'#0(VpDivd) 0/0 not defined(NaN)(VpDivd) Divide by zeroargument must be positive01invalid rounding mode11%zu:#(VpSqrt) SQRT(negative value)#1Fremainderto_i**divided by 0divmoddiv02<=>>=<=precision too large.1E%ldprecision must be an Integer0#-0BigDecimal.exception_modeBigDecimal.rounding_modeBigDecimal.precision_limit.5BigDecimaldouble_fig_loadversave_exception_modesave_rounding_modesave_limitBASEEXCEPTION_ALLEXCEPTION_NaNEXCEPTION_INFINITYEXCEPTION_UNDERFLOWEXCEPTION_OVERFLOWEXCEPTION_ZERODIVIDEROUND_MODEROUND_UPROUND_DOWNROUND_HALF_UPROUND_HALF_DOWNROUND_CEILINGROUND_FLOORROUND_HALF_EVENSIGN_NaNSIGN_POSITIVE_ZEROSIGN_NEGATIVE_ZEROSIGN_POSITIVE_FINITESIGN_NEGATIVE_FINITESIGN_POSITIVE_INFINITESIGN_NEGATIVE_INFINITENANinitializeinitialize_copyprecsaddsubmulthashto_sto_intto_rsplit+-+@-@/quo%moduloto_fabssqrtfixroundfracfloorceilpower===eql?<nonzero?coerceinspectexponentsignnan?infinite?truncate_dumpBigMathexploghalf_updefaulthalf_downhalf_evenbankerceiling can't be coerced into BigDecimalConversion from String to BigDecimal overflow (last few digits discarded).Computation results to 'NaN'(Not a Number)Computation results to 'Infinity'Computation results to '-Infinity'load failed: invalid character in the marshaled stringERROR(VpDivd): space for remainder too small.second argument must be true or falsefirst argument for BigDecimal#mode invalid%li can't be coerced into BigDecimal without a precision(VpSqrt) SQRT(NaN or negative value)Undefined operation in BigDecimalCmp()can't omit precision for a %li.Zero or negative precision for expComplex argument for BigMath.logZero or negative argument for logBigDecimal to Float conversionwrong argument type %li (expected scalar Numeric)a non-integral exponent for a negative base@]`^@]^^^p^]fgfffffgYYYYYPY0YYYYYYYXUUUUUUUUUUUUUܼԽԽԽԽԽԽԽԽԽԽԽԽԽԽԽԽԽ̼ԽԽԽԽԽԽԽԽԽԽԽԽ|(|H.|PPPPPhP7PPPPPP3C688?eA& .>;dk;?XA0A@APAAC(C@Cp DDEFHIpII0J(JXKKK@LM00N` WPWW0\p\]^a a b8 pbX c c eh f f 0k8 pr r 0s ps( t` `t | } ~ X p  P @ЅXpЇP0p`000p``00 p@Н0`` p`Pг(`xPP` p8Ph@p08zRx $7FJ w?;*3$"D`=\h=t`=X=t=th??`;\E$ x?+AAG PID4?L?Ld@BBB E(A0A8DP 8A0A(B BBBB d`A$BEB B(A0A8Fp  8A0A(B BBBJ  8A0A(B BBBE $(C`Ae J A O _,D`CUBAA z DBD ,tCkAAD0X AAA CPAf I _,DBDD oAD,PDHADD ^ DAD ,$pDADD V DAD ,TDDBAK rAB,DjAAD0W AAA  E,EAAG e AAH dFBBB B(H0D8Dp 8A0A(B BBBH @ 8D0A(B BBBA dPO*Ah`OoD@ D fdOjBHB B(A0A8Gp 8A0A(B BBBH  8F0A(B BBBI  SS$$TuDU G W I W I <LXTBEA A(D` (A ABBJ UlWPxXfXSAf I bDYBDD G ABD O ABF A ADJ L<XYBEB D(D0X (A BBBH _ (A BBBJ tYBBA D(G0M (A ABBE  (A ABFK Y (C ABBG v (A ABBD 4`[7BDH X ABG AAD<h[|T \FBGE I(D0A8Dpk 8A0A(B BBBA  8A0A(B BBBA N 8F0A(B BBBA d_2BHE E(A0A8G 8A0A(B BBBB  8C0A(B BBBA 4<fCBDH E ABJ _AB,tfjAAD0W AAA  g7A] A 4@gBAD F0N  AABA $g1AHD aAAL$ gBBE I(A0E8Gp[ 8D0A(B BBBI $t oF  H K E R F  xp< p~E G F B ~ B F J F J F A F$ 0rAK0 AC L sBIO E(G0C8J 8A0A(B BBBA ,l 8vAAN` AAG  w?Dn F F (wBDf N I Xw%D] pw$DZ w{Dv4$ wKBPA D`  AABE \ y;Ad K J| (y=Dd H L, HyAMDPl AAA , yAMDPs AAA L zBGB B(A0K8G 8A0A(B BBBE ,L AMDP AAA ,| HAMDPq AAA  iD _ A < ZBJA K(D` (A ABBI < BBD A(JP (A ABBE <L BJA A(N` (A ABBJ < hBBD A(JP (A ABBE < BJA A(N` (A ABBJ < BBD A(JP (A ABBE LL8CBBE B(K0K8D 8A0A(B BBBK ,8AMD0I AAC LBGB E(A0A8N 8A0A(B BBBB L؍BNB B(A0A8D 8A0A(B BBBH Ll8OBND A(F@ (I ABBH | (G ABBH <8 BJK A(D# (A ABBK LBBB E(I0A8N 8A0A(B BBBG ,LXADGPW AAK ,|șADG`^ AAD <xBND A(Dp (A ABBA D8BBE F(D0Gp 0A(A BBBD D4BBE F(D0Gp 0A(A BBBD D|BBE F(D0Gp 0A(A BBBD LdBBB B(D0D8G 8A0A(B BBBD DBBB K(A0D( 0A(A BBBJ D\BEE A(H0N`~ 0A(A BBBG @ 8 0 (   ,4AHF@n AAA <dpBLA D(I@h (A ABBF $yAD m AA L8 BBB B(A0A8J= 8A0A(B BBBE 4BMA D`$  AABD ,TADG@^ AAD LrBEB B(A0A8J0 8A0A(B BBBG LBBB B(K0A8D 8A0A(B BBBH $ D [,<| AMD0 AAJ ! $P!@ '7BM[e 0 |  o( @  !@0 ooooH fv&6FVfv&6FVfv&6FVfv&6FVfv@@?bigdecimal.so.debug 7zXZִF!t/]?Eh=ڊ2NsdhSW~N%Si$^ pE+.mh$݂b/ y}wNϿ+zCۍSQ>ʼngѽN ip-qA NA,P8*YL ^/^ r^e'hqC 1k t4iJ=jGTo@Xj.N^% c 1t-{L2 iS74.}0Uuǔ1wtid~ͯ3(dPb\~DFo ~OV|jiy4[~_%B\Ӫ ׁ^a*NpbEu,gۿ op_ic>i5Vu"#1.V9POvDwtw{xW`$B'd"(s&!%!~ZfL$X4kCۼ @aj^q}RDLQy"׽˷(g!E$3RU&mP-[wi. 3ؙ<D@=m%:SoQx<Xln f&j&E{?:Uko|r+ Jn+ſ.I=c\(bXN@] Um`Psh0'7z5VQ[ˀ@6dv \7^vv+B|ac,9,ѪwQNj[9 ۉ7 Ϩ?͑W~3f/ʊ39ܞ̕.s'վ Ѝp[+BX4?* izNя2Jfl?( \budLǖ"I9F]I vc E aڤV jv5tHL+yA_CWeo9^(_<>+QFN2n8s<J+~|BGS%3X@<.Q_}mU4{%*#;JLo$mWHjdjSy1= 3q9̝b-VU2L3K7`,Y[]^#`3Fffv%;$8Tؼj4r`|lzFPM%hg%gʲŹE2c9.wv,:=58$ԩ@"5DHןqE^gq1r$I?~%&F]= wph6@,'.Ԕ jV\Wlt*BQjz=.(Qҽ1f xu:#ׁFXqe}7HED?Wѝ6O>9Fqy%֤=mz!zgW(cOLmz" u<ԻTE4w-k"X Ҁ|"%FȒÿ_u?MZkE' 4o!{þp-V?r]g@.;AhgYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.data.bss.gnu_debuglink.gnu_debugdata $oL( @@0( ( 8oEoT00^B@@h00cPPn |t|| z @@dl    H H H h h!hh!h!0X ruby/io-console-0.4.2/lib/io/console.so000075500000036460147207305410013434 0ustar00ELF>@p6@8@<(<( -- -  -- -  $$Ptd"""QtdRtd-- - GNU JU +!D@ +-0BE|qX.Do Pa, :7Hua !c8 R"iuG@1 1 @1 ( 0   <"z !j__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassesrb_intern2rb_funcall2rb_cIOrb_const_definedrb_const_getrb_mod_remove_constrb_cloexec_openrb_update_max_fdrb_class_new_instancerb_io_taint_checkrb_io_check_closedrb_str_newrb_obj_freezerb_const_setrb_cFile__stack_chk_failtcflushrb_sys_failtcgetattr__errno_locationtcsetattrcfmakerawrb_scan_argsrb_hash_arefrb_num2intrb_funcall3rb_fix2intioctlrb_assoc_newrb_jump_tagrb_protectrb_yieldrb_Arrayrb_num2uintInitVM_consolerb_define_methodrb_define_singleton_methodrb_define_module_underInit_consolelibruby.so.2.0libpthread.so.0librt.so.1libdl.so.2libcrypt.so.1libm.so.6libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.40ui ii ui - P- - - / / / / /  / $/ &/ *0  0 (0 00 80 @0 H0 P0  X0  `0  h0  p0  x0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .1 !1 "1 #1 % 1 &(1 '01 (81 )HH HtH5 % @% h% h% h% h% h% h% h% hp% h`%z h P%r h @%j h 0%b h %Z h %R h%J h%B h%: h%2 h%* h%" h% h% h% hp% h`% hP% h@% h0% h % h% h% h% h % h!% h"% h#% h$H H= UH)HHw]H Ht]@Hi H=b UH)HHHH?HHu]H Ht]H@=) u'H= UHt H=j -h] @f.H=8 t&H HtUH=" H]WKf."OO {@f.g Ðf.ATIH5 UHSHuH=f@Hj HH߉L[]A\>@f.H5a 11 ATUSHH0dH%(HD$(1H H;8%H5 Ht@H5  HsuHt H5 HHH H=1Ҿy+HL$(dH3 %(H0[]A\fljD$ 5HcD$ Ht$HڿHD$HDHD$ HIPHhHTH=HMH5  LHE H1LSfH HHPH:$D f.UHSHHXH;1u HH[]1SHPdH%(HD$H1fHXHj;Hu.D$ HHHЃHT$HdH3%(uHP[^1USHH 8u&HھwuH[]f.H1[]AUIATUHSHXdH%(HD$H1HXIHHuHIu3d$ LTt,HT$HdH3%(HuHX[]A\A]fL$ xt1-f.ATUHSHPdH%(HD$H1HXHHhu>H߁ $"L$L$ {tHT$HdH3%(HuHP[]A\1f.UHSHHc HtExCExCH[]Ðf.USHXdH%(HD$H1HHH$HFHD$HFHD$HFHD$HF HD$ HF(HD$(HF0HD$0F8HΉD$8HHT$HdH3%(uHX[]fDATUSHH H dH%(HD$1HL$H|$H-H5^ HHH H59 HHH|$HH I1HCtH*HIt2HL$L*HD$Hu(CHHT$dH3%(u|H []A\@fH= @Hr H=fH=o @H|$HU HDDfD1tf.AUATUHSHhHdH%(HD$X1[HIHXHD#H\$HDqu8LHRHDtHL$XdH3 %(HuHh[]A\A]1fUHSHHXHHC`;HtHsHXHw;u HH[]1FfDATUHS4HXH8H{`D#HuDouF[H]A\HXHA9t̃t1D9u)t1@f.SHdH%(HD$1HXHHC`;HtHwHXH{;1HTu3t$<$Ht6H|?nHL$dH3 %(uH[c1ff.AWAAVIAUATE1UHSHHt$HT$dH%(H$1D$,LhLA]D9t(L|$0L"E}D I}`Ht{LxLE?At5D9t0LL$lDLLL$LL$/*D AD$,8AHHhHt ;]-At-A9t(H}`EHtHXHA9|$,ttm8H$dH3 %(LHĸ[]A\A]A^A_@HT$LLD$,E}D;D 1AHt$lD#aD$,D fHT$LLDD$,H|$HT$,HIHt$0D$,D fH5 H1{f.H5 H1[f.SHHHdH%(HD$1HH5HHHL$dH3 %(uH[ÐKf.SHHHdH%(HD$1 H59 HBHHHL$dH3 %(uH[Ðf.ATIUHSH@dH%(HD$81}HXHLH8 HHpHD$0HL$LL$(LD$ H#H$1)H{`D#HtHXHD#H|$1111fD$1fT$fL$Hft$t H|$ fD$1HtH|$(fD$1HtH|$0fD$1HtHT$fD$T1D u2HL$8dH3 %(HuH@[]A\DHp x1@SH H1H5H;]H;HH5BH;HxH51*H;HH51H;HhH5H;HH5H;HH51H;HH51H;HH5~1H;HH5nyH;HoH5\1aH;HwH5L1IH;HH5311H;HH5#1)H;H5[HH5H@f.HH Ht@H Hr HuH=|HU H^ HDH=OH0 HHgetc/dev/tty0:mintime22rawraw!cookedcooked!getchecho=echo?noechowinsizewinsize=iflushioflushconsolereadable;|4LL|\,$\\,ld l, |,L l4 TzRx $`FJ w?;*3$"D\,tBBKF gAB4BAA GP  AABJ ,8ADD b DAA $$(iAD`V AA 4LpIACG f CAK DCA<BEA D(Dg (A ABBC 4BAD Dpj  AABA $@5ADG fAA,$XACDpz AAA 4TuBAA N@  AABE <BBA D(Dw (A ABBA ,`ZADD D DAA ,BAD o DBD $,AD  AA LThnBHE B(D0D8Ga 8A0A(B BBBE $UAG E AA $UAG E AA 4$`BDD D`0  AABF \0Av|jDB J P-   <"- - o0  0 x   oP oo o- Vfv&6FVfv&6FVfvconsole.so.debugƼw7zXZִF!t/o]?Eh=ڊ2NHW o&vAv`U'm@]Uqv -B<zQ%&u',t0R1aͼ3V_?8H ԅ̩ Y [&g-8h 'Z~nK0j^ۃuI>f'I%D-s4_ץ{azxAaL Hw.sj E>ƹoOJJ SMOt2W#rE`4f59+g!At|xY`0۝o-dCԹ/6 C' [:v܋﬿^HB>jh&UVЏuam{;p-=E| ~Gw<?4JFvw80CcNNӣ QlovR@l sQXpr-VUɈ"V;n-sa~kFJE#BO&h0̜֢j?O4Y + e*i@!vZ m?Q|t@NP .~+mj52ڿ0mU3‡J`mW:E,ӟ:fva*6z7RX/Y "n6dkm2hv`w*U_=_#ܸٓV `Xw1Max?e:j @ioP|Wy@NjKM32^J36F e~:q(.K1Jh2 }Lὃ+'ʇП*-oRL>,uk񎃔! v wjMH-Qn c[x |؆iPqx{!yo =3X\gYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.bss.gnu_debuglink.gnu_debugdata $o@( 000 8o dEoP P PT ^B xh  c@@`nt<"<" z2E"E"""##- -- -- -- -- - / /@0 0@@1 @1@@1X1p5ruby/psych-2.0.0/lib/psych.so000075500000067540147207305410011567 0ustar00ELF>p%@h@8@tXtX @]@] @]  `]`] `] 00$$Ptd4O4O4OQtdRtd@]@] @] GNUy$=c`*r#?q9#\ BL0 \dhx BE"aj |SE6 ZqXH8 2O} 2"</JJ[^gRsE udI\ha2\8a qp%68 ER"/: Ib  @Lr 5M(d 0d Hd  :N 9pr@d b   L<8d d & d __gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassesrb_check_typerb_intern2cPsychParserrb_const_get_atrb_class_new_instance__stack_chk_failrb_funcallrb_funcall3rb_string_value_ptrmemcpyrb_utf8_encindexrb_default_internal_encodingrb_iv_getrb_scan_argsyaml_parser_deleteyaml_parser_initializerb_respond_torb_to_encoding_indexrb_usascii_encindexrb_enc_find_indexrb_ascii8bit_encindexrb_string_valuerb_enc_get_indexrb_utf8_encodingrb_str_export_to_encyaml_parser_set_encodingyaml_parser_set_input_stringyaml_parser_parserb_str_new_cstrrb_enc_associate_indexrb_protectyaml_event_deleterb_jump_tagrb_str_newrb_ary_newrb_ary_new3rb_ary_pushyaml_parser_set_inputrb_cIOrb_obj_is_kind_ofrb_usascii_str_new_cstrePsychSyntaxErrorrb_exc_raiseruby_xmallocrb_data_object_allocruby_xfreeInit_psych_parsermPsychrb_cObjectrb_define_class_underrb_define_alloc_funcrb_define_constrb_requirerb_const_getrb_define_methodrb_internrb_attr_getInit_psych_yaml_treerb_define_modulerb_define_module_undercPsychVisitorsYamlTreerb_define_private_methodyaml_get_versionrb_ary_new4Init_psychrb_define_singleton_methodInit_psych_emitterInit_psych_to_rubyyaml_emitter_set_canonicalyaml_emitter_initializeyaml_emitter_set_unicodeyaml_emitter_set_indentyaml_emitter_deleteyaml_emitter_emitrb_eRuntimeErrorrb_raiseyaml_alias_event_initializeyaml_mapping_end_event_initializeyaml_sequence_end_event_initializeyaml_document_end_event_initializeyaml_stream_end_event_initializerb_num2intrb_fix2intyaml_emitter_set_widthyaml_stream_start_event_initializeyaml_sequence_start_event_initializeyaml_mapping_start_event_initializeyaml_scalar_event_initializeyaml_emitter_set_outputyaml_document_start_event_initializerb_ary_entryruby_xcalloccPsychEmitterrb_path_to_classrb_obj_allocrb_iv_setcPsychVisitorsToRubylibruby.so.2.0libyaml-0.so.2libpthread.so.0librt.so.1libdl.so.2libcrypt.so.1libm.so.6libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.14GLIBC_2.4ui ii @]  &H] %X] X] _  _  _ i_ '_ e_ `_ a_ j_ 7_ B_ J_ O_ k_ U`  ` (` 0` 8` @` H` P` X`  ``  h`  p` x` ` ` \` ` ` ` ` ` ` ` ` ` ` d` ^` ` a a a a  a !(a "0a _8a #@a $Ha %Pa &Xa '`a (ha )pa *xa +a ,a -a .a /a 0a 1a 2a 3a 4a 5a 6a 8a 9a :a ;a <b =b >b ?b @ b A(b C0b D8b E@b FHb GPb HXb I`b Khb Lpb Mxb Nb Pb Qb Rb Sb Tb Ub Vb Wb Xb Yb Zb [HH? HtH52@ %4@ @%2@ h%*@ h%"@ h%@ h%@ h% @ h%@ h%? hp%? h`%? h P%? h @%? h 0%? h %? h %? h%? h%? h%? h%? h%? h%? h%? h%? h%z? hp%r? h`%j? hP%b? h@%Z? h0%R? h %J? h%B? h%:? h%2? h %*? h!%"? h"%? h#%? h$% ? h%%? h&%> h'p%> h(`%> h)P%> h*@%> h+0%> h, %> h-%> h.%> h/%> h0%> h1%> h2%> h3%> h4%> h5%> h6%z> h7p%r> h8`%j> h9P%b> h:@%Z> h;0%R> h< %J> h=%B> h>%:> h?%2> h@%*> hA%"> hB%> hC%> hD% > hE%> hF%= hGp%= hH`%= hIP%= hJ@%= hK0%= hL %= hM%= hN%= hO%= hP%= hQ%= hR%= hS%= hT%= hU%= hV%z= hWp%r= hX`Hp= H=b= UH)HHw]H9 Ht]@H9= H=2= UH)HHHH?HHu]H: Ht]H@=< u'H=: UHt H=Z7 h]< @f.H=(7 t&H9 HtUH=7 H]WKf.S HH dH%(HD$1H5o< H[ HuH=_&@HP< HH9 H8&HcHHTH$HcHTHT$HcHTHT$HHL$dH3 %(uH [)fH5< 11 H5< 11H5)< 11H5)< 11HOH5-< H?1fDHOH5< H?1fDHOH5 < H?1fDHOH5; H?HOH5; H?HOH5; H?HOH5}; H?UHcHSHHLHH5p; dH%(HD$1HH$Ht&H2H $H t6HQHHHHt$dH34%(uH[]HbfAWAVAUIATUSHHHHT$hD$tdH%(H$81bD$0)H5#HH\$xIL$H#HD$8H1L L|$h LIG IHHD$(`LE1eH|$x@u H H5: H5"9 Hl$xH 11HhH H9K r9> H=#9þ* H="9þ 1 @H`HD$xH$H="`H="AQH$AH9L A9 A9Ǿt(nHHH$H$HþH|$(H\$xHD$xH HHpH|$(vH$Dl$0L="HD$ HD$tHD$HH$HD$XHt$ H|$($ Q$IcLH$HtLEHt!uHtHƒtHfDHEMtHLuHH$HtNkEHt#uHtHƒt HEDHMtHLHŃ$Hc$H=kHL$8Ht$XH$H$HHDH$H҃H$H$HT$HHT$HHt$8H=fH|$ |$ttDH$HtLiEHt!uHtHƒtHfDHMtHLHH$HtN EHt#uHtHƒt HEDHMtHLHŃ$Hc$H=+HL$8Ht$XH$H$HHDH$H҃H$H$HT$H@H$H$sEHt#uHtHƒt H@DHMtHLHH$HtNEHt#uHtHƒt HEDH]MtHLHH$AHtWEIt"uHtHƒt ILDLD$0MLD$0tLL#I$Ht$8H=Hc$H$H$L$H$Ht$XHHHD$H$H$HH҃H$HT$H fH$HtLEHt!uHtHƒtHfDHMtHL5HHD$8HT$HH=1Ht$XH$H$7rfHD$8$HT$HHt$XH= H$HEH$*f.HT$HHt$8H=DHD$@H$HHcPHc01HTHt6HD$`H$HH$H9HD$P@H;HtQ&EHt&u"HtHƒt HEfDDHMtHLHH{HtTEHtuHtHtHHDHT$0@MHT$0tHLkHH1H|$@HHH9\$PHD$8$HT$HHt$XH=H$HD$`H$HD$@H$HEH$MDHt$8HT$tH=H|$ |$t2H$8dH3 %(HD$hHH[]A\A]A^A_fDHD$8HT$HH=Ht$XH$Hc$HDH$pHT$HHt$8H=RHƒoHAA_H\$(Hl$xHHT$xH5HQHJ, H|$xH0 HDEsf+HD$`>HPHpDH=@@UH/ HQH5/ H|$x/t,H5/ H|$x11&H$3H= >H$ HD$(L$HHHHx8LiHHPHHL$ LqtHHD$(HxHtHHD$(H5*. McMcOt6Ol-LcxHO|?uH=T@EH- HH* H\$MHl$L<$MLH81.Lt$(HLLHfUHSHHHHHH[]H 1hSHWH[@f.UH5SHH-) H) H}HIH) H5kHHH;H5H, H+ HH, H+ HH, H+ HtlH+ Hf+ Ht9H+ HK+ HuH=? eH.+ H+ H[]H=  ?H+ fDH= H* wH=H* DH=H* H=bH* H=5 H* H=H* hH= _Hh* 1H= ?HP* H=H8* H=cH * H=>H* UH=@ H) HfSHHH|$HT$)HHHH[SH=H5zHHH% H5jHH8H5`HH&H% H5PHHHf[H8HT$ Ht$H|$dH%(HD$(1HcD$Ht$HDHD$HcD$HDHD$HcD$ HDHD$ HL$(dH3 %(uH8fH=HH % H5H1HHS171HfS HrHC [HcHDS HRHC [HcHDS H2HC [x|HHЃDf.UHSH HH} 1H@HH[]f.UHSHHHH߾H߾HHH[]H 1@f.SHH[@f.SH7t[H# HSH56H81DATUSHHĀHt$ dH%(HD$x1H|$Lc HtoH|$HHHD$tHH|$HHl$HHLKHT$xdH3%(HuH[]A\1?Df.AT USHHpdH%(HD$h1;Lc HHLHT$hdH3%(u HpH[]A\AT USHHpdH%(HD$h1Lc H/HLtHT$hdH3%(u HpH[]A\sATUH SHHpdH%(HD$h1xLc 1H@HHLHT$hdH3%(u HpH[]A\AT USHHpdH%(HD$h1 Lc HHLHT$hdH3%(u HpH[]A\UHSH HHm Hu)HHH[]D{UHSH HjHm HuHHH[]D+SHHHAH5$ HH1Hu|[f.[fATUH SHHpdH%(HD$h1HLc Hu?HHL5HT$hdH3%(HuHp[]A\fK"fAWAVAUATIULSHHdH%(HD$x1Ht$H$H|$IHtH|$LHD$H<$HtH<$LH$H߾ HLk (AE1MAE1H<$t HI1H|$t H|$HHl$LEDHHLHT$xdH3%(Hu(HĈ[]A\A]A^A_f Anf.AWAVIAUATULSHHHt$ H$dH%(HD$x1Lk zH|$IHtH|$LuHD$H<$Ht|H<$LPH$HAMAE1H<$Et HI1H|$t H|$tHHl$LEDHHLHT$xdH3%(Hu"HĈ[]A\A]A^A_AsfDAWMAVMAUATUSHHHt$8 HT$0HL$(L$dH%(H$1rH|$8Lk _H|$8HH*H|$0HD$8Ht0H|$0HHD$0H|$(Ht H|$(HHD$(LAeAHD$8MAMAEH(E HD$H|$81H|$(HtH|$(HD$HL$H1H|$0t!H|$0HL$ HT$HL$ HT$HHl$@DD$EDd$D<$H$HLHH$dH3%(u0Hĸ[]A\A]A^A_Ð@D$I@Af.AVAUI ATAHUSHH dH%(HD$1HL$LD$H#1LDHk t?HT$H5;HHL$dH3 %(HH []A\A]A^H5 H|$11H5 H|$I11H|$H5 1I1LAIuGbHXLAu?JH1IH@n2f{RfAWI AVAUATIUSHHdH%(H$1H|$ HL$(?HC LHD$)I 1IHD$E1H|$(IA I1HH\$HT$0Hl$@HEHHOH|$HRHtHH$dH3 %(HD$ Hĸ[]A\A]A^A_IC1LLHþvH߃HgHD$0gD$4@LII<$ I|$1HD$HHD$8H$HD$@HD$f.HH9ID$L4LjI HHI~IFH|$8HLHHHD$@H|$@LHD$8H<$HD$@XH|$HCJHCI$ YI;l$ID$ Y@H@HD$0I~~IF H8HH|$8DH|$H H5vH812-f.SH=SHHa H5ZHHH5PHHH> H57HHH;H"H5#H;HH5H;HH51H;H$H5H;HH5xH;HH5]H;HH5BH;H8H51*H;H H5H;HH51H;HH5?H;HH51H;HH5H;H?H51H;HH5vH;HH51^H;HH5CH HH H HtpH H Ht=H Hg HuH=6 HJ Hc [fH=! H( fDH= _H sH=?H @HUHHSHH5HHHHH[]ATH=US0HA H5HHHH5HI"HH5HHH5uHH{HH HZH5YH8[]LH*H5IA\HHMark@handler11external_encodingUTF-16LEUTF-16BEnewParserANYUTF8UTF16LEUTF16BEpsych/syntax_errorSyntaxErrorparsemarkreadpathemptystart_streamend_streamstart_documentend_documentaliasscalarstart_sequenceend_sequencestart_mappingend_mapping lDtPsychVisitorsVisitorYAMLTreeprivate_iv_getlibyaml_version%stag tuple must be of length 2HandlerEmitterinitializecanonicalcanonical=indentationindentation=line_widthline_width=writemesgClassLoaderToRubybuild_exceptionpath2class;/, 4,LLdl| $t\|L| ,lLd,l4T< 4ll \$JIEg!ECbni^4Zg6$ei0脵VCRk V*RY !S>8z8.o Pvnx NҬYXwEWtfUScZ5H(9gZ/m%tIk4~p.H;sM` 9GgdKKyŜ}4UgNDcQNf25Dx)~"kXX re%͕4'&EzmcCCN}p]cR ٛ{8+B#[A"_Dg6zH8z7,[==3HVd[)rY(#7Um LBAG&".ӛʵ@ xuW;lƴh".vڿ =#5 |@sXdi-ejeAj\ '5@6xndDjy ])̴jH _kR-DžS3@M9Vy;2 f.7kG,ok\,P^9M"5< I*k[(1Yp;Bբ:e3s}b z\Wqch <'cWg9CQ^f0d!myWNkIM6sŧ1KS' _k+ti5AuyC❨vG3ar;K6uW2o!C,> %;gYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.bss.gnu_debuglink.gnu_debugdata $ol( `` 0 &8oEo@T^BXXXhcnp%p%y'tLL zLL94O4OPP@] @]H] H]P] P]X] X]`] `]0_ _p` `b bhbbgruby/json-1.7.7/lib/json/ext/parser.so000075500000066470147207305410013347 0ustar00ELF>@@xf@8@UU ]] ]  ]] ]  $$PtdQQQQtdRtd]] ] GNU;7rX (Q;4 @ 479BE|ŷ|!qX Lo?l\X)K 1u#a z8 R"y?qa c c <xa  @ E__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassesrb_str_buf_newrb_str_buf_catrb_utf8_encodingrb_enc_associaterb_ary_new2rb_ary_pushrb_hash_foreachrb_ary_entryrb_funcallrb_str_intern__stack_chk_failruby_xrealloc2ruby_xmalloc2rb_check_typerb_scan_argsrb_convert_typerb_string_valuerb_hash_arefrb_fix2intrb_str_duprb_eTypeErrorrb_raiserb_eArgErrorruby_xfreerb_gc_mark_mayberuby_xmallocrb_data_object_allocmemcpyrb_cstr2inumrb_cstr_to_dblrb_float_new_in_heaprb_class_new_instancerb_hash_newrb_hash_asetrb_ary_newInit_parserrb_requirerb_define_modulerb_define_module_underrb_cObjectrb_define_class_underrb_path2classrb_define_alloc_funcrb_define_methodrb_const_getrb_str_newrb_intern2libruby.so.2.0libpthread.so.0librt.so.1libdl.so.2libcrypt.so.1libm.so.6libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.14GLIBC_2.4gui ii ] ] ] ] _ _ _ _ _ $_ ,_ -_ .`  ` (` 0` 8` @`  H`  P`  X`  ``  h` p` x` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` `  a !a "a #a % a &(a '0a (8a )@a *Ha +Pa .Xa /`a 0ha 1pa 2xa 3HHN Ht{H5N %N @%N h%N h%N h%N h%N h%zN h%rN h%jN hp%bN h`%ZN h P%RN h @%JN h 0%BN h %:N h %2N h%*N h%"N h%N h%N h% N h%N h%M h%M h%M hp%M h`%M hP%M h@%M h0%M h %M h%M h%M h%M h %M h!%M h"%M h#%M h$%zM h%%rM h&%jM h'p%bM h(`%ZM h)P%RM h*@%JM h+0%BM h, H@M H=2M UH)HHw]HdK Ht]@H M H=M UH)HHHH?HHu]HGK Ht]H@=L u'H=7K UHt H=H h]L @f.H=H t&HJ HtUH=H H]WKf.HF; xIwH42@x;DGNEx,H:xHHH HL HH fD@f.AWIAVIAUATUH1SHH8dH%(HD$(1HL$*L9IM'H]GE1;"t_MPtLeXIWU8t E4H1AHDHL$(dH3 %(=H8[]A\A]A^A_@IMoM9`AG<"t/<\uMoM9AG3I6H5,LILhIWL9;AG<@1H|$(dH3<%(H8[]A\A]A^A_< t < t <wII]L9tAE<"H~ HL9uf>*HL9uHL9x*t/|HHCL9WS t"/HCL9)S*t5/tf.8 tHL9uD8*fHL9uHL9<*tHo! H HuH= H HUk{M I׮J-aI2池Ⓟb0 R)U0n 2 :Ԋ~ v0bk>Y}^9P0\Kx:Z^Op#Q՘\h\, O64 դcJHXLd$h>SBTǑ p{ʈ9!_9>K:[nE׽My%]2?A^*̝[zؔ%(JtHv %ƹ@<"$)<35 QubPցnTdޒ1RጭAS£s2>"LVE*֜r(wӈaT4i;OWGw6@ĽG9_Qcsj'X8@OF-Qsn%_ϥn:{r 5ɗ'y=bٿ~ɞSwD N"bqzMޛŹgoWbE2}\/7y⽪h/.Ck-;.|_NϨŤוrƱ L_|/ٙ\j6aC8E74XdP_+$asi>3XfїңoѲưOӑr4i3Y"QF w0To 7LՆzi>3}N_f}5;k?ZJ VlK1w 6P#U҄=ipQye˱gYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.bss.gnu_debuglink.gnu_debugdata $o<( 00p08oJ J tEo @T ^B  8h@@c``n@@N1tEE zEE QQRR] ]] ]] ]] ]] ] _ _@` `a aaaxeruby/json-1.7.7/lib/json/ext/generator.so000075500000107510147207305410014030 0ustar00ELF>@@8@,o,o 0}0} 0} p P}P} P}  $$Ptd```  QtdRtd0}0} 0} GNUhMzȷre2JJB$@ BDFBE|qXt)N BJeRBuC v+ { 4px8[a c+8 R"M\j )(    Z L __gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassesrb_funcallrb_check_typeruby_xmallocruby_xrealloc2ruby_xmalloc2memcpyruby_xfreerb_str_newrb_utf8_encodingrb_enc_associaterb_hash_arefrb_hash_newrb_obj_classrb_class_namerb_hash_asetrb_str_duprb_str_catrb_str_concatrb_str_internrb_ivar_setrb_ivar_getrb_ary_entryrb_string_value_cstrrb_iv_getrb_str_substrrb_intern2__stack_chk_failrb_convert_typerb_eArgErrorrb_raiserb_scan_argsrb_data_object_allocrb_string_value_ptrrb_path2class__isinf__isnanrb_cHashrb_cArrayrb_cStringrb_cFixnumrb_cBignumrb_cFloatrb_respond_torb_cFalseClassrb_cNilClassrb_cTrueClassrb_cSymbol__ctype_b_locrb_obj_is_kind_ofrb_const_getInit_generatorrb_requirerb_define_modulerb_define_module_underrb_cObjectrb_define_class_underrb_define_alloc_funcrb_define_singleton_methodrb_define_methodrb_define_aliasrb_cRegexplibruby.so.2.0libpthread.so.0librt.so.1libdl.so.2libcrypt.so.1libm.so.6libc.so.6_edata__bss_start_endGLIBC_2.3GLIBC_2.14GLIBC_2.4GLIBC_2.2.5 ii .8ii Cui M0} 8} pH} H} p x          ' ) + 0 1 3 8 9 : A  ( 0 8 @ H  P  X  `  h p x          Ȁ Ѐ ؀  ! " # $ % & ( * ,( -0 .8 /@ 2H 4P 5X 6` 7h :p ;x < = > ? @HHj HtH5"k %$k @%"k h%k h%k h% k h%k h%j h%j h%j hp%j h`%j h P%j h @%j h 0%j h %j h %j h%j h%j h%j h%j h%j h%j h%zj h%rj h%jj hp%bj h`%Zj hP%Rj h@%Jj h0%Bj h %:j h%2j h%*j h%"j h %j h!%j h"% j h#%j h$%i h%%i h&%i h'p%i h(`%i h)P%i h*@%i h+0%i h, %i h-%i h.%i h/%i h0Hi H=i UH)HHw]HLg Ht]@Hii H=bi UH)HHHH?HHu]Hg Ht]H@=)i u'H=og UHt H=d h]i @f.H=d t&Hg HtUH=rd H]WKf.HAf WfWf0WG@f.HH ^j H5i 1sUHSH H H߾HHm H~HH[]@f.S HHC [HHDUHSH HHm H߾HH]xH[]fDS HbHC [H@xHDUH SHH:HC H@rH[]Df.S HHC [xrHHЃDf.S HHC [xqHHЃDf.S HHC [xpHHЃDf.S HrHC [HxhHHЃ@f.UHSH H:Hm H߾)HHHEhH[]S HHC [H@hHDSHH HDH@H@H@H[fATIUHSHtSHOIT$HH)H9v:HHHH)H9rH9vI|$HkI\$ID$[]A\H?I $ID$IL$Df.U1SHHHtHH@HHHH[]Ðf.SHHHtNH[EDUSHHHwHHHJHHHH[]DATUHSH lHLe [H+H% unHHI|$@uHtID$@[]A\Ht H% HH{tH{HIl$HID$@[]A\DHkf.ATUHSH HLe H+H% unHHI|$0uHtID$0[]A\Ht H% HH{tH{H)Il$8ID$0[]A\DHkf.ATUHSH HLe H+H% u~HHI|$ u-HtSID$ ID$([]A\Ht &H% HH{tH{HiIl$(ID$ []A\DHkf.ATUHSH LHLe ;H+H% u~HHI|$u-HtID$ID$[]A\Ht fH% HH{tH{HIl$ID$[]A\DHkf.ATUHSH HLe {H+H% u~HHI<$u.HtI$ID$[]A\fHt H% HH{tH{HIl$I$[]A\fDHkf.SHH?HtOH{HtAH{ Ht3H{0Ht%H{@HtH{PHtH{XHtH{`HtH[@SHHOH=;.HHcH=]9HþHH5a H[1UDATUHSdHHHH5Ja H=[b I11LHHH=8H5a HH1H=3;HžkHHH=H[]A\DAU1I1ATUSHHHH5"a HHH5y:HH5_` HIĺ1HRHuJH='8HHnHHLHHH[]A\A]@H5_ HH[]LMA\A]1f.U11SHHHH5I` H5_ HHź1HHu@H=m7HHH\HHH[]HH5I_ HH[H1]1AWAVAUATUSHH(H<$dH%(HD$1& HIH5] Ls HH<$111HHD$HD$HH9L-9_ HH.1H1LHHD$ &HIAH|$HH<$HyH|$IWISH+LHLHE `HEH9cIvI>H5x^ HLHH mIvI~H5I^ HLHH FIv(I~ YH5^ HLHH Iv8I~02H5] HLHH IvHI~@ H5] HLHH A~pH5] LHHHH A~qH5`] LHHHH A~rH53] LHHHH bIVhH5'] LHTHH BIVxH5\ LHTHH "IH5l\ LHHTH HL$dH3 %(LuBH([]A\A]A^A_DLxH='4@H [ HHDAUIATI USHH 3H3LIm GHHzH5K\ HHH HwH5 \ HHH HH5[ HHH ]HH5[ HHH :HH5[ HHH HL%t[ H5-[ 1HEhdHII LHGL%Z H5Z 1HExHII LHL%Z H5Z 1HII LHusH5Z HHH LH5Z HHEpHH +H5|Z HHEqHH HLErH[]A\A]fLHHIsHIMZLNLHHHEx@LH}HqHEh@HǾHD$HD$L A L`HxIt$Le8HE0f.HǾHD$HD$L A iL`HxIt$LeHHE@f.HǾHD$~HD$L A L`HxIt$7Le(HE )f.HǾHD$.HD$L A L`HxIt$LeHEf.HǾHD$HD$L A t%L`HxIt$LeHEGfDIHxAIt$DIHxAIt$nf.IHxAIt$f.IHxAIt$f.IHxAIt$f.H _/HS/LHH^HIT H5r2H81pHǾHD$HD$HHEhDHǾHD$HD$HHEx"DATI UHSHHdH%(HD$1SHC H.LHH@hdHǀ1&H4$HtHDHT$dH3%(Hu H[]A\SHHHAuR@u\@unD1AHt HAt 1HfGAtHH 1[HxA@t1HAfW@t@AHS H2HC Hx@Ht [HpH [H=-1fS HHC Hx0Ht [Hp8[H=B-1fS HHC Hx Ht [Hp([H=-1yfS HrHC HxHt [HpK[H=,19fS H2HC H8Ht[Hp @[H=,1fATIHUHSH;H{H{HLHk[]A\Df.AT USHH[ HHkXIHHEHHEHU,HEHk`HHEHHEHU:HsHEHt HSH{`HuXHkPHtWHEHRHEHU,Hs@HEHtHSHH{PHt[]LA\fD롐HHCPDHHCX fHHC`&f.SIgfffffffHF/H dH%(HD$1HIIH?HH1H)fMHMAIHH?HH)HHH)H HA@uHxVI@LL9v$f.1HHH9@pQwLL)tLHD$dH3%(uH [MAAA-SHHH|$Ht$HL$H u,HHHL$t HHPH[f.HQf.UHSHHH>,HHuHtHHD$HD$H[]AWAVAUATIUHSHH8dH%(HD$(1HCHSHH MR H56R "HC1A<$L ;A LhL`11MfD$$HD$ D$ D$ \D$!uHD$L5,AD-LE<wmfDPIcLL=Z(ALH)LLHL9HHEs:HAD-LE<v<"Q<\AL=(tL9HErLH)t It H{HHCHS"HCHD$(dH3%(H8[]A\A]A^A_f.LAL='H)3It HLL$LL$@AL=A'fDAL=/'fDAL='fDILhA)L|$LD$HL$LAHL$LD$qAL=&^fDA LxL`M1D$ M9fT$$D$ \D$!uA?L-C+@fATDKI9Hl$ fFHHM rv`HRHuAA H5c1@}}uf[]LA\HI\$`[u}]uUHSHHHH9HtHH[]f.H9 HH0Hu)H=R= Ht@f.UHH`SHdH%(HD$1HH4$H=M: ( HH$H<$HHHH=HHT$dH3%(uH[]fATUHHSHdH%(HD$1HVH4$H=9 HH$5H<$Lg hH4$HHLHsHKHT$dH3%(u H[]A\ f.ATUHH.SHdH%(HD$1HH4$H=9 HH$H<$Lg H4$HHLHSHHT$dH3%(u H[]A\mf.ATIUHS/HHHډL[]A\.@f.ATIUH1SHH57 dH%(HD$1"H&HHL1HH4$H=8 HHH$HT$dH3%(u H[]A\Df.UHHSHdH%(HD$1H8H4$H=7 x HH$H<$NH56 1HH1HHH]H%HT$dH3%(uH[]fUH=SH~H=^H5HH7 H5|HH6 vH= H6 H=]H]6 HI6 H:2 H5 H=6 HLH55HH6 H=6 HXH5wH=`6 HiH5HH=A6 HZH5 )H="6 HkH5 1 H=6 HH5 H=5 HH5 1H=5 HH5 H=5 HuH5 1H=5 HH5u xH=q5 HH5d 1\H=U5 HH5R =H=65 HH5> 1!H=5 H#H5+ H=4 HtH5 1H=4 HH5 H=4 HH5 1H=4 H}H5 1H=4 H1H5 1sH=l4 HH5 1WH=P4 HH5 1;H=44 HmH5 H=4 H.H5 1H=3 HH5 H=3 HH5h 1H=3 H'H5b H=3 HXH5Z H=3 HB H5E ]H=f3 HH5> 1QH=J3 H) H5 'H=03 H9H5 H=3 H:H5 H=2 HH5 H=2 H5 WH5 HH2 AH:H5 HH2 H=2 H5b H%H5o HHG2 ZH=K2 H5U HPH5: HH 2 %H=2 H5& HH5 HH1 H=1 H5 mHH5 HH1 H=1 H5 8HH5 HHS1 H=w1 H5 HH5 HǹH1 aH= 1 HH5= 2H=0 HtH5P H=0 HH5= 1H=0 H5; tH H5/ HH0 H=0 H5 ?HXH5 HHB0 H=~0 H5 HH5m HH0 XH=I0 H5 H5? HHH/ #H5. HH+ H8DH/ H. HMHV/ Hw. HH7/ HX. HH/ H9. HH. H. HqH. H- H:H. H- HH. H- HH}. H- HH^. H- H^H?. H`- H'H . HA- HH. H"- HH- H- HHs- H, HKH- H, HH- H, HHv- H, HHW- Hh, HoH8- HI, H8H- H*, HH, H , HH, H+ HH, H+ H\H, H+ H%H=Hb, -H~+ HHH=nHHǺ1HYH- H;+ Ht~H- H + HtKHl- H+ HuH=IH* H, H, H[]H= H* fDH=H* eH=wH* HH=OHh* H=\/HP* H=6H8* PH=  H * H=ϿH* H=诿H) H=菿H) tH=uoH) =H=K OH) H=$/H) H=Hx) H=H`) aH=ϾHH) *H=o 课H0) H=y 菾H) H=O oH) H= OH( NH=/H( H=Z H( H= H( H=ϽH( rH=诽Hp( ;H=k菽HX( H=oH@( H=&OH(( H=@ 1H( HOHH0123456789abcdefC*@instance_variablesto_hashHashto_h01\n\r\t\f\b\\\"JSON::GeneratorErrorunallocated JSON::State%u: %li not allowed in JSONnullfalsetruenesting of %ld is too deepjson/commonExtGeneratorJSON::NestingErrorfrom_stateinitializeinitialize_copyindentindent=spacespace=space_beforespace_before=object_nlobject_nl=array_nlarray_nl=max_nestingmax_nesting=check_circular?allow_nan?ascii_only?quirks_mode?quirks_modequirks_mode=depthdepth=buffer_initial_lengthbuffer_initial_length=configuremerge[][]=generateGeneratorMethodsObjectto_jsonArrayFixnumBignumFloatStringincludedto_json_rawto_json_raw_objectExtendjson_createTrueClassFalseClassNilClassMULTILINEto_snewallow_nanascii_onlyunpackcreate_idextendkey?__send__respond_to?matchkeysduputf-8findEncodingencodingencodeSAFE_STATE_PROTOTYPEopts has to be hash like or convertable into a hashpartial character in source, but hit endsource sequence is illegal/malformed utf-8source sequence is illegal/malformed utf8only generation of JSON objects or arrays allowedp0`XH8(pP01234567890    ; @ (0PhPp8Xx@pк Px@@` ` @`p@H@ @@`P0 0 X P 0 @ p    P@ h p  @0 h `8zRx $ FJ w?;*3$"DصB\$tBADL iFA@ AR$@:ADL aFAXAR$X1AIG XFA,p!ARL!ARl!AR"AR$8ADL dAAȶARȶ7Au,BDD V ABA $DH5ACG gAAl`AU$`;AAG lDA<xBAD P AGA w ABF <BAD P AGA w ABF <4XBAD Y AGH w ABF <tظBAD Y AGH w ABF <XBAD W AGJ v ABG ع|Av8[AN,4xBAD ABLdBIA A(J0 (F ABBE K(D AMB4xAEJ X HAO KDKL BBB B(A0A8G` 8A0A(B BBBF <<KBEI A(D@ (A ABBC 4|BIF G0k  AABA Aj E 7A[ L A7A[ L A7A[ L A47A[ L AT7AZ M A,t81BGD `AB,HFBFA  AEG $hAU0 AA $ VAG | AK $$X9ADG0jAALLpwBBB B(I0D8Gp 8A0A(B BBBK ,BGA  AEB 4P BDA M0N  GABL (BEE D(H02 (A BBEL Z (A BBEL K (A BBBN M (A EBBI A (A QBBI W (A BBBR W (A EBBO L (A BBBM LHBEB B(D0A8D 8A0A(B BBBD L x*BEB B(A0D8Dc 8A0A(B BBBG ,d X=BDA kDB, hBAA  AEI D 8ADM N DAK o CAM K DKF $ AK u AA $4 AK u AA $\ pAK u AA 4 BAK D0u  AABA 4 @BAK D0v  AABA , AKD0o AAA 4$ BAK D0w  AABA 4\ pBAK D0w  AABA , 2BDF ^AB4 BDH D0u  AABA , PAKD0 AAA ,, AHD  AAH pH}    Z0} 8} o0 Y  (0 o ooJ oP} &6FVfv&6FVfv&6FVfvgenerator.so.debugc7zXZִF!t//]?Eh=ڊ2NsK|6oL *i_b}~}$!)zʥG2H)$w-ysTls^X҈ݶչ klLGT{PXM?%% *ʑ}_NP&6X%׭d ەy$C| 2n*='9Qwyb?Ihp;?J= j”?0cC{l;-); i碎u6z4 kc4C!TL[du˞%]"uv>S}\oxD/K 'Bҡs`']XP o=̡4 dO!Dд6u2z/'o"]R/fGuJLɒv{>O%B~+m8!=Kc=Nچ5$־Q gMraii$vb~O4sDj I79}6qmީIgo;l{8 6/%k.timVizV(5oYxۤ>0y JFR28m;!F LS i4"jR"Ut$3-F"Me![~Le8kc&J*O vX!(h}zd&gdMgo&<;?3^d=4i_bkA nWLP;NGB#[Ď%aX Kΐ6@$,-Rct?r*m˵!7C "LT0)Q棦j8%f(; =9(Y1Yx2Ӱv: >CcVE(M8?K(XΓL]8LΗ }H[Ngqiy-B3 '?n%[zN-#.Y=E݊ݠR"`{GC}|SLso)wڢEzV0C4P0}RWt+FMv: njASHJhJ%!ݙ!)MTZp؛M] $z+UBR~W_J>U UAٺK+`p>+#=eg)k)ZwuS]C*7D:'QrQ,rH:)BFׯX B%!^fO1 .?SkngYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.data.rel.ro.dynamic.got.got.plt.bss.gnu_debuglink.gnu_debugdata $o<( 000Y8oJ J Eo PT00^B((hc nBtZZ zZZ  `` bb\ 0} 0}8} 8}@} @}H} H}P} P} p p  gems/bigdecimal-1.2.0/lib/bigdecimal/jacobian.rb000064400000004073147207544650015156 0ustar00# # require 'bigdecimal/jacobian' # # Provides methods to compute the Jacobian matrix of a set of equations at a # point x. In the methods below: # # f is an Object which is used to compute the Jacobian matrix of the equations. # It must provide the following methods: # # f.values(x):: returns the values of all functions at x # # f.zero:: returns 0.0 # f.one:: returns 1.0 # f.two:: returns 2.0 # f.ten:: returns 10.0 # # f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal. # # x is the point at which to compute the Jacobian. # # fx is f.values(x). # module Jacobian module_function # Determines the equality of two numbers by comparing to zero, or using the epsilon value def isEqual(a,b,zero=0.0,e=1.0e-8) aa = a.abs bb = b.abs if aa == zero && bb == zero then true else if ((a-b)/(aa+bb)).abs < e then true else false end end end # Computes the derivative of f[i] at x[i]. # fx is the value of f at x. def dfdxi(f,fx,x,i) nRetry = 0 n = x.size xSave = x[i] ok = 0 ratio = f.ten*f.ten*f.ten dx = x[i].abs/ratio dx = fx[i].abs/ratio if isEqual(dx,f.zero,f.zero,f.eps) dx = f.one/f.ten if isEqual(dx,f.zero,f.zero,f.eps) until ok>0 do s = f.zero deriv = [] nRetry += 1 if nRetry > 100 raise "Singular Jacobian matrix. No change at x[" + i.to_s + "]" end dx = dx*f.two x[i] += dx fxNew = f.values(x) for j in 0...n do if !isEqual(fxNew[j],fx[j],f.zero,f.eps) then ok += 1 deriv <<= (fxNew[j]-fx[j])/dx else deriv <<= f.zero end end x[i] = xSave end deriv end # Computes the Jacobian of f at x. fx is the value of f at x. def jacobian(f,fx,x) n = x.size dfdx = Array::new(n*n) for i in 0...n do df = dfdxi(f,fx,x,i) for j in 0...n do dfdx[j*n+i] = df[j] end end dfdx end end gems/bigdecimal-1.2.0/lib/bigdecimal/newton.rb000064400000003435147207544650014723 0ustar00require "bigdecimal/ludcmp" require "bigdecimal/jacobian" # # newton.rb # # Solves the nonlinear algebraic equation system f = 0 by Newton's method. # This program is not dependent on BigDecimal. # # To call: # n = nlsolve(f,x) # where n is the number of iterations required, # x is the initial value vector # f is an Object which is used to compute the values of the equations to be solved. # It must provide the following methods: # # f.values(x):: returns the values of all functions at x # # f.zero:: returns 0.0 # f.one:: returns 1.0 # f.two:: returns 2.0 # f.ten:: returns 10.0 # # f.eps:: returns the convergence criterion (epsilon value) used to determine whether two values are considered equal. If |a-b| < epsilon, the two values are considered equal. # # On exit, x is the solution vector. # module Newton include LUSolve include Jacobian module_function def norm(fv,zero=0.0) s = zero n = fv.size for i in 0...n do s += fv[i]*fv[i] end s end def nlsolve(f,x) nRetry = 0 n = x.size f0 = f.values(x) zero = f.zero one = f.one two = f.two p5 = one/two d = norm(f0,zero) minfact = f.ten*f.ten*f.ten minfact = one/minfact e = f.eps while d >= e do nRetry += 1 # Not yet converged. => Compute Jacobian matrix dfdx = jacobian(f,f0,x) # Solve dfdx*dx = -f0 to estimate dx dx = lusolve(dfdx,f0,ludecomp(dfdx,n,zero,one),zero) fact = two xs = x.dup begin fact *= p5 if fact < minfact then raise "Failed to reduce function values." end for i in 0...n do x[i] = xs[i] - dx[i]*fact end f0 = f.values(x) dn = norm(f0,zero) end while(dn>=d) d = dn end nRetry end end gems/bigdecimal-1.2.0/lib/bigdecimal/math.rb000064400000011742147207544650014342 0ustar00require 'bigdecimal' # #-- # Contents: # sqrt(x, prec) # sin (x, prec) # cos (x, prec) # atan(x, prec) Note: |x|<1, x=0.9999 may not converge. # PI (prec) # E (prec) == exp(1.0,prec) # # where: # x ... BigDecimal number to be computed. # |x| must be small enough to get convergence. # prec ... Number of digits to be obtained. #++ # # Provides mathematical functions. # # Example: # # require "bigdecimal" # require "bigdecimal/math" # # include BigMath # # a = BigDecimal((PI(100)/2).to_s) # puts sin(a,100) # -> 0.10000000000000000000......E1 # module BigMath module_function # Computes the square root of x to the specified number of digits of # precision. # # BigDecimal.new('2').sqrt(16).to_s # -> "0.14142135623730950488016887242096975E1" # def sqrt(x,prec) x.sqrt(prec) end # Computes the sine of x to the specified number of digits of precision. # # If x is infinite or NaN, returns NaN. def sin(x, prec) raise ArgumentError, "Zero or negative precision for sin" if prec <= 0 return BigDecimal("NaN") if x.infinite? || x.nan? n = prec + BigDecimal.double_fig one = BigDecimal("1") two = BigDecimal("2") x = -x if neg = x < 0 if x > (twopi = two * BigMath.PI(prec)) if x > 30 x %= twopi else x -= twopi while x > twopi end end x1 = x x2 = x.mult(x,n) sign = 1 y = x d = y i = one z = one while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) m = BigDecimal.double_fig if m < BigDecimal.double_fig sign = -sign x1 = x2.mult(x1,n) i += two z *= (i-one) * i d = sign * x1.div(z,m) y += d end neg ? -y : y end # Computes the cosine of x to the specified number of digits of precision. # # If x is infinite or NaN, returns NaN. def cos(x, prec) raise ArgumentError, "Zero or negative precision for cos" if prec <= 0 return BigDecimal("NaN") if x.infinite? || x.nan? n = prec + BigDecimal.double_fig one = BigDecimal("1") two = BigDecimal("2") x = -x if x < 0 if x > (twopi = two * BigMath.PI(prec)) if x > 30 x %= twopi else x -= twopi while x > twopi end end x1 = one x2 = x.mult(x,n) sign = 1 y = one d = y i = BigDecimal("0") z = one while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) m = BigDecimal.double_fig if m < BigDecimal.double_fig sign = -sign x1 = x2.mult(x1,n) i += two z *= (i-one) * i d = sign * x1.div(z,m) y += d end y end # Computes the arctangent of x to the specified number of digits of precision. # # If x is NaN, returns NaN. def atan(x, prec) raise ArgumentError, "Zero or negative precision for atan" if prec <= 0 return BigDecimal("NaN") if x.nan? pi = PI(prec) x = -x if neg = x < 0 return pi.div(neg ? -2 : 2, prec) if x.infinite? return pi / (neg ? -4 : 4) if x.round(prec) == 1 x = BigDecimal("1").div(x, prec) if inv = x > 1 x = (-1 + sqrt(1 + x**2, prec))/x if dbl = x > 0.5 n = prec + BigDecimal.double_fig y = x d = y t = x r = BigDecimal("3") x2 = x.mult(x,n) while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) m = BigDecimal.double_fig if m < BigDecimal.double_fig t = -t.mult(x2,n) d = t.div(r,m) y += d r += 2 end y *= 2 if dbl y = pi / 2 - y if inv y = -y if neg y end # Computes the value of pi to the specified number of digits of precision. def PI(prec) raise ArgumentError, "Zero or negative argument for PI" if prec <= 0 n = prec + BigDecimal.double_fig zero = BigDecimal("0") one = BigDecimal("1") two = BigDecimal("2") m25 = BigDecimal("-0.04") m57121 = BigDecimal("-57121") pi = zero d = one k = one w = one t = BigDecimal("-80") while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0) m = BigDecimal.double_fig if m < BigDecimal.double_fig t = t*m25 d = t.div(k,m) k = k+two pi = pi + d end d = one k = one w = one t = BigDecimal("956") while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0) m = BigDecimal.double_fig if m < BigDecimal.double_fig t = t.div(m57121,n) d = t.div(k,m) pi = pi + d k = k+two end pi end # Computes e (the base of natural logarithms) to the specified number of # digits of precision. def E(prec) raise ArgumentError, "Zero or negative precision for E" if prec <= 0 n = prec + BigDecimal.double_fig one = BigDecimal("1") y = one d = y z = one i = 0 while d.nonzero? && ((m = n - (y.exponent - d.exponent).abs) > 0) m = BigDecimal.double_fig if m < BigDecimal.double_fig i += 1 z *= i d = one.div(z,m) y += d end y end end gems/bigdecimal-1.2.0/lib/bigdecimal/util.rb000064400000004376147207544650014373 0ustar00class Integer < Numeric # call-seq: # int.to_d -> bigdecimal # # Convert +int+ to a BigDecimal and return it. # # require 'bigdecimal' # require 'bigdecimal/util' # # 42.to_d # # => # # def to_d BigDecimal(self) end end class Float < Numeric # call-seq: # flt.to_d -> bigdecimal # # Convert +flt+ to a BigDecimal and return it. # # require 'bigdecimal' # require 'bigdecimal/util' # # 0.5.to_d # # => # # def to_d(precision=nil) BigDecimal(self, precision || Float::DIG+1) end end class String # call-seq: # string.to_d -> bigdecimal # # Convert +string+ to a BigDecimal and return it. # # require 'bigdecimal' # require 'bigdecimal/util' # # "0.5".to_d # # => # # def to_d BigDecimal(self) end end class BigDecimal < Numeric # call-seq: # a.to_digits -> string # # Converts a BigDecimal to a String of the form "nnnnnn.mmm". # This method is deprecated; use BigDecimal#to_s("F") instead. # # require 'bigdecimal' # require 'bigdecimal/util' # # d = BigDecimal.new("3.14") # d.to_digits # # => "3.14" def to_digits if self.nan? || self.infinite? || self.zero? self.to_s else i = self.to_i.to_s _,f,_,z = self.frac.split i + "." + ("0"*(-z)) + f end end # call-seq: # a.to_d -> bigdecimal # # Returns self. def to_d self end end class Rational < Numeric # call-seq: # r.to_d(precision) -> bigdecimal # # Converts a Rational to a BigDecimal. # # The required +precision+ parameter is used to determine the amount of # significant digits for the result. See BigDecimal#div for more information, # as it is used along with the #denominator and the +precision+ for # parameters. # # r = (22/7.0).to_r # # => (7077085128725065/2251799813685248) # r.to_d(3) # # => # def to_d(precision) if precision <= 0 raise ArgumentError, "negative precision" end num = self.numerator BigDecimal(num).div(self.denominator, precision) end end gems/bigdecimal-1.2.0/lib/bigdecimal/ludcmp.rb000064400000004142147207544650014671 0ustar00require 'bigdecimal' # # Solves a*x = b for x, using LU decomposition. # module LUSolve module_function # Performs LU decomposition of the n by n matrix a. def ludecomp(a,n,zero=0,one=1) prec = BigDecimal.limit(nil) ps = [] scales = [] for i in 0...n do # pick up largest(abs. val.) element in each row. ps <<= i nrmrow = zero ixn = i*n for j in 0...n do biggst = a[ixn+j].abs nrmrow = biggst if biggst>nrmrow end if nrmrow>zero then scales <<= one.div(nrmrow,prec) else raise "Singular matrix" end end n1 = n - 1 for k in 0...n1 do # Gaussian elimination with partial pivoting. biggst = zero; for i in k...n do size = a[ps[i]*n+k].abs*scales[ps[i]] if size>biggst then biggst = size pividx = i end end raise "Singular matrix" if biggst<=zero if pividx!=k then j = ps[k] ps[k] = ps[pividx] ps[pividx] = j end pivot = a[ps[k]*n+k] for i in (k+1)...n do psin = ps[i]*n a[psin+k] = mult = a[psin+k].div(pivot,prec) if mult!=zero then pskn = ps[k]*n for j in (k+1)...n do a[psin+j] -= mult.mult(a[pskn+j],prec) end end end end raise "Singular matrix" if a[ps[n1]*n+n1] == zero ps end # Solves a*x = b for x, using LU decomposition. # # a is a matrix, b is a constant vector, x is the solution vector. # # ps is the pivot, a vector which indicates the permutation of rows performed # during LU decomposition. def lusolve(a,b,ps,zero=0.0) prec = BigDecimal.limit(nil) n = ps.size x = [] for i in 0...n do dot = zero psin = ps[i]*n for j in 0...i do dot = a[psin+j].mult(x[j],prec) + dot end x <<= b[ps[i]] - dot end (n-1).downto(0) do |i| dot = zero psin = ps[i]*n for j in (i+1)...n do dot = a[psin+j].mult(x[j],prec) + dot end x[i] = (x[i]-dot).div(a[psin+i],prec) end x end end gems/rdoc-4.0.0/bin/ri000075500000000274147207544650010214 0ustar00#!/usr/bin/env ruby begin gem 'rdoc' rescue NameError => e # --disable-gems raise unless e.name == :gem rescue Gem::LoadError end require 'rdoc/ri/driver' RDoc::RI::Driver.run ARGV gems/rdoc-4.0.0/bin/rdoc000075500000001652147207544650010532 0ustar00#!/usr/bin/env ruby # # RDoc: Documentation tool for source code # (see lib/rdoc/rdoc.rb for more information) # # Copyright (c) 2003 Dave Thomas # Released under the same terms as Ruby begin gem 'rdoc' rescue NameError => e # --disable-gems raise unless e.name == :gem rescue Gem::LoadError end require 'rdoc/rdoc' begin r = RDoc::RDoc.new r.document ARGV rescue Errno::ENOSPC $stderr.puts 'Ran out of space creating documentation' $stderr.puts $stderr.puts 'Please free up some space and try again' rescue SystemExit raise rescue Exception => e if $DEBUG_RDOC then $stderr.puts e.message $stderr.puts "#{e.backtrace.join "\n\t"}" $stderr.puts elsif Interrupt === e then $stderr.puts $stderr.puts 'Interrupted' else $stderr.puts "uh-oh! RDoc had a problem:" $stderr.puts e.message $stderr.puts $stderr.puts "run with --debug for full backtrace" end exit 1 end gems/rdoc-4.0.0/lib/rdoc.rb000064400000011602147207544650011123 0ustar00$DEBUG_RDOC = nil # :main: README.rdoc ## # RDoc produces documentation for Ruby source files by parsing the source and # extracting the definition for classes, modules, methods, includes and # requires. It associates these with optional documentation contained in an # immediately preceding comment block then renders the result using an output # formatter. # # For a simple introduction to writing or generating documentation using RDoc # see the README. # # == Roadmap # # If you think you found a bug in RDoc see DEVELOPERS@Bugs # # If you want to use RDoc to create documentation for your Ruby source files, # see RDoc::Markup and refer to rdoc --help for command line usage. # # If you want to set the default markup format see # RDoc::Markup@Supported+Formats # # If you want to store rdoc configuration in your gem (such as the default # markup format) see RDoc::Options@Saved+Options # # If you want to write documentation for Ruby files see RDoc::Parser::Ruby # # If you want to write documentation for extensions written in C see # RDoc::Parser::C # # If you want to generate documentation using rake see RDoc::Task. # # If you want to drive RDoc programmatically, see RDoc::RDoc. # # If you want to use the library to format text blocks into HTML or other # formats, look at RDoc::Markup. # # If you want to make an RDoc plugin such as a generator or directive handler # see RDoc::RDoc. # # If you want to write your own output generator see RDoc::Generator. # # If you want an overview of how RDoc works see DEVELOPERS # # == Credits # # RDoc is currently being maintained by Eric Hodel . # # Dave Thomas is the original author of RDoc. # # * The Ruby parser in rdoc/parse.rb is based heavily on the outstanding # work of Keiju ISHITSUKA of Nippon Rational Inc, who produced the Ruby # parser for irb and the rtags package. module RDoc ## # Exception thrown by any rdoc error. class Error < RuntimeError; end ## # RDoc version you are using VERSION = '4.0.0' ## # Method visibilities VISIBILITIES = [:public, :protected, :private] ## # Name of the dotfile that contains the description of files to be processed # in the current directory DOT_DOC_FILENAME = ".document" ## # General RDoc modifiers GENERAL_MODIFIERS = %w[nodoc].freeze ## # RDoc modifiers for classes CLASS_MODIFIERS = GENERAL_MODIFIERS ## # RDoc modifiers for attributes ATTR_MODIFIERS = GENERAL_MODIFIERS ## # RDoc modifiers for constants CONSTANT_MODIFIERS = GENERAL_MODIFIERS ## # RDoc modifiers for methods METHOD_MODIFIERS = GENERAL_MODIFIERS + %w[arg args yield yields notnew not-new not_new doc] ## # Loads the best available YAML library. def self.load_yaml begin gem 'psych' rescue Gem::LoadError end begin require 'psych' rescue ::LoadError ensure require 'yaml' end end autoload :RDoc, 'rdoc/rdoc' autoload :TestCase, 'rdoc/test_case' autoload :CrossReference, 'rdoc/cross_reference' autoload :ERBIO, 'rdoc/erbio' autoload :ERBPartial, 'rdoc/erb_partial' autoload :Encoding, 'rdoc/encoding' autoload :Generator, 'rdoc/generator' autoload :Options, 'rdoc/options' autoload :Parser, 'rdoc/parser' autoload :Servlet, 'rdoc/servlet' autoload :RI, 'rdoc/ri' autoload :Stats, 'rdoc/stats' autoload :Store, 'rdoc/store' autoload :Task, 'rdoc/task' autoload :Text, 'rdoc/text' autoload :Markdown, 'rdoc/markdown' autoload :Markup, 'rdoc/markup' autoload :RD, 'rdoc/rd' autoload :TomDoc, 'rdoc/tom_doc' autoload :KNOWN_CLASSES, 'rdoc/known_classes' autoload :RubyLex, 'rdoc/ruby_lex' autoload :RubyToken, 'rdoc/ruby_token' autoload :TokenStream, 'rdoc/token_stream' autoload :Comment, 'rdoc/comment' # code objects # # We represent the various high-level code constructs that appear in Ruby # programs: classes, modules, methods, and so on. autoload :CodeObject, 'rdoc/code_object' autoload :Context, 'rdoc/context' autoload :TopLevel, 'rdoc/top_level' autoload :AnonClass, 'rdoc/anon_class' autoload :ClassModule, 'rdoc/class_module' autoload :NormalClass, 'rdoc/normal_class' autoload :NormalModule, 'rdoc/normal_module' autoload :SingleClass, 'rdoc/single_class' autoload :Alias, 'rdoc/alias' autoload :AnyMethod, 'rdoc/any_method' autoload :MethodAttr, 'rdoc/method_attr' autoload :GhostMethod, 'rdoc/ghost_method' autoload :MetaMethod, 'rdoc/meta_method' autoload :Attr, 'rdoc/attr' autoload :Constant, 'rdoc/constant' autoload :Include, 'rdoc/include' autoload :Extend, 'rdoc/extend' autoload :Require, 'rdoc/require' end gems/rdoc-4.0.0/lib/rdoc/task.rb000064400000017244147207544650012075 0ustar00#-- # Copyright (c) 2003, 2004 Jim Weirich, 2009 Eric Hodel # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ require 'rubygems' begin gem 'rdoc' rescue Gem::LoadError end unless defined?(RDoc) begin gem 'rake' rescue Gem::LoadError end unless defined?(Rake) require 'rdoc' require 'rake' require 'rake/tasklib' ## # RDoc::Task creates the following rake tasks to generate and clean up RDoc # output: # # [rdoc] # Main task for this RDoc task. # # [clobber_rdoc] # Delete all the rdoc files. This target is automatically added to the main # clobber target. # # [rerdoc] # Rebuild the rdoc files from scratch, even if they are not out of date. # # Simple Example: # # require 'rdoc/task' # # RDoc::Task.new do |rdoc| # rdoc.main = "README.rdoc" # rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") # end # # The +rdoc+ object passed to the block is an RDoc::Task object. See the # attributes list for the RDoc::Task class for available customization options. # # == Specifying different task names # # You may wish to give the task a different name, such as if you are # generating two sets of documentation. For instance, if you want to have a # development set of documentation including private methods: # # require 'rdoc/task' # # RDoc::Task.new :rdoc_dev do |rdoc| # rdoc.main = "README.doc" # rdoc.rdoc_files.include("README.rdoc", "lib/**/*.rb") # rdoc.options << "--all" # end # # The tasks would then be named :rdoc_dev, # :clobber_rdoc_dev, and :rerdoc_dev. # # If you wish to have completely different task names, then pass a Hash as # first argument. With the :rdoc, :clobber_rdoc and # :rerdoc options, you can customize the task names to your liking. # # For example: # # require 'rdoc/task' # # RDoc::Task.new(:rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", # :rerdoc => "rdoc:force") # # This will create the tasks :rdoc, :rdoc:clean and # :rdoc:force. class RDoc::Task < Rake::TaskLib ## # Name of the main, top level task. (default is :rdoc) attr_accessor :name ## # Comment markup format. rdoc, rd and tomdoc are supported. (default is # 'rdoc') attr_accessor :markup ## # Name of directory to receive the html output files. (default is "html") attr_accessor :rdoc_dir ## # Title of RDoc documentation. (defaults to rdoc's default) attr_accessor :title ## # Name of file to be used as the main, top level file of the RDoc. (default # is none) attr_accessor :main ## # Name of template to be used by rdoc. (defaults to rdoc's default) attr_accessor :template ## # Name of format generator (--format) used by rdoc. (defaults to # rdoc's default) attr_accessor :generator ## # List of files to be included in the rdoc generation. (default is []) attr_accessor :rdoc_files ## # Additional list of options to be passed rdoc. (default is []) attr_accessor :options ## # Whether to run the rdoc process as an external shell (default is false) attr_accessor :external ## # Create an RDoc task with the given name. See the RDoc::Task class overview # for documentation. def initialize name = :rdoc # :yield: self defaults check_names name @name = name yield self if block_given? define end ## # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and # :rerdoc. If other names are given an ArgumentError is raised. def check_names names return unless Hash === names invalid_options = names.keys.map { |k| k.to_sym } - [:rdoc, :clobber_rdoc, :rerdoc] unless invalid_options.empty? then raise ArgumentError, "invalid options: #{invalid_options.join ', '}" end end ## # Task description for the clobber rdoc task or its renamed equivalent def clobber_task_description "Remove RDoc HTML files" end ## # Sets default task values def defaults @name = :rdoc @rdoc_files = Rake::FileList.new @rdoc_dir = 'html' @main = nil @title = nil @template = nil @generator = nil @options = [] end ## # All source is inline now. This method is deprecated def inline_source # :nodoc: warn "RDoc::Task#inline_source is deprecated" true end ## # All source is inline now. This method is deprecated def inline_source=(value) # :nodoc: warn "RDoc::Task#inline_source is deprecated" end ## # Create the tasks defined by this task lib. def define desc rdoc_task_description task rdoc_task_name desc rerdoc_task_description task rerdoc_task_name => [clobber_task_name, rdoc_task_name] desc clobber_task_description task clobber_task_name do rm_r @rdoc_dir rescue nil end task :clobber => [clobber_task_name] directory @rdoc_dir rdoc_target_deps = [ @rdoc_files, Rake.application.rakefile ].flatten.compact task rdoc_task_name => [rdoc_target] file rdoc_target => rdoc_target_deps do @before_running_rdoc.call if @before_running_rdoc args = option_list + @rdoc_files $stderr.puts "rdoc #{args.join ' '}" if Rake.application.options.trace RDoc::RDoc.new.document args end self end ## # List of options that will be supplied to RDoc def option_list result = @options.dup result << "-o" << @rdoc_dir result << "--main" << main if main result << "--markup" << markup if markup result << "--title" << title if title result << "-T" << template if template result << '-f' << generator if generator result end ## # The block passed to this method will be called just before running the # RDoc generator. It is allowed to modify RDoc::Task attributes inside the # block. def before_running_rdoc(&block) @before_running_rdoc = block end ## # Task description for the rdoc task or its renamed equivalent def rdoc_task_description 'Build RDoc HTML files' end ## # Task description for the rerdoc task or its renamed description def rerdoc_task_description "Rebuild RDoc HTML files" end private def rdoc_target "#{rdoc_dir}/index.html" end def rdoc_task_name case name when Hash then (name[:rdoc] || "rdoc").to_s else name.to_s end end def clobber_task_name case name when Hash then (name[:clobber_rdoc] || "clobber_rdoc").to_s else "clobber_#{name}" end end def rerdoc_task_name case name when Hash then (name[:rerdoc] || "rerdoc").to_s else "re#{name}" end end end # :stopdoc: module Rake ## # For backwards compatibility RDocTask = RDoc::Task end # :startdoc: gems/rdoc-4.0.0/lib/rdoc/require.rb000064400000001647147207544650012607 0ustar00## # A file loaded by \#require class RDoc::Require < RDoc::CodeObject ## # Name of the required file attr_accessor :name ## # Creates a new Require that loads +name+ with +comment+ def initialize(name, comment) super() @name = name.gsub(/'|"/, "") #' @top_level = nil self.comment = comment end def inspect # :nodoc: "#<%s:0x%x require '%s' in %s>" % [ self.class, object_id, @name, parent_file_name, ] end def to_s # :nodoc: "require #{name} in: #{parent}" end ## # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. def top_level @top_level ||= begin tl = RDoc::TopLevel.all_files_hash[name + '.rb'] if tl.nil? and RDoc::TopLevel.all_files.first.full_name =~ %r(^lib/) then # second chance tl = RDoc::TopLevel.all_files_hash['lib/' + name + '.rb'] end tl end end end gems/rdoc-4.0.0/lib/rdoc/include.rb000064400000005165147207544650012555 0ustar00## # A Module include in a class with \#include class RDoc::Include < RDoc::CodeObject ## # Name of included module attr_accessor :name ## # Creates a new Include for +name+ with +comment+ def initialize(name, comment) super() @name = name self.comment = comment @module = nil # cache for module if found end ## # Includes are sorted by name def <=> other return unless self.class === other name <=> other.name end def == other # :nodoc: self.class === other and @name == other.name end alias eql? == ## # Full name based on #module def full_name m = self.module RDoc::ClassModule === m ? m.full_name : @name end def hash # :nodoc: [@name, self.module].hash end def inspect # :nodoc: "#<%s:0x%x %s.include %s>" % [ self.class, object_id, parent_name, @name, ] end ## # Attempts to locate the included module object. Returns the name if not # known. # # The scoping rules of Ruby to resolve the name of an included module are: # - first look into the children of the current context; # - if not found, look into the children of included modules, # in reverse inclusion order; # - if still not found, go up the hierarchy of names. # # This method has O(n!) behavior when the module calling # include is referencing nonexistent modules. Avoid calling #module until # after all the files are parsed. This behavior is due to ruby's constant # lookup behavior. # # As of the beginning of October, 2011, no gem includes nonexistent modules. def module return @module if @module # search the current context return @name unless parent full_name = parent.child_name(@name) @module = @store.modules_hash[full_name] return @module if @module return @name if @name =~ /^::/ # search the includes before this one, in reverse order searched = parent.includes.take_while { |i| i != self }.reverse searched.each do |i| inc = i.module next if String === inc full_name = inc.child_name(@name) @module = @store.modules_hash[full_name] return @module if @module end # go up the hierarchy of names up = parent.parent while up full_name = up.child_name(@name) @module = @store.modules_hash[full_name] return @module if @module up = up.parent end @name end ## # Sets the store for this class or module and its contained code objects. def store= store super @file = @store.add_file @file.full_name if @file end def to_s # :nodoc: "include #@name in: #{parent}" end end gems/rdoc-4.0.0/lib/rdoc/test_case.rb000064400000006733147207544650013106 0ustar00require 'rubygems' require 'minitest/autorun' require 'minitest/benchmark' if ENV['BENCHMARK'] require 'fileutils' require 'pp' require 'tempfile' require 'tmpdir' require 'stringio' require 'rdoc' ## # RDoc::TestCase is an abstract TestCase to provide common setup and teardown # across all RDoc tests. The test case uses minitest, so all the assertions # of minitest may be used. # # The testcase provides the following: # # * A reset code-object tree # * A reset markup preprocessor (RDoc::Markup::PreProcess) # * The @RM alias of RDoc::Markup (for less typing) # * @pwd containing the current working directory # * FileUtils, pp, Tempfile, Dir.tmpdir and StringIO class RDoc::TestCase < MiniTest::Unit::TestCase ## # Abstract test-case setup def setup super @top_level = nil @have_encoding = Object.const_defined? :Encoding @RM = RDoc::Markup RDoc::Markup::PreProcess.reset @pwd = Dir.pwd @store = RDoc::Store.new @rdoc = RDoc::RDoc.new @rdoc.store = @store g = Object.new def g.class_dir() end def g.file_dir() end @rdoc.generator = g end ## # Shortcut for RDoc::Markup::BlankLine.new def blank_line @RM::BlankLine.new end ## # Shortcut for RDoc::Markup::BlockQuote.new with +contents+ def block *contents @RM::BlockQuote.new(*contents) end ## # Creates an RDoc::Comment with +text+ which was defined on +top_level+. # By default the comment has the 'rdoc' format. def comment text, top_level = @top_level RDoc::Comment.new text, top_level end ## # Shortcut for RDoc::Markup::Document.new with +contents+ def doc *contents @RM::Document.new(*contents) end ## # Shortcut for RDoc::Markup::HardBreak.new def hard_break @RM::HardBreak.new end ## # Shortcut for RDoc::Markup::Heading.new with +level+ and +text+ def head level, text @RM::Heading.new level, text end ## # Shortcut for RDoc::Markup::ListItem.new with +label+ and +parts+ def item label = nil, *parts @RM::ListItem.new label, *parts end ## # Shortcut for RDoc::Markup::List.new with +type+ and +items+ def list type = nil, *items @RM::List.new type, *items end ## # Shortcut for RDoc::Markup::Paragraph.new with +contents+ def para *a @RM::Paragraph.new(*a) end ## # Shortcut for RDoc::Markup::Rule.new with +weight+ def rule weight @RM::Rule.new weight end ## # Shortcut for RDoc::Markup::Raw.new with +contents+ def raw *contents @RM::Raw.new(*contents) end ## # Creates a temporary directory changes the current directory to it for the # duration of the block. # # Depends upon Dir.mktmpdir def temp_dir skip "No Dir::mktmpdir, upgrade your ruby" unless Dir.respond_to? :mktmpdir Dir.mktmpdir do |temp_dir| Dir.chdir temp_dir do yield temp_dir end end end ## # Shortcut for RDoc::Markup::Verbatim.new with +parts+ def verb *parts @RM::Verbatim.new(*parts) end ## # run capture_io with setting $VERBOSE = true def verbose_capture_io capture_io do begin orig_verbose = $VERBOSE $VERBOSE = true yield ensure $VERBOSE = orig_verbose end end end end # This hack allows autoload to work when Dir.pwd is changed for Ruby 1.8 since # -I paths are not expanded. $LOAD_PATH.each do |load_path| break if load_path[0] == ?/ load_path.replace File.expand_path load_path end if RUBY_VERSION < '1.9' gems/rdoc-4.0.0/lib/rdoc/class_module.rb000064400000046231147207544650013603 0ustar00## # ClassModule is the base class for objects representing either a class or a # module. class RDoc::ClassModule < RDoc::Context ## # 1:: # RDoc 3.7 # * Added visibility, singleton and file to attributes # * Added file to constants # * Added file to includes # * Added file to methods # 2:: # RDoc 3.13 # * Added extends # 3:: # RDoc 4.0 # * Added sections # * Added in_files # * Added parent name # * Complete Constant dump MARSHAL_VERSION = 3 # :nodoc: ## # Constants that are aliases for this class or module attr_accessor :constant_aliases ## # Comment and the location it came from. Use #add_comment to add comments attr_accessor :comment_location attr_accessor :diagram # :nodoc: ## # Class or module this constant is an alias for attr_accessor :is_alias_for ## # Return a RDoc::ClassModule of class +class_type+ that is a copy # of module +module+. Used to promote modules to classes. #-- # TODO move to RDoc::NormalClass (I think) def self.from_module class_type, mod klass = class_type.new mod.name mod.comment_location.each do |comment, location| klass.add_comment comment, location end klass.parent = mod.parent klass.section = mod.section klass.viewer = mod.viewer klass.attributes.concat mod.attributes klass.method_list.concat mod.method_list klass.aliases.concat mod.aliases klass.external_aliases.concat mod.external_aliases klass.constants.concat mod.constants klass.includes.concat mod.includes klass.extends.concat mod.extends klass.methods_hash.update mod.methods_hash klass.constants_hash.update mod.constants_hash klass.current_section = mod.current_section klass.in_files.concat mod.in_files klass.sections.concat mod.sections klass.unmatched_alias_lists = mod.unmatched_alias_lists klass.current_section = mod.current_section klass.visibility = mod.visibility klass.classes_hash.update mod.classes_hash klass.modules_hash.update mod.modules_hash klass.metadata.update mod.metadata klass.document_self = mod.received_nodoc ? nil : mod.document_self klass.document_children = mod.document_children klass.force_documentation = mod.force_documentation klass.done_documenting = mod.done_documenting # update the parent of all children (klass.attributes + klass.method_list + klass.aliases + klass.external_aliases + klass.constants + klass.includes + klass.extends + klass.classes + klass.modules).each do |obj| obj.parent = klass obj.full_name = nil end klass end ## # Creates a new ClassModule with +name+ with optional +superclass+ # # This is a constructor for subclasses, and must never be called directly. def initialize(name, superclass = nil) @constant_aliases = [] @diagram = nil @is_alias_for = nil @name = name @superclass = superclass @comment_location = [] # [[comment, location]] super() end ## # Adds +comment+ to this ClassModule's list of comments at +location+. This # method is preferred over #comment= since it allows ri data to be updated # across multiple runs. def add_comment comment, location return unless document_self original = comment comment = case comment when RDoc::Comment then comment.normalize else normalize_comment comment end @comment_location.delete_if { |(_, l)| l == location } @comment_location << [comment, location] self.comment = original end def add_things my_things, other_things # :nodoc: other_things.each do |group, things| my_things[group].each { |thing| yield false, thing } if my_things.include? group things.each do |thing| yield true, thing end end end ## # Ancestors list for this ClassModule: the list of included modules # (classes will add their superclass if any). # # Returns the included classes or modules, not the includes # themselves. The returned values are either String or # RDoc::NormalModule instances (see RDoc::Include#module). # # The values are returned in reverse order of their inclusion, # which is the order suitable for searching methods/attributes # in the ancestors. The superclass, if any, comes last. def ancestors includes.map { |i| i.module }.reverse end ## # Ancestors of this class or module only alias direct_ancestors ancestors ## # Clears the comment. Used by the ruby parser. def clear_comment @comment = '' end ## # This method is deprecated, use #add_comment instead. # # Appends +comment+ to the current comment, but separated by a rule. Works # more like +=. def comment= comment # :nodoc: comment = case comment when RDoc::Comment then comment.normalize else normalize_comment comment end comment = "#{@comment}\n---\n#{comment}" unless @comment.empty? super comment end ## # Prepares this ClassModule for use by a generator. # # See RDoc::Store#complete def complete min_visibility update_aliases remove_nodoc_children update_includes remove_invisible min_visibility end ## # Does this ClassModule or any of its methods have document_self set? def document_self_or_methods document_self || method_list.any?{ |m| m.document_self } end ## # Does this class or module have a comment with content or is # #received_nodoc true? def documented? super or !@comment_location.empty? end ## # Iterates the ancestors of this class or module for which an # RDoc::ClassModule exists. def each_ancestor # :yields: module return enum_for __method__ unless block_given? ancestors.each do |mod| next if String === mod next if self == mod yield mod end end ## # Looks for a symbol in the #ancestors. See Context#find_local_symbol. def find_ancestor_local_symbol symbol each_ancestor do |m| res = m.find_local_symbol(symbol) return res if res end nil end ## # Finds a class or module with +name+ in this namespace or its descendants def find_class_named name return self if full_name == name return self if @name == name @classes.values.find do |klass| next if klass == self klass.find_class_named name end end ## # Return the fully qualified name of this class or module def full_name @full_name ||= if RDoc::ClassModule === parent then "#{parent.full_name}::#{@name}" else @name end end ## # TODO: filter included items by #display? def marshal_dump # :nodoc: attrs = attributes.sort.map do |attr| [ attr.name, attr.rw, attr.visibility, attr.singleton, attr.file_name, ] end method_types = methods_by_type.map do |type, visibilities| visibilities = visibilities.map do |visibility, methods| method_names = methods.map do |method| [method.name, method.file_name] end [visibility, method_names.uniq] end [type, visibilities] end [ MARSHAL_VERSION, @name, full_name, @superclass, parse(@comment_location), attrs, constants, includes.map do |incl| [incl.name, parse(incl.comment), incl.file_name] end, method_types, extends.map do |ext| [ext.name, parse(ext.comment), ext.file_name] end, @sections.values, @in_files.map do |tl| tl.relative_name end, parent.full_name, parent.class, ] end def marshal_load array # :nodoc: initialize_visibility initialize_methods_etc @current_section = nil @document_self = true @done_documenting = false @parent = nil @temporary_section = nil @visibility = nil @classes = {} @modules = {} @name = array[1] @full_name = array[2] @superclass = array[3] @comment = array[4] @comment_location = if RDoc::Markup::Document === @comment.parts.first then @comment else RDoc::Markup::Document.new @comment end array[5].each do |name, rw, visibility, singleton, file| singleton ||= false visibility ||= :public attr = RDoc::Attr.new nil, name, rw, nil, singleton add_attribute attr attr.visibility = visibility attr.record_location RDoc::TopLevel.new file end array[6].each do |constant, comment, file| case constant when RDoc::Constant then add_constant constant else constant = add_constant RDoc::Constant.new(constant, nil, comment) constant.record_location RDoc::TopLevel.new file end end array[7].each do |name, comment, file| incl = add_include RDoc::Include.new(name, comment) incl.record_location RDoc::TopLevel.new file end array[8].each do |type, visibilities| visibilities.each do |visibility, methods| @visibility = visibility methods.each do |name, file| method = RDoc::AnyMethod.new nil, name method.singleton = true if type == 'class' method.record_location RDoc::TopLevel.new file add_method method end end end array[9].each do |name, comment, file| ext = add_extend RDoc::Extend.new(name, comment) ext.record_location RDoc::TopLevel.new file end if array[9] # Support Marshal version 1 sections = (array[10] || []).map do |section| [section.title, section] end @sections = Hash[*sections.flatten] @current_section = add_section nil @in_files = [] (array[11] || []).each do |filename| record_location RDoc::TopLevel.new filename end @parent_name = array[12] @parent_class = array[13] end ## # Merges +class_module+ into this ClassModule. # # The data in +class_module+ is preferred over the receiver. def merge class_module @parent = class_module.parent @parent_name = class_module.parent_name other_document = parse class_module.comment_location if other_document then document = parse @comment_location document = document.merge other_document @comment = @comment_location = document end cm = class_module other_files = cm.in_files merge_collections attributes, cm.attributes, other_files do |add, attr| if add then add_attribute attr else @attributes.delete attr @methods_hash.delete attr.pretty_name end end merge_collections constants, cm.constants, other_files do |add, const| if add then add_constant const else @constants.delete const @constants_hash.delete const.name end end merge_collections includes, cm.includes, other_files do |add, incl| if add then add_include incl else @includes.delete incl end end @includes.uniq! # clean up merge_collections extends, cm.extends, other_files do |add, ext| if add then add_extend ext else @extends.delete ext end end @extends.uniq! # clean up merge_collections method_list, cm.method_list, other_files do |add, meth| if add then add_method meth else @method_list.delete meth @methods_hash.delete meth.pretty_name end end merge_sections cm self end ## # Merges collection +mine+ with +other+ preferring other. +other_files+ is # used to help determine which items should be deleted. # # Yields whether the item should be added or removed (true or false) and the # item to be added or removed. # # merge_collections things, other.things, other.in_files do |add, thing| # if add then # # add the thing # else # # remove the thing # end # end def merge_collections mine, other, other_files, &block # :nodoc: my_things = mine. group_by { |thing| thing.file } other_things = other.group_by { |thing| thing.file } remove_things my_things, other_files, &block add_things my_things, other_things, &block end ## # Merges the comments in this ClassModule with the comments in the other # ClassModule +cm+. def merge_sections cm # :nodoc: my_sections = sections.group_by { |section| section.title } other_sections = cm.sections.group_by { |section| section.title } other_files = cm.in_files remove_things my_sections, other_files do |_, section| @sections.delete section.title end other_sections.each do |group, sections| if my_sections.include? group my_sections[group].each do |my_section| other_section = cm.sections_hash[group] my_comments = my_section.comments other_comments = other_section.comments other_files = other_section.in_files merge_collections my_comments, other_comments, other_files do |add, comment| if add then my_section.add_comment comment else my_section.remove_comment comment end end end else sections.each do |section| add_section group, section.comments end end end end ## # Does this object represent a module? def module? false end ## # Allows overriding the initial name. # # Used for modules and classes that are constant aliases. def name= new_name @name = new_name end ## # Parses +comment_location+ into an RDoc::Markup::Document composed of # multiple RDoc::Markup::Documents with their file set. def parse comment_location case comment_location when String then super when Array then docs = comment_location.map do |comment, location| doc = super comment doc.file = location doc end RDoc::Markup::Document.new(*docs) when RDoc::Comment then doc = super comment_location.text, comment_location.format doc.file = comment_location.location doc when RDoc::Markup::Document then return comment_location else raise ArgumentError, "unknown comment class #{comment_location.class}" end end ## # Path to this class or module for use with HTML generator output. def path http_url @store.rdoc.generator.class_dir end ## # Name to use to generate the url: # modules and classes that are aliases for another # module or class return the name of the latter. def name_for_path is_alias_for ? is_alias_for.full_name : full_name end ## # Returns the classes and modules that are not constants # aliasing another class or module. For use by formatters # only (caches its result). def non_aliases @non_aliases ||= classes_and_modules.reject { |cm| cm.is_alias_for } end ## # Updates the child modules or classes of class/module +parent+ by # deleting the ones that have been removed from the documentation. # # +parent_hash+ is either parent.modules_hash or # parent.classes_hash and +all_hash+ is ::all_modules_hash or # ::all_classes_hash. def remove_nodoc_children prefix = self.full_name + '::' modules_hash.each_key do |name| full_name = prefix + name modules_hash.delete name unless @store.modules_hash[full_name] end classes_hash.each_key do |name| full_name = prefix + name classes_hash.delete name unless @store.classes_hash[full_name] end end def remove_things my_things, other_files # :nodoc: my_things.delete_if do |file, things| next false unless other_files.include? file things.each do |thing| yield false, thing end true end end ## # Search record used by RDoc::Generator::JsonIndex def search_record [ name, full_name, full_name, '', path, '', snippet(@comment_location), ] end ## # Sets the store for this class or module and its contained code objects. def store= store super @attributes .each do |attr| attr.store = store end @constants .each do |const| const.store = store end @includes .each do |incl| incl.store = store end @extends .each do |ext| ext.store = store end @method_list.each do |meth| meth.store = store end end ## # Get the superclass of this class. Attempts to retrieve the superclass # object, returns the name if it is not known. def superclass @store.find_class_named(@superclass) || @superclass end ## # Set the superclass of this class to +superclass+ def superclass=(superclass) raise NoMethodError, "#{full_name} is a module" if module? @superclass = superclass end def to_s # :nodoc: if is_alias_for then "#{self.class.name} #{self.full_name} -> #{is_alias_for}" else super end end ## # 'module' or 'class' def type module? ? 'module' : 'class' end ## # Updates the child modules & classes by replacing the ones that are # aliases through a constant. # # The aliased module/class is replaced in the children and in # RDoc::Store#modules_hash or RDoc::Store#classes_hash # by a copy that has RDoc::ClassModule#is_alias_for set to # the aliased module/class, and this copy is added to #aliases # of the aliased module/class. # # Formatters can use the #non_aliases method to retrieve children that # are not aliases, for instance to list the namespace content, since # the aliased modules are included in the constants of the class/module, # that are listed separately. def update_aliases constants.each do |const| next unless cm = const.is_alias_for cm_alias = cm.dup cm_alias.name = const.name # Don't move top-level aliases under Object, they look ugly there unless RDoc::TopLevel === cm_alias.parent then cm_alias.parent = self cm_alias.full_name = nil # force update for new parent end cm_alias.aliases.clear cm_alias.is_alias_for = cm if cm.module? then @store.modules_hash[cm_alias.full_name] = cm_alias modules_hash[const.name] = cm_alias else @store.classes_hash[cm_alias.full_name] = cm_alias classes_hash[const.name] = cm_alias end cm.aliases << cm_alias end end ## # Deletes from #includes those whose module has been removed from the # documentation. #-- # FIXME: includes are not reliably removed, see _possible_bug test case def update_includes includes.reject! do |include| mod = include.module !(String === mod) && @store.modules_hash[mod.full_name].nil? end includes.uniq! end ## # Deletes from #extends those whose module has been removed from the # documentation. #-- # FIXME: like update_includes, extends are not reliably removed def update_extends extends.reject! do |ext| mod = ext.module !(String === mod) && @store.modules_hash[mod.full_name].nil? end extends.uniq! end end gems/rdoc-4.0.0/lib/rdoc/ri/formatter.rb000064400000000124147207544650013535 0ustar00## # For RubyGems backwards compatibility module RDoc::RI::Formatter # :nodoc: end gems/rdoc-4.0.0/lib/rdoc/ri/paths.rb000064400000011341147207544650012654 0ustar00require 'rdoc/ri' ## # The directories where ri data lives. Paths can be enumerated via ::each, or # queried individually via ::system_dir, ::site_dir, ::home_dir and ::gem_dir. module RDoc::RI::Paths #:stopdoc: require 'rbconfig' version = RbConfig::CONFIG['ruby_version'] BASE = if RbConfig::CONFIG.key? 'ridir' then File.join RbConfig::CONFIG['ridir'], version else File.join RbConfig::CONFIG['datadir'], 'ri', version end homedir = begin File.expand_path('~') rescue ArgumentError end homedir ||= ENV['HOME'] || ENV['USERPROFILE'] || ENV['HOMEPATH'] # for 1.8 compatibility HOMEDIR = if homedir then File.join homedir, ".rdoc" end #:startdoc: ## # Iterates over each selected path yielding the directory and type. # # Yielded types: # :system:: Where Ruby's ri data is stored. Yielded when +system+ is # true # :site:: Where ri for installed libraries are stored. Yielded when # +site+ is true. Normally no ri data is stored here. # :home:: ~/.rdoc. Yielded when +home+ is true. # :gem:: ri data for an installed gem. Yielded when +gems+ is true. # :extra:: ri data directory from the command line. Yielded for each # entry in +extra_dirs+ def self.each system = true, site = true, home = true, gems = :latest, *extra_dirs # :yields: directory, type return enum_for __method__, system, site, home, gems, *extra_dirs unless block_given? extra_dirs.each do |dir| yield dir, :extra end yield system_dir, :system if system yield site_dir, :site if site yield home_dir, :home if home and HOMEDIR gemdirs(gems).each do |dir| yield dir, :gem end if gems nil end ## # The ri directory for the gem with +gem_name+. def self.gem_dir name, version req = Gem::Requirement.new "= #{version}" spec = Gem::Specification.find_by_name name, req File.join spec.doc_dir, 'ri' end ## # The latest installed gems' ri directories. +filter+ can be :all or # :latest. # # A +filter+ :all includes all versions of gems and includes gems without # ri documentation. def self.gemdirs filter = :latest require 'rubygems' unless defined?(Gem) ri_paths = {} all = Gem::Specification.map do |spec| [File.join(spec.doc_dir, 'ri'), spec.name, spec.version] end if filter == :all then gemdirs = [] all.group_by do |_, name, _| name end.sort_by do |group, _| group end.map do |group, items| items.sort_by do |_, _, version| version end.reverse_each do |dir,| gemdirs << dir end end return gemdirs end all.each do |dir, name, ver| next unless File.exist? dir if ri_paths[name].nil? or ver > ri_paths[name].first then ri_paths[name] = [ver, name, dir] end end ri_paths.sort_by { |_, (_, name, _)| name }.map { |k, v| v.last } rescue LoadError [] end ## # The location of the rdoc data in the user's home directory. # # Like ::system, ri data in the user's home directory is rare and predates # libraries distributed via RubyGems. ri data is rarely generated into this # directory. def self.home_dir HOMEDIR end ## # Returns existing directories from the selected documentation directories # as an Array. # # See also ::each def self.path(system = true, site = true, home = true, gems = :latest, *extra_dirs) path = raw_path system, site, home, gems, *extra_dirs path.select { |directory| File.directory? directory } end ## # Returns selected documentation directories including nonexistent # directories. # # See also ::each def self.raw_path(system, site, home, gems, *extra_dirs) path = [] each(system, site, home, gems, *extra_dirs) do |dir, type| path << dir end path.compact end ## # The location of ri data installed into the site dir. # # Historically this was available for documentation installed by ruby # libraries predating RubyGems. It is unlikely to contain any content for # modern ruby installations. def self.site_dir File.join BASE, 'site' end ## # The location of the built-in ri data. # # This data is built automatically when `make` is run when ruby is # installed. If you did not install ruby by hand you may need to install # the documentation yourself. Please consult the documentation for your # package manager or ruby installer for details. You can also use the # rdoc-data gem to install system ri data for common versions of ruby. def self.system_dir File.join BASE, 'system' end end gems/rdoc-4.0.0/lib/rdoc/ri/driver.rb000064400000101341147207544650013030 0ustar00require 'abbrev' require 'optparse' begin require 'readline' rescue LoadError end begin require 'win32console' rescue LoadError end require 'rdoc' ## # For RubyGems backwards compatibility require 'rdoc/ri/formatter' ## # The RI driver implements the command-line ri tool. # # The driver supports: # * loading RI data from: # * Ruby's standard library # * RubyGems # * ~/.rdoc # * A user-supplied directory # * Paging output (uses RI_PAGER environment variable, PAGER environment # variable or the less, more and pager programs) # * Interactive mode with tab-completion # * Abbreviated names (ri Zl shows Zlib documentation) # * Colorized output # * Merging output from multiple RI data sources class RDoc::RI::Driver ## # Base Driver error class class Error < RDoc::RI::Error; end ## # Raised when a name isn't found in the ri data stores class NotFoundError < Error ## # Name that wasn't found alias name message def message # :nodoc: "Nothing known about #{super}" end end ## # Show all method documentation following a class or module attr_accessor :show_all ## # An RDoc::RI::Store for each entry in the RI path attr_accessor :stores ## # Controls the user of the pager vs $stdout attr_accessor :use_stdout ## # Default options for ri def self.default_options options = {} options[:interactive] = false options[:profile] = false options[:show_all] = false options[:use_cache] = true options[:use_stdout] = !$stdout.tty? options[:width] = 72 # By default all standard paths are used. options[:use_system] = true options[:use_site] = true options[:use_home] = true options[:use_gems] = true options[:extra_doc_dirs] = [] return options end ## # Dump +data_path+ using pp def self.dump data_path require 'pp' open data_path, 'rb' do |io| pp Marshal.load(io.read) end end ## # Parses +argv+ and returns a Hash of options def self.process_args argv options = default_options opts = OptionParser.new do |opt| opt.accept File do |file,| File.readable?(file) and not File.directory?(file) and file end opt.program_name = File.basename $0 opt.version = RDoc::VERSION opt.release = nil opt.summary_indent = ' ' * 4 opt.banner = <<-EOT Usage: #{opt.program_name} [options] [names...] Where name can be: Class | Module | Module::Class Class::method | Class#method | Class.method | method gem_name: | gem_name:README | gem_name:History All class names may be abbreviated to their minimum unambiguous form. If a name is ambiguous, all valid options will be listed. A '.' matches either class or instance methods, while #method matches only instance and ::method matches only class methods. README and other files may be displayed by prefixing them with the gem name they're contained in. If the gem name is followed by a ':' all files in the gem will be shown. The file name extension may be omitted where it is unambiguous. For example: #{opt.program_name} Fil #{opt.program_name} File #{opt.program_name} File.new #{opt.program_name} zip #{opt.program_name} rdoc:README Note that shell quoting or escaping may be required for method names containing punctuation: #{opt.program_name} 'Array.[]' #{opt.program_name} compact\\! To see the default directories ri will search, run: #{opt.program_name} --list-doc-dirs Specifying the --system, --site, --home, --gems or --doc-dir options will limit ri to searching only the specified directories. ri options may be set in the 'RI' environment variable. The ri pager can be set with the 'RI_PAGER' environment variable or the 'PAGER' environment variable. EOT opt.separator nil opt.separator "Options:" opt.separator nil opt.on("--[no-]interactive", "-i", "In interactive mode you can repeatedly", "look up methods with autocomplete.") do |interactive| options[:interactive] = interactive end opt.separator nil opt.on("--[no-]all", "-a", "Show all documentation for a class or", "module.") do |show_all| options[:show_all] = show_all end opt.separator nil opt.on("--[no-]list", "-l", "List classes ri knows about.") do |list| options[:list] = list end opt.separator nil opt.on("--[no-]pager", "-T", "Send output directly to stdout,", "rather than to a pager.") do |use_pager| options[:use_stdout] = !use_pager end opt.separator nil opt.on("--width=WIDTH", "-w", OptionParser::DecimalInteger, "Set the width of the output.") do |width| options[:width] = width end opt.separator nil opt.on("--server [PORT]", Integer, "Run RDoc server on the given port.", "The default port is 8214.") do |port| options[:server] = port || 8214 end opt.separator nil formatters = RDoc::Markup.constants.grep(/^To[A-Z][a-z]+$/).sort formatters = formatters.sort.map do |formatter| formatter.to_s.sub('To', '').downcase end formatters -= %w[html label test] # remove useless output formats opt.on("--format=NAME", "-f", "Uses the selected formatter. The default", "formatter is bs for paged output and ansi", "otherwise. Valid formatters are:", formatters.join(' '), formatters) do |value| options[:formatter] = RDoc::Markup.const_get "To#{value.capitalize}" end opt.separator nil opt.separator "Data source options:" opt.separator nil opt.on("--[no-]list-doc-dirs", "List the directories from which ri will", "source documentation on stdout and exit.") do |list_doc_dirs| options[:list_doc_dirs] = list_doc_dirs end opt.separator nil opt.on("--doc-dir=DIRNAME", "-d", Array, "List of directories from which to source", "documentation in addition to the standard", "directories. May be repeated.") do |value| value.each do |dir| unless File.directory? dir then raise OptionParser::InvalidArgument, "#{dir} is not a directory" end options[:extra_doc_dirs] << File.expand_path(dir) end end opt.separator nil opt.on("--no-standard-docs", "Do not include documentation from", "the Ruby standard library, site_lib,", "installed gems, or ~/.rdoc.", "Use with --doc-dir") do options[:use_system] = false options[:use_site] = false options[:use_gems] = false options[:use_home] = false end opt.separator nil opt.on("--[no-]system", "Include documentation from Ruby's standard", "library. Defaults to true.") do |value| options[:use_system] = value end opt.separator nil opt.on("--[no-]site", "Include documentation from libraries", "installed in site_lib.", "Defaults to true.") do |value| options[:use_site] = value end opt.separator nil opt.on("--[no-]gems", "Include documentation from RubyGems.", "Defaults to true.") do |value| options[:use_gems] = value end opt.separator nil opt.on("--[no-]home", "Include documentation stored in ~/.rdoc.", "Defaults to true.") do |value| options[:use_home] = value end opt.separator nil opt.separator "Debug options:" opt.separator nil opt.on("--[no-]profile", "Run with the ruby profiler") do |value| options[:profile] = value end opt.separator nil opt.on("--dump=CACHE", File, "Dumps data from an ri cache or data file") do |value| options[:dump_path] = value end end argv = ENV['RI'].to_s.split.concat argv opts.parse! argv options[:names] = argv options[:use_stdout] ||= !$stdout.tty? options[:use_stdout] ||= options[:interactive] options[:width] ||= 72 options rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e puts opts puts puts e exit 1 end ## # Runs the ri command line executable using +argv+ def self.run argv = ARGV options = process_args argv if options[:dump_path] then dump options[:dump_path] return end ri = new options ri.run end ## # Creates a new driver using +initial_options+ from ::process_args def initialize initial_options = {} @paging = false @classes = nil options = self.class.default_options.update(initial_options) @formatter_klass = options[:formatter] require 'profile' if options[:profile] @names = options[:names] @list = options[:list] @doc_dirs = [] @stores = [] RDoc::RI::Paths.each(options[:use_system], options[:use_site], options[:use_home], options[:use_gems], *options[:extra_doc_dirs]) do |path, type| @doc_dirs << path store = RDoc::RI::Store.new path, type store.load_cache @stores << store end @list_doc_dirs = options[:list_doc_dirs] @interactive = options[:interactive] @server = options[:server] @use_stdout = options[:use_stdout] @show_all = options[:show_all] # pager process for jruby @jruby_pager_process = nil end ## # Adds paths for undocumented classes +also_in+ to +out+ def add_also_in out, also_in return if also_in.empty? out << RDoc::Markup::Rule.new(1) out << RDoc::Markup::Paragraph.new("Also found in:") paths = RDoc::Markup::Verbatim.new also_in.each do |store| paths.parts.push store.friendly_path, "\n" end out << paths end ## # Adds a class header to +out+ for class +name+ which is described in # +classes+. def add_class out, name, classes heading = if classes.all? { |klass| klass.module? } then name else superclass = classes.map do |klass| klass.superclass unless klass.module? end.compact.shift || 'Object' superclass = superclass.full_name unless String === superclass "#{name} < #{superclass}" end out << RDoc::Markup::Heading.new(1, heading) out << RDoc::Markup::BlankLine.new end ## # Adds "(from ...)" to +out+ for +store+ def add_from out, store out << RDoc::Markup::Paragraph.new("(from #{store.friendly_path})") end ## # Adds +extends+ to +out+ def add_extends out, extends add_extension_modules out, 'Extended by', extends end ## # Adds a list of +extensions+ to this module of the given +type+ to +out+. # add_includes and add_extends call this, so you should use those directly. def add_extension_modules out, type, extensions return if extensions.empty? out << RDoc::Markup::Rule.new(1) out << RDoc::Markup::Heading.new(1, "#{type}:") extensions.each do |modules, store| if modules.length == 1 then include = modules.first name = include.name path = store.friendly_path out << RDoc::Markup::Paragraph.new("#{name} (from #{path})") if include.comment then out << RDoc::Markup::BlankLine.new out << include.comment end else out << RDoc::Markup::Paragraph.new("(from #{store.friendly_path})") wout, with = modules.partition { |incl| incl.comment.empty? } out << RDoc::Markup::BlankLine.new unless with.empty? with.each do |incl| out << RDoc::Markup::Paragraph.new(incl.name) out << RDoc::Markup::BlankLine.new out << incl.comment end unless wout.empty? then verb = RDoc::Markup::Verbatim.new wout.each do |incl| verb.push incl.name, "\n" end out << verb end end end end ## # Adds +includes+ to +out+ def add_includes out, includes add_extension_modules out, 'Includes', includes end ## # Looks up the method +name+ and adds it to +out+ def add_method out, name filtered = lookup_method name method_out = method_document name, filtered out.concat method_out.parts end ## # Adds documentation for all methods in +klass+ to +out+ def add_method_documentation out, klass klass.method_list.each do |method| begin add_method out, method.full_name rescue NotFoundError next end end end ## # Adds a list of +methods+ to +out+ with a heading of +name+ def add_method_list out, methods, name return if methods.empty? out << RDoc::Markup::Heading.new(1, "#{name}:") out << RDoc::Markup::BlankLine.new if @use_stdout and !@interactive then out.concat methods.map { |method| RDoc::Markup::Verbatim.new method } else out << RDoc::Markup::IndentedParagraph.new(2, methods.join(', ')) end out << RDoc::Markup::BlankLine.new end ## # Returns ancestor classes of +klass+ def ancestors_of klass ancestors = [] unexamined = [klass] seen = [] loop do break if unexamined.empty? current = unexamined.shift seen << current stores = classes[current] break unless stores and not stores.empty? klasses = stores.map do |store| store.ancestors[current] end.flatten.uniq klasses = klasses - seen ancestors.concat klasses unexamined.concat klasses end ancestors.reverse end ## # For RubyGems backwards compatibility def class_cache # :nodoc: end ## # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ def class_document name, found, klasses, includes, extends also_in = [] out = RDoc::Markup::Document.new add_class out, name, klasses add_includes out, includes add_extends out, extends found.each do |store, klass| comment = klass.comment # TODO the store's cache should always return an empty Array class_methods = store.class_methods[klass.full_name] || [] instance_methods = store.instance_methods[klass.full_name] || [] attributes = store.attributes[klass.full_name] || [] if comment.empty? and instance_methods.empty? and class_methods.empty? then also_in << store next end add_from out, store unless comment.empty? then out << RDoc::Markup::Rule.new(1) if comment.merged? then parts = comment.parts parts = parts.zip [RDoc::Markup::BlankLine.new] * parts.length parts.flatten! parts.pop out.concat parts else out << comment end end if class_methods or instance_methods or not klass.constants.empty? then out << RDoc::Markup::Rule.new(1) end unless klass.constants.empty? then out << RDoc::Markup::Heading.new(1, "Constants:") out << RDoc::Markup::BlankLine.new list = RDoc::Markup::List.new :NOTE constants = klass.constants.sort_by { |constant| constant.name } list.items.concat constants.map { |constant| parts = constant.comment.parts if constant.comment parts << RDoc::Markup::Paragraph.new('[not documented]') if parts.empty? RDoc::Markup::ListItem.new(constant.name, *parts) } out << list out << RDoc::Markup::BlankLine.new end add_method_list out, class_methods, 'Class methods' add_method_list out, instance_methods, 'Instance methods' add_method_list out, attributes, 'Attributes' add_method_documentation out, klass if @show_all end add_also_in out, also_in out end ## # Hash mapping a known class or module to the stores it can be loaded from def classes return @classes if @classes @classes = {} @stores.each do |store| store.cache[:modules].each do |mod| # using default block causes searched-for modules to be added @classes[mod] ||= [] @classes[mod] << store end end @classes end ## # Returns the stores wherein +name+ is found along with the classes, # extends and includes that match it def classes_and_includes_and_extends_for name klasses = [] extends = [] includes = [] found = @stores.map do |store| begin klass = store.load_class name klasses << klass extends << [klass.extends, store] if klass.extends includes << [klass.includes, store] if klass.includes [store, klass] rescue RDoc::Store::MissingFileError end end.compact extends.reject! do |modules,| modules.empty? end includes.reject! do |modules,| modules.empty? end [found, klasses, includes, extends] end ## # Completes +name+ based on the caches. For Readline def complete name klasses = classes.keys completions = [] klass, selector, method = parse_name name # may need to include Foo when given Foo:: klass_name = method ? name : klass if name !~ /#|\./ then completions = klasses.grep(/^#{Regexp.escape klass_name}[^:]*$/) completions.concat klasses.grep(/^#{Regexp.escape name}[^:]*$/) if name =~ /::$/ completions << klass if classes.key? klass # to complete a method name elsif selector then completions << klass if classes.key? klass elsif classes.key? klass_name then completions << klass_name end if completions.include? klass and name =~ /#|\.|::/ then methods = list_methods_matching name if not methods.empty? then # remove Foo if given Foo:: and a method was found completions.delete klass elsif selector then # replace Foo with Foo:: as given completions.delete klass completions << "#{klass}#{selector}" end completions.concat methods end completions.sort.uniq end ## # Converts +document+ to text and writes it to the pager def display document page do |io| text = document.accept formatter(io) io.write text end end ## # Outputs formatted RI data for class +name+. Groups undocumented classes def display_class name return if name =~ /#|\./ found, klasses, includes, extends = classes_and_includes_and_extends_for name return if found.empty? out = class_document name, found, klasses, includes, extends display out end ## # Outputs formatted RI data for method +name+ def display_method name out = RDoc::Markup::Document.new add_method out, name display out end ## # Outputs formatted RI data for the class or method +name+. # # Returns true if +name+ was found, false if it was not an alternative could # be guessed, raises an error if +name+ couldn't be guessed. def display_name name if name =~ /\w:(\w|$)/ then display_page name return true end return true if display_class name display_method name if name =~ /::|#|\./ true rescue NotFoundError matches = list_methods_matching name if name =~ /::|#|\./ matches = classes.keys.grep(/^#{name}/) if matches.empty? raise if matches.empty? page do |io| io.puts "#{name} not found, maybe you meant:" io.puts io.puts matches.sort.join("\n") end false end ## # Displays each name in +name+ def display_names names names.each do |name| name = expand_name name display_name name end end ## # Outputs formatted RI data for page +name+. def display_page name store_name, page_name = name.split ':', 2 store = @stores.find { |s| s.source == store_name } return display_page_list store if page_name.empty? pages = store.cache[:pages] unless pages.include? page_name then found_names = pages.select do |n| n =~ /#{Regexp.escape page_name}\.[^.]+$/ end if found_names.length.zero? then return display_page_list store, pages elsif found_names.length > 1 then return display_page_list store, found_names, page_name end page_name = found_names.first end page = store.load_page page_name display page.comment end ## # Outputs a formatted RI page list for the pages in +store+. def display_page_list store, pages = store.cache[:pages], search = nil out = RDoc::Markup::Document.new title = if search then "#{search} pages" else 'Pages' end out << RDoc::Markup::Heading.new(1, "#{title} in #{store.friendly_path}") out << RDoc::Markup::BlankLine.new list = RDoc::Markup::List.new(:BULLET) pages.each do |page| list << RDoc::Markup::Paragraph.new(page) end out << list display out end ## # Expands abbreviated klass +klass+ into a fully-qualified class. "Zl::Da" # will be expanded to Zlib::DataError. def expand_class klass klass.split('::').inject '' do |expanded, klass_part| expanded << '::' unless expanded.empty? short = expanded << klass_part subset = classes.keys.select do |klass_name| klass_name =~ /^#{expanded}[^:]*$/ end abbrevs = Abbrev.abbrev subset expanded = abbrevs[short] raise NotFoundError, short unless expanded expanded.dup end end ## # Expands the class portion of +name+ into a fully-qualified class. See # #expand_class. def expand_name name klass, selector, method = parse_name name return [selector, method].join if klass.empty? case selector when ':' then [find_store(klass), selector, method] else [expand_class(klass), selector, method] end.join end ## # Filters the methods in +found+ trying to find a match for +name+. def filter_methods found, name regexp = name_regexp name filtered = found.find_all do |store, methods| methods.any? { |method| method.full_name =~ regexp } end return filtered unless filtered.empty? found end ## # Yields items matching +name+ including the store they were found in, the # class being searched for, the class they were found in (an ancestor) the # types of methods to look up (from #method_type), and the method name being # searched for def find_methods name klass, selector, method = parse_name name types = method_type selector klasses = nil ambiguous = klass.empty? if ambiguous then klasses = classes.keys else klasses = ancestors_of klass klasses.unshift klass end methods = [] klasses.each do |ancestor| ancestors = classes[ancestor] next unless ancestors klass = ancestor if ambiguous ancestors.each do |store| methods << [store, klass, ancestor, types, method] end end methods = methods.sort_by do |_, k, a, _, m| [k, a, m].compact end methods.each do |item| yield(*item) # :yields: store, klass, ancestor, types, method end self end ## # Finds the given +pager+ for jruby. Returns an IO if +pager+ was found. # # Returns false if +pager+ does not exist. # # Returns nil if the jruby JVM doesn't support ProcessBuilder redirection # (1.6 and older). def find_pager_jruby pager require 'java' require 'shellwords' return nil unless java.lang.ProcessBuilder.constants.include? :Redirect pager = Shellwords.split pager pb = java.lang.ProcessBuilder.new(*pager) pb = pb.redirect_output java.lang.ProcessBuilder::Redirect::INHERIT @jruby_pager_process = pb.start input = @jruby_pager_process.output_stream io = input.to_io io.sync = true io rescue java.io.IOException false end ## # Finds a store that matches +name+ which can be the name of a gem, "ruby", # "home" or "site". # # See also RDoc::Store#source def find_store name @stores.each do |store| source = store.source return source if source == name return source if store.type == :gem and source =~ /^#{Regexp.escape name}-\d/ end raise RDoc::RI::Driver::NotFoundError, name end ## # Creates a new RDoc::Markup::Formatter. If a formatter is given with -f, # use it. If we're outputting to a pager, use bs, otherwise ansi. def formatter(io) if @formatter_klass then @formatter_klass.new elsif paging? or !io.tty? then RDoc::Markup::ToBs.new else RDoc::Markup::ToAnsi.new end end ## # Runs ri interactively using Readline if it is available. def interactive puts "\nEnter the method name you want to look up." if defined? Readline then Readline.completion_proc = method :complete puts "You can use tab to autocomplete." end puts "Enter a blank line to exit.\n\n" loop do name = if defined? Readline then Readline.readline ">> " else print ">> " $stdin.gets end return if name.nil? or name.empty? name = expand_name name.strip begin display_name name rescue NotFoundError => e puts e.message end end rescue Interrupt exit end ## # Is +file+ in ENV['PATH']? def in_path? file return true if file =~ %r%\A/% and File.exist? file ENV['PATH'].split(File::PATH_SEPARATOR).any? do |path| File.exist? File.join(path, file) end end ## # Lists classes known to ri starting with +names+. If +names+ is empty all # known classes are shown. def list_known_classes names = [] classes = [] stores.each do |store| classes << store.module_names end classes = classes.flatten.uniq.sort unless names.empty? then filter = Regexp.union names.map { |name| /^#{name}/ } classes = classes.grep filter end page do |io| if paging? or io.tty? then if names.empty? then io.puts "Classes and Modules known to ri:" else io.puts "Classes and Modules starting with #{names.join ', '}:" end io.puts end io.puts classes.join("\n") end end ## # Returns an Array of methods matching +name+ def list_methods_matching name found = [] find_methods name do |store, klass, ancestor, types, method| if types == :instance or types == :both then methods = store.instance_methods[ancestor] if methods then matches = methods.grep(/^#{Regexp.escape method.to_s}/) matches = matches.map do |match| "#{klass}##{match}" end found.concat matches end end if types == :class or types == :both then methods = store.class_methods[ancestor] next unless methods matches = methods.grep(/^#{Regexp.escape method.to_s}/) matches = matches.map do |match| "#{klass}::#{match}" end found.concat matches end end found.uniq end ## # Loads RI data for method +name+ on +klass+ from +store+. +type+ and # +cache+ indicate if it is a class or instance method. def load_method store, cache, klass, type, name methods = store.send(cache)[klass] return unless methods method = methods.find do |method_name| method_name == name end return unless method store.load_method klass, "#{type}#{method}" end ## # Returns an Array of RI data for methods matching +name+ def load_methods_matching name found = [] find_methods name do |store, klass, ancestor, types, method| methods = [] methods << load_method(store, :class_methods, ancestor, '::', method) if [:class, :both].include? types methods << load_method(store, :instance_methods, ancestor, '#', method) if [:instance, :both].include? types found << [store, methods.compact] end found.reject do |path, methods| methods.empty? end end ## # Returns a filtered list of methods matching +name+ def lookup_method name found = load_methods_matching name raise NotFoundError, name if found.empty? filter_methods found, name end ## # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ def method_document name, filtered out = RDoc::Markup::Document.new out << RDoc::Markup::Heading.new(1, name) out << RDoc::Markup::BlankLine.new filtered.each do |store, methods| methods.each do |method| out << RDoc::Markup::Paragraph.new("(from #{store.friendly_path})") unless name =~ /^#{Regexp.escape method.parent_name}/ then out << RDoc::Markup::Heading.new(3, "Implementation from #{method.parent_name}") end out << RDoc::Markup::Rule.new(1) if method.arglists then arglists = method.arglists.chomp.split "\n" arglists = arglists.map { |line| line + "\n" } out << RDoc::Markup::Verbatim.new(*arglists) out << RDoc::Markup::Rule.new(1) end if method.respond_to?(:superclass_method) and method.superclass_method out << RDoc::Markup::BlankLine.new out << RDoc::Markup::Heading.new(4, "(Uses superclass method #{method.superclass_method})") out << RDoc::Markup::Rule.new(1) end out << RDoc::Markup::BlankLine.new out << method.comment out << RDoc::Markup::BlankLine.new end end out end ## # Returns the type of method (:both, :instance, :class) for +selector+ def method_type selector case selector when '.', nil then :both when '#' then :instance else :class end end ## # Returns a regular expression for +name+ that will match an # RDoc::AnyMethod's name. def name_regexp name klass, type, name = parse_name name case type when '#', '::' then /^#{klass}#{type}#{Regexp.escape name}$/ else /^#{klass}(#|::)#{Regexp.escape name}$/ end end ## # Paginates output through a pager program. def page if pager = setup_pager then begin yield pager ensure pager.close @jruby_pager_process.wait_for if @jruby_pager_process end else yield $stdout end rescue Errno::EPIPE ensure @paging = false end ## # Are we using a pager? def paging? @paging end ## # Extracts the class, selector and method name parts from +name+ like # Foo::Bar#baz. # # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a # method def parse_name name parts = name.split(/(::?|#|\.)/) if parts.length == 1 then if parts.first =~ /^[a-z]|^([%&*+\/<>^`|~-]|\+@|-@|<<|<=>?|===?|=>|=~|>>|\[\]=?|~@)$/ then type = '.' meth = parts.pop else type = nil meth = nil end elsif parts.length == 2 or parts.last =~ /::|#|\./ then type = parts.pop meth = nil elsif parts[1] == ':' then klass = parts.shift type = parts.shift meth = parts.join elsif parts[-2] != '::' or parts.last !~ /^[A-Z]/ then meth = parts.pop type = parts.pop end klass ||= parts.join [klass, type, meth] end ## # Looks up and displays ri data according to the options given. def run if @list_doc_dirs then puts @doc_dirs elsif @list then list_known_classes @names elsif @server then start_server elsif @interactive or @names.empty? then interactive else display_names @names end rescue NotFoundError => e abort e.message end ## # Sets up a pager program to pass output through. Tries the RI_PAGER and # PAGER environment variables followed by pager, less then more. def setup_pager return if @use_stdout jruby = Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == 'jruby' pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more'] pagers.compact.uniq.each do |pager| next unless pager pager_cmd = pager.split.first next unless in_path? pager_cmd if jruby then case io = find_pager_jruby(pager) when nil then break when false then next else io end else io = IO.popen(pager, 'w') rescue next end next if $? and $?.pid == io.pid and $?.exited? # pager didn't work @paging = true return io end @use_stdout = true nil end ## # Starts a WEBrick server for ri. def start_server require 'webrick' server = WEBrick::HTTPServer.new :Port => @server server.mount '/', RDoc::Servlet trap 'INT' do server.shutdown end trap 'TERM' do server.shutdown end server.start end end gems/rdoc-4.0.0/lib/rdoc/ri/store.rb000064400000000067147207544650012674 0ustar00module RDoc::RI Store = RDoc::Store # :nodoc: end gems/rdoc-4.0.0/lib/rdoc/parser.rb000064400000017516147207544650012431 0ustar00# -*- coding: us-ascii -*- ## # A parser is simple a class that subclasses RDoc::Parser and implements #scan # to fill in an RDoc::TopLevel with parsed data. # # The initialize method takes an RDoc::TopLevel to fill with parsed content, # the name of the file to be parsed, the content of the file, an RDoc::Options # object and an RDoc::Stats object to inform the user of parsed items. The # scan method is then called to parse the file and must return the # RDoc::TopLevel object. By calling super these items will be set for you. # # In order to be used by RDoc the parser needs to register the file extensions # it can parse. Use ::parse_files_matching to register extensions. # # require 'rdoc' # # class RDoc::Parser::Xyz < RDoc::Parser # parse_files_matching /\.xyz$/ # # def initialize top_level, file_name, content, options, stats # super # # # extra initialization if needed # end # # def scan # # parse file and fill in @top_level # end # end class RDoc::Parser @parsers = [] class << self ## # An Array of arrays that maps file extension (or name) regular # expressions to parser classes that will parse matching filenames. # # Use parse_files_matching to register a parser's file extensions. attr_reader :parsers end ## # The name of the file being parsed attr_reader :file_name ## # Alias an extension to another extension. After this call, files ending # "new_ext" will be parsed using the same parser as "old_ext" def self.alias_extension(old_ext, new_ext) old_ext = old_ext.sub(/^\.(.*)/, '\1') new_ext = new_ext.sub(/^\.(.*)/, '\1') parser = can_parse_by_name "xxx.#{old_ext}" return false unless parser RDoc::Parser.parsers.unshift [/\.#{new_ext}$/, parser] true end ## # Determines if the file is a "binary" file which basically means it has # content that an RDoc parser shouldn't try to consume. def self.binary?(file) return false if file =~ /\.(rdoc|txt)$/ s = File.read(file, 1024) or return false have_encoding = s.respond_to? :encoding return true if s[0, 2] == Marshal.dump('')[0, 2] or s.index("\x00") if have_encoding then mode = "r" s.sub!(/\A#!.*\n/, '') # assume shebang line isn't longer than 1024. encoding = s[/^\s*\#\s*(?:-\*-\s*)?(?:en)?coding:\s*([^\s;]+?)(?:-\*-|[\s;])/, 1] mode = "r:#{encoding}" if encoding s = File.open(file, mode) {|f| f.gets(nil, 1024)} not s.valid_encoding? else if 0.respond_to? :fdiv then s.count("\x00-\x7F", "^ -~\t\r\n").fdiv(s.size) > 0.3 else # HACK 1.8.6 (s.count("\x00-\x7F", "^ -~\t\r\n").to_f / s.size) > 0.3 end end end ## # Processes common directives for CodeObjects for the C and Ruby parsers. # # Applies +directive+'s +value+ to +code_object+, if appropriate def self.process_directive code_object, directive, value warn "RDoc::Parser::process_directive is deprecated and wil be removed in RDoc 4. Use RDoc::Markup::PreProcess#handle_directive instead" if $-w case directive when 'nodoc' then code_object.document_self = nil # notify nodoc code_object.document_children = value.downcase != 'all' when 'doc' then code_object.document_self = true code_object.force_documentation = true when 'yield', 'yields' then # remove parameter &block code_object.params.sub!(/,?\s*&\w+/, '') if code_object.params code_object.block_params = value when 'arg', 'args' then code_object.params = value end end ## # Checks if +file+ is a zip file in disguise. Signatures from # http://www.garykessler.net/library/file_sigs.html def self.zip? file zip_signature = File.read file, 4 zip_signature == "PK\x03\x04" or zip_signature == "PK\x05\x06" or zip_signature == "PK\x07\x08" rescue false end ## # Return a parser that can handle a particular extension def self.can_parse file_name parser = can_parse_by_name file_name # HACK Selenium hides a jar file using a .txt extension return if parser == RDoc::Parser::Simple and zip? file_name parser end ## # Returns a parser that can handle the extension for +file_name+. This does # not depend upon the file being readable. def self.can_parse_by_name file_name _, parser = RDoc::Parser.parsers.find { |regexp,| regexp =~ file_name } # The default parser must not parse binary files ext_name = File.extname file_name return parser if ext_name.empty? if parser == RDoc::Parser::Simple and ext_name !~ /txt|rdoc/ then case check_modeline file_name when nil, 'rdoc' then # continue else return nil end end parser rescue Errno::EACCES end ## # Returns the file type from the modeline in +file_name+ def self.check_modeline file_name line = open file_name do |io| io.gets end /-\*-\s*(.*?\S)\s*-\*-/ =~ line return nil unless type = $1 if /;/ =~ type then return nil unless /(?:\s|\A)mode:\s*([^\s;]+)/i =~ type type = $1 end return nil if /coding:/i =~ type type.downcase rescue ArgumentError # invalid byte sequence, etc. end ## # Finds and instantiates the correct parser for the given +file_name+ and # +content+. def self.for top_level, file_name, content, options, stats return if binary? file_name parser = use_markup content unless parser then parse_name = file_name # If no extension, look for shebang if file_name !~ /\.\w+$/ && content =~ %r{\A#!(.+)} then shebang = $1 case shebang when %r{env\s+ruby}, %r{/ruby} parse_name = 'dummy.rb' end end parser = can_parse parse_name end return unless parser parser.new top_level, file_name, content, options, stats rescue SystemCallError nil end ## # Record which file types this parser can understand. # # It is ok to call this multiple times. def self.parse_files_matching(regexp) RDoc::Parser.parsers.unshift [regexp, self] end ## # If there is a markup: parser_name comment at the front of the # file, use it to determine the parser. For example: # # # markup: rdoc # # Class comment can go here # # class C # end # # The comment should appear as the first line of the +content+. # # If the content contains a shebang or editor modeline the comment may # appear on the second or third line. # # Any comment style may be used to hide the markup comment. def self.use_markup content markup = content.lines.first(3).grep(/markup:\s+(\w+)/) { $1 }.first return unless markup # TODO Ruby should be returned only when the filename is correct return RDoc::Parser::Ruby if %w[tomdoc markdown].include? markup markup = Regexp.escape markup RDoc::Parser.parsers.find do |_, parser| /^#{markup}$/i =~ parser.name.sub(/.*:/, '') end.last end ## # Creates a new Parser storing +top_level+, +file_name+, +content+, # +options+ and +stats+ in instance variables. In +@preprocess+ an # RDoc::Markup::PreProcess object is created which allows processing of # directives. def initialize top_level, file_name, content, options, stats @top_level = top_level @top_level.parser = self.class @store = @top_level.store @file_name = file_name @content = content @options = options @stats = stats @preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include @preprocess.options = @options end autoload :RubyTools, 'rdoc/parser/ruby_tools' autoload :Text, 'rdoc/parser/text' end # simple must come first in order to show up last in the parsers list require 'rdoc/parser/simple' require 'rdoc/parser/c' require 'rdoc/parser/changelog' require 'rdoc/parser/markdown' require 'rdoc/parser/rd' require 'rdoc/parser/ruby' gems/rdoc-4.0.0/lib/rdoc/erbio.rb000064400000001432147207544650012223 0ustar00require 'erb' ## # A subclass of ERB that writes directly to an IO. Credit to Aaron Patterson # and Masatoshi SEKI. # # To use: # # erbio = RDoc::ERBIO.new '<%= "hello world" %>', nil, nil # # open 'hello.txt', 'w' do |io| # erbio.result binding # end # # Note that binding must enclose the io you wish to output on. class RDoc::ERBIO < ERB ## # Defaults +eoutvar+ to 'io', otherwise is identical to ERB's initialize def initialize str, safe_level = nil, trim_mode = nil, eoutvar = 'io' super end ## # Instructs +compiler+ how to write to +io_variable+ def set_eoutvar compiler, io_variable compiler.put_cmd = "#{io_variable}.write" compiler.insert_cmd = "#{io_variable}.write" compiler.pre_cmd = [] compiler.post_cmd = [] end end gems/rdoc-4.0.0/lib/rdoc/ghost_method.rb000064400000000162147207544650013606 0ustar00## # GhostMethod represents a method referenced only by a comment class RDoc::GhostMethod < RDoc::AnyMethod end gems/rdoc-4.0.0/lib/rdoc/context/section.rb000064400000011471147207544650014257 0ustar00## # A section of documentation like: # # # :section: The title # # The body # # Sections can be referenced multiple times and will be collapsed into a # single section. class RDoc::Context::Section include RDoc::Text MARSHAL_VERSION = 0 # :nodoc: ## # Section comment attr_reader :comment ## # Section comments attr_reader :comments ## # Context this Section lives in attr_reader :parent ## # Section title attr_reader :title @@sequence = "SEC00000" ## # Creates a new section with +title+ and +comment+ def initialize parent, title, comment @parent = parent @title = title ? title.strip : title @@sequence.succ! @sequence = @@sequence.dup @comments = [] add_comment comment end ## # Sections are equal when they have the same #title def == other self.class === other and @title == other.title end ## # Adds +comment+ to this section def add_comment comment comment = extract_comment comment return if comment.empty? case comment when RDoc::Comment then @comments << comment when RDoc::Markup::Document then @comments.concat comment.parts when Array then @comments.concat comment else raise TypeError, "unknown comment type: #{comment.inspect}" end end ## # Anchor reference for linking to this section def aref title = @title || '[untitled]' CGI.escape(title).gsub('%', '-').sub(/^-/, '') end ## # Extracts the comment for this section from the original comment block. # If the first line contains :section:, strip it and use the rest. # Otherwise remove lines up to the line containing :section:, and look # for those lines again at the end and remove them. This lets us write # # # :section: The title # # The body def extract_comment comment case comment when Array then comment.map do |c| extract_comment c end when nil RDoc::Comment.new '' when RDoc::Comment then if comment.text =~ /^#[ \t]*:section:.*\n/ then start = $` rest = $' comment.text = if start.empty? then rest else rest.sub(/#{start.chomp}\Z/, '') end end comment when RDoc::Markup::Document then comment else raise TypeError, "unknown comment #{comment.inspect}" end end def inspect # :nodoc: "#<%s:0x%x %p>" % [self.class, object_id, title] end ## # The files comments in this section come from def in_files return [] if @comments.empty? case @comments when Array then @comments.map do |comment| comment.file end when RDoc::Markup::Document then @comment.parts.map do |document| document.file end else raise RDoc::Error, "BUG: unknown comment class #{@comments.class}" end end ## # Serializes this Section. The title and parsed comment are saved, but not # the section parent which must be restored manually. def marshal_dump [ MARSHAL_VERSION, @title, parse, ] end ## # De-serializes this Section. The section parent must be restored manually. def marshal_load array @parent = nil @title = array[1] @comments = array[2] end ## # Parses +comment_location+ into an RDoc::Markup::Document composed of # multiple RDoc::Markup::Documents with their file set. def parse case @comments when String then super when Array then docs = @comments.map do |comment, location| doc = super comment doc.file = location if location doc end RDoc::Markup::Document.new(*docs) when RDoc::Comment then doc = super @comments.text, comments.format doc.file = @comments.location doc when RDoc::Markup::Document then return @comments else raise ArgumentError, "unknown comment class #{comments.class}" end end ## # The section's title, or 'Top Section' if the title is nil. # # This is used by the table of contents template so the name is silly. def plain_html @title || 'Top Section' end ## # Removes a comment from this section if it is from the same file as # +comment+ def remove_comment comment return if @comments.empty? case @comments when Array then @comments.delete_if do |my_comment| my_comment.file == comment.file end when RDoc::Markup::Document then @comments.parts.delete_if do |document| document.file == comment.file.name end else raise RDoc::Error, "BUG: unknown comment class #{@comments.class}" end end ## # Section sequence number (deprecated) def sequence warn "RDoc::Context::Section#sequence is deprecated, use #aref" @sequence end end gems/rdoc-4.0.0/lib/rdoc/alias.rb000064400000004137147207544650012221 0ustar00## # Represent an alias, which is an old_name/new_name pair associated with a # particular context #-- # TODO implement Alias as a proxy to a method/attribute, inheriting from # MethodAttr class RDoc::Alias < RDoc::CodeObject ## # Aliased method's name attr_reader :new_name alias name new_name ## # Aliasee method's name attr_reader :old_name ## # Is this an alias declared in a singleton context? attr_accessor :singleton ## # Source file token stream attr_reader :text ## # Creates a new Alias with a token stream of +text+ that aliases +old_name+ # to +new_name+, has +comment+ and is a +singleton+ context. def initialize(text, old_name, new_name, comment, singleton = false) super() @text = text @singleton = singleton @old_name = old_name @new_name = new_name self.comment = comment end ## # Order by #singleton then #new_name def <=>(other) [@singleton ? 0 : 1, new_name] <=> [other.singleton ? 0 : 1, other.new_name] end ## # HTML fragment reference for this alias def aref type = singleton ? 'c' : 'i' "#alias-#{type}-#{html_name}" end ## # Full old name including namespace def full_old_name @full_name || "#{parent.name}#{pretty_old_name}" end ## # HTML id-friendly version of +#new_name+. def html_name CGI.escape(@new_name.gsub('-', '-2D')).gsub('%','-').sub(/^-/, '') end def inspect # :nodoc: parent_name = parent ? parent.name : '(unknown)' "#<%s:0x%x %s.alias_method %s, %s>" % [ self.class, object_id, parent_name, @old_name, @new_name, ] end ## # '::' for the alias of a singleton method/attribute, '#' for instance-level. def name_prefix singleton ? '::' : '#' end ## # Old name with prefix '::' or '#'. def pretty_old_name "#{singleton ? '::' : '#'}#{@old_name}" end ## # New name with prefix '::' or '#'. def pretty_new_name "#{singleton ? '::' : '#'}#{@new_name}" end alias pretty_name pretty_new_name def to_s # :nodoc: "alias: #{self.new_name} -> #{self.pretty_old_name} in: #{parent}" end end gems/rdoc-4.0.0/lib/rdoc/attr.rb000064400000007353147207544650012105 0ustar00## # An attribute created by \#attr, \#attr_reader, \#attr_writer or # \#attr_accessor class RDoc::Attr < RDoc::MethodAttr ## # 3:: # RDoc 4 # Added parent name and class # Added section title MARSHAL_VERSION = 3 # :nodoc: ## # Is the attribute readable ('R'), writable ('W') or both ('RW')? attr_accessor :rw ## # Creates a new Attr with body +text+, +name+, read/write status +rw+ and # +comment+. +singleton+ marks this as a class attribute. def initialize(text, name, rw, comment, singleton = false) super text, name @rw = rw @singleton = singleton self.comment = comment end ## # Attributes are equal when their names, singleton and rw are identical def == other self.class == other.class and self.name == other.name and self.rw == other.rw and self.singleton == other.singleton end ## # Add +an_alias+ as an attribute in +context+. def add_alias(an_alias, context) new_attr = self.class.new(self.text, an_alias.new_name, self.rw, self.comment, self.singleton) new_attr.record_location an_alias.file new_attr.visibility = self.visibility new_attr.is_alias_for = self @aliases << new_attr context.add_attribute new_attr new_attr end ## # The #aref prefix for attributes def aref_prefix 'attribute' end ## # Attributes never call super. See RDoc::AnyMethod#calls_super # # An RDoc::Attr can show up in the method list in some situations (see # Gem::ConfigFile) def calls_super # :nodoc: false end ## # Returns attr_reader, attr_writer or attr_accessor as appropriate. def definition case @rw when 'RW' then 'attr_accessor' when 'R' then 'attr_reader' when 'W' then 'attr_writer' end end def inspect # :nodoc: alias_for = @is_alias_for ? " (alias for #{@is_alias_for.name})" : nil visibility = self.visibility visibility = "forced #{visibility}" if force_documentation "#<%s:0x%x %s %s (%s)%s>" % [ self.class, object_id, full_name, rw, visibility, alias_for, ] end ## # Dumps this Attr for use by ri. See also #marshal_load def marshal_dump [ MARSHAL_VERSION, @name, full_name, @rw, @visibility, parse(@comment), singleton, @file.relative_name, @parent.full_name, @parent.class, @section.title ] end ## # Loads this Attr from +array+. For a loaded Attr the following # methods will return cached values: # # * #full_name # * #parent_name def marshal_load array initialize_visibility @aliases = [] @parent = nil @parent_name = nil @parent_class = nil @section = nil @file = nil version = array[0] @name = array[1] @full_name = array[2] @rw = array[3] @visibility = array[4] @comment = array[5] @singleton = array[6] || false # MARSHAL_VERSION == 0 # 7 handled below @parent_name = array[8] @parent_class = array[9] @section_title = array[10] @file = RDoc::TopLevel.new array[7] if version > 1 @parent_name ||= @full_name.split('#', 2).first end def pretty_print q # :nodoc: q.group 2, "[#{self.class.name} #{full_name} #{rw} #{visibility}", "]" do unless comment.empty? then q.breakable q.text "comment:" q.breakable q.pp @comment end end end def to_s # :nodoc: "#{definition} #{name} in: #{parent}" end ## # Attributes do not have token streams. # # An RDoc::Attr can show up in the method list in some situations (see # Gem::ConfigFile) def token_stream # :nodoc: end end gems/rdoc-4.0.0/lib/rdoc/any_method.rb000064400000013633147207544650013260 0ustar00## # AnyMethod is the base class for objects representing methods class RDoc::AnyMethod < RDoc::MethodAttr ## # 2:: # RDoc 4 # Added calls_super # Added parent name and class # Added section title MARSHAL_VERSION = 2 # :nodoc: ## # Don't rename \#initialize to \::new attr_accessor :dont_rename_initialize ## # The C function that implements this method (if it was defined in a C file) attr_accessor :c_function ## # Different ways to call this method attr_accessor :call_seq ## # Parameters for this method attr_accessor :params ## # If true this method uses +super+ to call a superclass version attr_accessor :calls_super include RDoc::TokenStream ## # Creates a new AnyMethod with a token stream +text+ and +name+ def initialize text, name super @c_function = nil @dont_rename_initialize = false @token_stream = nil @calls_super = false @superclass_method = nil end ## # Adds +an_alias+ as an alias for this method in +context+. def add_alias an_alias, context = nil method = self.class.new an_alias.text, an_alias.new_name method.record_location an_alias.file method.singleton = self.singleton method.params = self.params method.visibility = self.visibility method.comment = an_alias.comment method.is_alias_for = self @aliases << method context.add_method method if context method end ## # Prefix for +aref+ is 'method'. def aref_prefix 'method' end ## # The call_seq or the param_seq with method name, if there is no call_seq. # # Use this for displaying a method's argument lists. def arglists if @call_seq then @call_seq elsif @params then "#{name}#{param_seq}" end end ## # Dumps this AnyMethod for use by ri. See also #marshal_load def marshal_dump aliases = @aliases.map do |a| [a.name, parse(a.comment)] end [ MARSHAL_VERSION, @name, full_name, @singleton, @visibility, parse(@comment), @call_seq, @block_params, aliases, @params, @file.relative_name, @calls_super, @parent.name, @parent.class, @section.title, ] end ## # Loads this AnyMethod from +array+. For a loaded AnyMethod the following # methods will return cached values: # # * #full_name # * #parent_name def marshal_load array initialize_visibility @dont_rename_initialize = nil @is_alias_for = nil @token_stream = nil @aliases = [] @parent = nil @parent_name = nil @parent_class = nil @section = nil @file = nil version = array[0] @name = array[1] @full_name = array[2] @singleton = array[3] @visibility = array[4] @comment = array[5] @call_seq = array[6] @block_params = array[7] # 8 handled below @params = array[9] # 10 handled below @calls_super = array[11] @parent_name = array[12] @parent_title = array[13] @section_title = array[14] array[8].each do |new_name, comment| add_alias RDoc::Alias.new(nil, @name, new_name, comment, @singleton) end @parent_name ||= if @full_name =~ /#/ then $` else name = @full_name.split('::') name.pop name.join '::' end @file = RDoc::TopLevel.new array[10] if version > 0 end ## # Method name # # If the method has no assigned name, it extracts it from #call_seq. def name return @name if @name @name = @call_seq[/^.*?\.(\w+)/, 1] || @call_seq if @call_seq end ## # A list of this method's method and yield parameters. +call-seq+ params # are preferred over parsed method and block params. def param_list if @call_seq then params = @call_seq.split("\n").last params = params.sub(/.*?\((.*)\)/, '\1') params = params.sub(/(\{|do)\s*\|([^|]*)\|.*/, ',\2') elsif @params then params = @params.sub(/\((.*)\)/, '\1') params << ",#{@block_params}" if @block_params elsif @block_params then params = @block_params else return [] end params = params.gsub(/\s+/, '').split ',' params.map { |param| param.sub(/=.*/, '') } end ## # Pretty parameter list for this method. If the method's parameters were # given by +call-seq+ it is preferred over the parsed values. def param_seq if @call_seq then params = @call_seq.split("\n").last params = params.sub(/[^( ]+/, '') params = params.sub(/(\|[^|]+\|)\s*\.\.\.\s*(end|\})/, '\1 \2') elsif @params then params = @params.gsub(/\s*\#.*/, '') params = params.tr("\n", " ").squeeze(" ") params = "(#{params})" unless params[0] == ?( else params = '' end if @block_params then # If this method has explicit block parameters, remove any explicit # &block params.sub!(/,?\s*&\w+/, '') block = @block_params.gsub(/\s*\#.*/, '') block = block.tr("\n", " ").squeeze(" ") if block[0] == ?( block.sub!(/^\(/, '').sub!(/\)/, '') end params << " { |#{block}| ... }" end params end ## # Sets the store for this method and its referenced code objects. def store= store super @file = @store.add_file @file.full_name if @file end ## # For methods that +super+, find the superclass method that would be called. def superclass_method return unless @calls_super return @superclass_method if @superclass_method parent.each_ancestor do |ancestor| if method = ancestor.method_list.find { |m| m.name == @name } then @superclass_method = method break end end @superclass_method end end gems/rdoc-4.0.0/lib/rdoc/anon_class.rb000064400000000216147207544650013242 0ustar00## # An anonymous class like: # # c = Class.new do end # # AnonClass is currently not used. class RDoc::AnonClass < RDoc::ClassModule end gems/rdoc-4.0.0/lib/rdoc/text.rb000064400000017140147207544650012112 0ustar00# coding: utf-8 ## # For RDoc::Text#to_html require 'strscan' ## # For RDoc::Text#snippet begin gem 'json' rescue Gem::LoadError end require 'json' ## # Methods for manipulating comment text module RDoc::Text ## # Maps markup formats to classes that can parse them. If the format is # unknown, "rdoc" format is used. MARKUP_FORMAT = { 'markdown' => RDoc::Markdown, 'rdoc' => RDoc::Markup, 'rd' => RDoc::RD, 'tomdoc' => RDoc::TomDoc, } MARKUP_FORMAT.default = RDoc::Markup ## # Maps an encoding to a Hash of characters properly transcoded for that # encoding. # # See also encode_fallback. TO_HTML_CHARACTERS = Hash.new do |h, encoding| h[encoding] = { :close_dquote => encode_fallback('”', encoding, '"'), :close_squote => encode_fallback('’', encoding, '\''), :copyright => encode_fallback('©', encoding, '(c)'), :ellipsis => encode_fallback('…', encoding, '...'), :em_dash => encode_fallback('—', encoding, '---'), :en_dash => encode_fallback('–', encoding, '--'), :open_dquote => encode_fallback('“', encoding, '"'), :open_squote => encode_fallback('‘', encoding, '\''), :trademark => encode_fallback('®', encoding, '(r)'), } end if Object.const_defined? :Encoding ## # Transcodes +character+ to +encoding+ with a +fallback+ character. def self.encode_fallback character, encoding, fallback character.encode(encoding, :fallback => { character => fallback }, :undef => :replace, :replace => fallback) end ## # Expands tab characters in +text+ to eight spaces def expand_tabs text expanded = [] text.each_line do |line| nil while line.gsub!(/(?:\G|\r)((?:.{8})*?)([^\t\r\n]{0,7})\t/) do r = "#{$1}#{$2}#{' ' * (8 - $2.size)}" r.force_encoding text.encoding if Object.const_defined? :Encoding r end expanded << line end expanded.join end ## # Flush +text+ left based on the shortest line def flush_left text indent = 9999 text.each_line do |line| line_indent = line =~ /\S/ || 9999 indent = line_indent if indent > line_indent end empty = '' empty.force_encoding text.encoding if Object.const_defined? :Encoding text.gsub(/^ {0,#{indent}}/, empty) end ## # Convert a string in markup format into HTML. # # Requires the including class to implement #formatter def markup text parse(text).accept formatter end ## # Strips hashes, expands tabs then flushes +text+ to the left def normalize_comment text return text if text.empty? text = strip_stars text text = strip_hashes text text = expand_tabs text text = flush_left text text = strip_newlines text text end ## # Normalizes +text+ then builds a RDoc::Markup::Document from it def parse text, format = 'rdoc' return text if RDoc::Markup::Document === text return text.parse if RDoc::Comment === text text = normalize_comment text # TODO remove, should not be necessary return RDoc::Markup::Document.new if text =~ /\A\n*\z/ MARKUP_FORMAT[format].parse text end ## # The first +limit+ characters of +text+ as HTML def snippet text, limit = 100 document = parse text RDoc::Markup::ToHtmlSnippet.new(limit).convert document end ## # Strips leading # characters from +text+ def strip_hashes text return text if text =~ /^(?>\s*)[^\#]/ empty = '' empty.force_encoding text.encoding if Object.const_defined? :Encoding text.gsub(/^\s*(#+)/) { $1.tr '#', ' ' }.gsub(/^\s+$/, empty) end ## # Strips leading and trailing \n characters from +text+ def strip_newlines text text.gsub(/\A\n*(.*?)\n*\z/m) do $1 end # block preserves String encoding end ## # Strips /* */ style comments def strip_stars text return text unless text =~ %r%/\*.*\*/%m encoding = text.encoding if Object.const_defined? :Encoding text = text.gsub %r%Document-method:\s+[\w:.#=!?]+%, '' space = ' ' space.force_encoding encoding if encoding text.sub! %r%/\*+% do space * $&.length end text.sub! %r%\*+/% do space * $&.length end text.gsub! %r%^[ \t]*\*%m do space * $&.length end empty = '' empty.force_encoding encoding if encoding text.gsub(/^\s+$/, empty) end ## # Converts ampersand, dashes, ellipsis, quotes, copyright and registered # trademark symbols in +text+ to properly encoded characters. def to_html text if Object.const_defined? :Encoding then html = ''.encode text.encoding encoded = RDoc::Text::TO_HTML_CHARACTERS[text.encoding] else html = '' encoded = { :close_dquote => '”', :close_squote => '’', :copyright => '©', :ellipsis => '…', :em_dash => '—', :en_dash => '–', :open_dquote => '“', :open_squote => '‘', :trademark => '®', } end s = StringScanner.new text insquotes = false indquotes = false after_word = nil until s.eos? do case when s.scan(/<(tt|code)>.*?<\/\1>/) then # skip contents of tt html << s.matched.gsub('\\\\', '\\') when s.scan(/<(tt|code)>.*?/) then warn "mismatched <#{s[1]}> tag" # TODO signal file/line html << s.matched when s.scan(/<[^>]+\/?s*>/) then # skip HTML tags html << s.matched when s.scan(/\\(\S)/) then # unhandled suppressed crossref html << s[1] after_word = nil when s.scan(/\.\.\.(\.?)/) then html << s[1] << encoded[:ellipsis] after_word = nil when s.scan(/\(c\)/) then html << encoded[:copyright] after_word = nil when s.scan(/\(r\)/) then html << encoded[:trademark] after_word = nil when s.scan(/---/) then html << encoded[:em_dash] after_word = nil when s.scan(/--/) then html << encoded[:en_dash] after_word = nil when s.scan(/"|"/) then html << encoded[indquotes ? :close_dquote : :open_dquote] indquotes = !indquotes after_word = nil when s.scan(/``/) then # backtick double quote html << encoded[:open_dquote] after_word = nil when s.scan(/''/) then # tick double quote html << encoded[:close_dquote] after_word = nil when s.scan(/'/) then # single quote if insquotes html << encoded[:close_squote] insquotes = false elsif after_word # Mary's dog, my parents' house: do not start paired quotes html << encoded[:close_squote] else html << encoded[:open_squote] insquotes = true end after_word = nil else # advance to the next potentially significant character match = s.scan(/.+?(?=[<\\.("'`&-])/) #" if match then html << match after_word = match =~ /\w$/ else html << s.rest break end end end html end ## # Wraps +txt+ to +line_len+ def wrap(txt, line_len = 76) res = [] sp = 0 ep = txt.length while sp < ep # scan back for a space p = sp + line_len - 1 if p >= ep p = ep else while p > sp and txt[p] != ?\s p -= 1 end if p <= sp p = sp + line_len while p < ep and txt[p] != ?\s p += 1 end end end res << txt[sp...p] << "\n" sp = p sp += 1 while sp < ep and txt[sp] == ?\s end res.join.strip end end gems/rdoc-4.0.0/lib/rdoc/meta_method.rb000064400000000143147207544650013407 0ustar00## # MetaMethod represents a meta-programmed method class RDoc::MetaMethod < RDoc::AnyMethod end gems/rdoc-4.0.0/lib/rdoc/top_level.rb000064400000012636147207544650013124 0ustar00## # A TopLevel context is a representation of the contents of a single file class RDoc::TopLevel < RDoc::Context MARSHAL_VERSION = 0 # :nodoc: ## # This TopLevel's File::Stat struct attr_accessor :file_stat ## # Relative name of this file attr_accessor :relative_name ## # Absolute name of this file attr_accessor :absolute_name ## # All the classes or modules that were declared in # this file. These are assigned to either +#classes_hash+ # or +#modules_hash+ once we know what they really are. attr_reader :classes_or_modules attr_accessor :diagram # :nodoc: ## # The parser that processed this file attr_accessor :parser ## # Creates a new TopLevel for the file at +absolute_name+. If documentation # is being generated outside the source dir +relative_name+ is relative to # the source directory. def initialize absolute_name, relative_name = absolute_name super() @name = nil @absolute_name = absolute_name @relative_name = relative_name @file_stat = File.stat(absolute_name) rescue nil # HACK for testing @diagram = nil @parser = nil @classes_or_modules = [] end ## # An RDoc::TopLevel is equal to another with the same relative_name def == other self.class === other and @relative_name == other.relative_name end alias eql? == ## # Adds +an_alias+ to +Object+ instead of +self+. def add_alias(an_alias) object_class.record_location self return an_alias unless @document_self object_class.add_alias an_alias end ## # Adds +constant+ to +Object+ instead of +self+. def add_constant constant object_class.record_location self return constant unless @document_self object_class.add_constant constant end ## # Adds +include+ to +Object+ instead of +self+. def add_include(include) object_class.record_location self return include unless @document_self object_class.add_include include end ## # Adds +method+ to +Object+ instead of +self+. def add_method(method) object_class.record_location self return method unless @document_self object_class.add_method method end ## # Adds class or module +mod+. Used in the building phase # by the ruby parser. def add_to_classes_or_modules mod @classes_or_modules << mod end ## # Base name of this file def base_name File.basename @relative_name end alias name base_name ## # Only a TopLevel that contains text file) will be displayed. See also # RDoc::CodeObject#display? def display? text? and super end ## # See RDoc::TopLevel::find_class_or_module #-- # TODO Why do we search through all classes/modules found, not just the # ones of this instance? def find_class_or_module name @store.find_class_or_module name end ## # Finds a class or module named +symbol+ def find_local_symbol(symbol) find_class_or_module(symbol) || super end ## # Finds a module or class with +name+ def find_module_named(name) find_class_or_module(name) end ## # Returns the relative name of this file def full_name @relative_name end ## # An RDoc::TopLevel has the same hash as another with the same # relative_name def hash @relative_name.hash end ## # URL for this with a +prefix+ def http_url(prefix) path = [prefix, @relative_name.tr('.', '_')] File.join(*path.compact) + '.html' end def inspect # :nodoc: "#<%s:0x%x %p modules: %p classes: %p>" % [ self.class, object_id, base_name, @modules.map { |n,m| m }, @classes.map { |n,c| c } ] end ## # Time this file was last modified, if known def last_modified @file_stat ? file_stat.mtime : nil end ## # Dumps this TopLevel for use by ri. See also #marshal_load def marshal_dump [ MARSHAL_VERSION, @relative_name, @parser, parse(@comment), ] end ## # Loads this TopLevel from +array+. def marshal_load array # :nodoc: initialize array[1] @parser = array[2] @comment = array[3] @file_stat = nil end ## # Returns the NormalClass "Object", creating it if not found. # # Records +self+ as a location in "Object". def object_class @object_class ||= begin oc = @store.find_class_named('Object') || add_class(RDoc::NormalClass, 'Object') oc.record_location self oc end end ## # Base name of this file without the extension def page_name basename = File.basename @relative_name basename =~ /\.(rb|rdoc|txt|md)$/i $` || basename end ## # Path to this file for use with HTML generator output. def path http_url @store.rdoc.generator.file_dir end def pretty_print q # :nodoc: q.group 2, "[#{self.class}: ", "]" do q.text "base name: #{base_name.inspect}" q.breakable items = @modules.map { |n,m| m } items.concat @modules.map { |n,c| c } q.seplist items do |mod| q.pp mod end end end ## # Search record used by RDoc::Generator::JsonIndex def search_record return unless @parser < RDoc::Parser::Text [ page_name, '', page_name, '', path, '', snippet(@comment), ] end ## # Is this TopLevel from a text file instead of a source code file? def text? @parser and @parser.ancestors.include? RDoc::Parser::Text end def to_s # :nodoc: "file #{full_name}" end end gems/rdoc-4.0.0/lib/rdoc/rd/block_parser.rb000064400000054265147207544650014212 0ustar00# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' class RDoc::RD ## # RD format parser for headings, paragraphs, lists, verbatim sections that # exist as blocks. class BlockParser < Racc::Parser # :stopdoc: TMPFILE = ["rdtmp", $$, 0] MARK_TO_LEVEL = { '=' => 1, '==' => 2, '===' => 3, '====' => 4, '+' => 5, '++' => 6, } # :startdoc: ## # Footnotes for this document attr_reader :footnotes ## # Labels for items in this document attr_reader :labels ## # Path to find included files in attr_accessor :include_path ## # Creates a new RDoc::RD::BlockParser. Use #parse to parse an rd-format # document. def initialize @inline_parser = RDoc::RD::InlineParser.new self @include_path = [] # for testing @footnotes = [] @labels = {} end ## # Parses +src+ and returns an RDoc::Markup::Document. def parse src @src = src @src.push false @footnotes = [] @labels = {} # @i: index(line no.) of src @i = 0 # stack for current indentation @indent_stack = [] # how indented. @current_indent = @indent_stack.join("") # RDoc::RD::BlockParser for tmp src @subparser = nil # which part is in now @in_part = nil @part_content = [] @in_verbatim = false @yydebug = true document = do_parse unless @footnotes.empty? then blankline = document.parts.pop document.parts << RDoc::Markup::Rule.new(1) document.parts.concat @footnotes document.parts.push blankline end document end ## # Returns the next token from the document def next_token # :nodoc: # preprocessing # if it is not in RD part # => method while @in_part != "rd" line = @src[@i] @i += 1 # next line case line # src end when false return [false, false] # RD part begin when /^=begin\s*(?:\bRD\b.*)?\s*$/ if @in_part # if in non-RD part @part_content.push(line) else @in_part = "rd" return [:WHITELINE, "=begin\n"] # <= for textblockand end # non-RD part begin when /^=begin\s+(\w+)/ part = $1 if @in_part # if in non-RD part @part_content.push(line) else @in_part = part if @tree.filter[part] # if filter exists # p "BEGIN_PART: #{@in_part}" # DEBUG end # non-RD part end when /^=end/ if @in_part # if in non-RD part # p "END_PART: #{@in_part}" # DEBUG # make Part-in object part = RDoc::RD::Part.new(@part_content.join(""), @tree, "r") @part_content.clear # call filter, part_out is output(Part object) part_out = @tree.filter[@in_part].call(part) if @tree.filter[@in_part].mode == :rd # if output is RD formated subtree = parse_subtree(part_out.to_a) else # if output is target formated basename = TMPFILE.join('.') TMPFILE[-1] += 1 tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w") tmpfile.print(part_out) tmpfile.close subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"]) end @in_part = nil return [:SUBTREE, subtree] end else if @in_part # if in non-RD part @part_content.push(line) end end end @current_indent = @indent_stack.join("") line = @src[@i] case line when false if_current_indent_equal("") do [false, false] end when /^=end/ if_current_indent_equal("") do @in_part = nil [:WHITELINE, "=end"] # MUST CHANGE?? end when /^\s*$/ @i += 1 # next line return [:WHITELINE, ':WHITELINE'] when /^\#/ # comment line @i += 1 # next line self.next_token() when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/ rest = $' # ' rest.strip! mark = $1 if_current_indent_equal("") do return [:HEADLINE, [MARK_TO_LEVEL[mark], rest]] end when /^<<<\s*(\S+)/ file = $1 if_current_indent_equal("") do suffix = file[-3 .. -1] if suffix == ".rd" or suffix == ".rb" subtree = parse_subtree(get_included(file)) [:SUBTREE, subtree] else [:INCLUDE, file] end end when /^(\s*)\*(\s*)/ rest = $' # ' newIndent = $2 if_current_indent_equal($1) do if @in_verbatim [:STRINGLINE, line] else @indent_stack.push("\s" << newIndent) [:ITEMLISTLINE, rest] end end when /^(\s*)(\(\d+\))(\s*)/ rest = $' # ' mark = $2 newIndent = $3 if_current_indent_equal($1) do if @in_verbatim [:STRINGLINE, line] else @indent_stack.push("\s" * mark.size << newIndent) [:ENUMLISTLINE, rest] end end when /^(\s*):(\s*)/ rest = $' # ' newIndent = $2 if_current_indent_equal($1) do if @in_verbatim [:STRINGLINE, line] else @indent_stack.push("\s#{$2}") [:DESCLISTLINE, rest] end end when /^(\s*)---(?!-|\s*$)/ indent = $1 rest = $' /\s*/ === rest term = $' new_indent = $& if_current_indent_equal(indent) do if @in_verbatim [:STRINGLINE, line] else @indent_stack.push("\s\s\s" + new_indent) [:METHODLISTLINE, term] end end when /^(\s*)/ if_current_indent_equal($1) do [:STRINGLINE, line] end else raise "[BUG] parsing error may occurred." end end ## # Yields to the given block if +indent+ matches the current indent, otherwise # an indentation token is processed. def if_current_indent_equal(indent) indent = indent.sub(/\t/, "\s" * 8) if @current_indent == indent @i += 1 # next line yield elsif indent.index(@current_indent) == 0 @indent_stack.push(indent[@current_indent.size .. -1]) [:INDENT, ":INDENT"] else @indent_stack.pop [:DEDENT, ":DEDENT"] end end private :if_current_indent_equal ## # Cuts off excess whitespace in +src+ def cut_off(src) ret = [] whiteline_buf = [] line = src.shift /^\s*/ =~ line indent = Regexp.quote($&) ret.push($') while line = src.shift if /^(\s*)$/ =~ line whiteline_buf.push(line) elsif /^#{indent}/ =~ line unless whiteline_buf.empty? ret.concat(whiteline_buf) whiteline_buf.clear end ret.push($') else raise "[BUG]: probably Parser Error while cutting off.\n" end end ret end private :cut_off def set_term_to_element(parent, term) # parent.set_term_under_document_struct(term, @tree.document_struct) parent.set_term_without_document_struct(term) end private :set_term_to_element ## # Raises a ParseError when invalid formatting is found def on_error(et, ev, _values) prv, cur, nxt = format_line_num(@i, @i+1, @i+2) raise ParseError, <|#{@src[@i].chomp} #{nxt} |#{@src[@i+1].chomp} Msg end ## # Current line number def line_index @i end ## # Parses subtree +src+ def parse_subtree src @subparser ||= RDoc::RD::BlockParser.new @subparser.parse src end private :parse_subtree ## # Retrieves the content for +file+ from the include_path def get_included(file) included = [] @include_path.each do |dir| file_name = File.join dir, file if File.exist? file_name then included = IO.readlines file_name break end end included end private :get_included ## # Formats line numbers +line_numbers+ prettily def format_line_num(*line_numbers) width = line_numbers.collect{|i| i.to_s.length }.max line_numbers.collect{|i| sprintf("%#{width}d", i) } end private :format_line_num ## # Retrieves the content of +values+ as a single String def content values values.map { |value| value.content }.join end ## # Creates a paragraph for +value+ def paragraph value content = cut_off(value).join(' ').rstrip contents = @inline_parser.parse content RDoc::Markup::Paragraph.new(*contents) end ## # Adds footnote +content+ to the document def add_footnote content index = @footnotes.length / 2 + 1 footmark_link = "{^#{index}}[rdoc-label:footmark-#{index}:foottext-#{index}]" @footnotes << RDoc::Markup::Paragraph.new(footmark_link, ' ', *content) @footnotes << RDoc::Markup::BlankLine.new index end ## # Adds label +label+ to the document def add_label label @labels[label] = true label end # :stopdoc: ##### State transition tables begin ### racc_action_table = [ 34, 35, 30, 33, 14, 73, 38, 33, 76, 15, 88, 34, 35, 30, 33, 40, 34, 35, 30, 33, 40, 65, 34, 35, 30, 33, 14, 73, 77, 14, 54, 15, 34, 35, 30, 33, 14, 9, 10, 11, 12, 15, 34, 35, 30, 33, 14, 73, 81, 54, 38, 15, 34, 35, 30, 33, 14, 73, 40, 67, 83, 15, 34, 35, 30, 33, 14, 73, 54, 30, 35, 15, 34, 35, 30, 33, 34, 47, 36, 14, 59, 15, 34, 35, 30, 33, 14, 73, 38, nil, nil, 15, 34, 35, 30, 33, nil, 47, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 9, 10, 11, 12, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, 61, 63, nil, 15, nil, 62, 60, 61, 63, 61, 63, 14, 62, 87, 62, nil, 79, 34, 35, 30, 33 ] racc_action_check = [ 86, 86, 86, 86, 86, 86, 57, 31, 49, 86, 86, 41, 41, 41, 41, 41, 15, 15, 15, 15, 15, 41, 45, 45, 45, 45, 45, 45, 51, 34, 54, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 85, 85, 85, 85, 85, 56, 33, 58, 85, 79, 79, 79, 79, 79, 79, 62, 44, 66, 79, 78, 78, 78, 78, 78, 78, 30, 28, 25, 78, 24, 24, 24, 24, 22, 24, 1, 35, 36, 24, 75, 75, 75, 75, 75, 75, 13, nil, nil, 75, 27, 27, 27, 27, nil, 27, nil, nil, nil, 27, 74, 74, 74, 74, 74, 74, nil, nil, nil, 74, 68, 68, 68, 68, 68, 68, nil, nil, nil, 68, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 46, 46, 46, 46, 46, 46, nil, nil, nil, 46, 47, 47, 47, 47, 47, 47, 39, 39, nil, 47, nil, 39, 39, 82, 82, 64, 64, 52, 82, 82, 64, nil, 52, 20, 20, 20, 20 ] racc_action_pointer = [ 29, 78, 119, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 81, nil, 13, nil, nil, nil, nil, 162, nil, 73, nil, 69, 66, nil, 89, 64, nil, 60, 1, nil, 41, 22, 72, 80, nil, nil, 141, nil, 8, nil, nil, 46, 19, 129, 139, nil, -5, nil, 15, 152, nil, 22, nil, 35, -1, 43, nil, nil, nil, 51, nil, 150, nil, 47, nil, 109, nil, nil, nil, nil, nil, 99, 79, nil, nil, 59, 49, nil, nil, 148, nil, nil, 39, -3, nil, nil ] racc_action_default = [ -2, -73, -1, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -16, -73, -23, -24, -25, -26, -27, -31, -32, -34, -72, -36, -38, -72, -40, -42, -59, -44, -46, -59, -63, -65, -73, -3, -15, -73, -22, -73, -30, -33, -73, -69, -70, -71, -37, -73, -41, -73, -51, -58, -61, -45, -73, -62, -64, 89, -17, -19, -73, -21, -18, -28, -73, -35, -66, -53, -54, -55, -56, -57, -67, -68, -39, -43, -49, -73, -60, -47, -73, -29, -52, -48, -73, -20, -50 ] racc_goto_table = [ 4, 39, 4, 68, 74, 75, 5, 6, 5, 6, 51, 42, 44, 56, 3, 49, 37, 57, 58, 41, 43, 48, 84, 50, 66, 55, 1, 64, 84, 84, 45, 46, 42, 45, 46, 2, 85, 86, 80, 84, 84, nil, nil, nil, nil, nil, nil, nil, 82, nil, nil, nil, 78 ] racc_goto_check = [ 4, 10, 4, 31, 31, 31, 5, 6, 5, 6, 27, 12, 21, 27, 3, 21, 3, 9, 9, 17, 19, 23, 32, 26, 11, 29, 1, 10, 32, 32, 5, 6, 12, 5, 6, 2, 31, 31, 33, 32, 32, nil, nil, nil, nil, nil, nil, nil, 10, nil, nil, nil, 4 ] racc_goto_pointer = [ nil, 26, 35, 14, 0, 6, 7, nil, nil, -17, -14, -17, -9, nil, nil, nil, nil, 4, nil, -2, nil, -12, nil, -4, nil, nil, -5, -20, nil, -6, nil, -42, -46, -16 ] racc_goto_default = [ nil, nil, nil, nil, 70, 71, 72, 7, 8, 13, nil, nil, 21, 16, 17, 18, 19, 20, 22, 23, 24, nil, 25, 26, 27, 28, 29, nil, 31, 32, 52, nil, 69, 53 ] racc_reduce_table = [ 0, 0, :racc_error, 1, 15, :_reduce_1, 0, 15, :_reduce_2, 2, 16, :_reduce_3, 1, 16, :_reduce_4, 1, 17, :_reduce_5, 1, 17, :_reduce_6, 1, 17, :_reduce_none, 1, 17, :_reduce_8, 1, 17, :_reduce_9, 1, 17, :_reduce_10, 1, 17, :_reduce_11, 1, 21, :_reduce_12, 1, 22, :_reduce_13, 1, 18, :_reduce_14, 2, 23, :_reduce_15, 1, 23, :_reduce_16, 3, 19, :_reduce_17, 1, 25, :_reduce_18, 2, 24, :_reduce_19, 4, 24, :_reduce_20, 2, 24, :_reduce_21, 1, 24, :_reduce_22, 1, 26, :_reduce_none, 1, 26, :_reduce_none, 1, 26, :_reduce_none, 1, 26, :_reduce_none, 1, 20, :_reduce_27, 3, 20, :_reduce_28, 4, 20, :_reduce_29, 2, 31, :_reduce_30, 1, 31, :_reduce_31, 1, 27, :_reduce_32, 2, 32, :_reduce_33, 1, 32, :_reduce_34, 3, 33, :_reduce_35, 1, 28, :_reduce_36, 2, 36, :_reduce_37, 1, 36, :_reduce_38, 3, 37, :_reduce_39, 1, 29, :_reduce_40, 2, 39, :_reduce_41, 1, 39, :_reduce_42, 3, 40, :_reduce_43, 1, 30, :_reduce_44, 2, 42, :_reduce_45, 1, 42, :_reduce_46, 3, 43, :_reduce_47, 3, 41, :_reduce_48, 2, 41, :_reduce_49, 4, 41, :_reduce_50, 1, 41, :_reduce_51, 2, 45, :_reduce_52, 1, 45, :_reduce_none, 1, 46, :_reduce_54, 1, 46, :_reduce_55, 1, 46, :_reduce_none, 1, 46, :_reduce_57, 1, 44, :_reduce_none, 0, 44, :_reduce_none, 2, 47, :_reduce_none, 1, 47, :_reduce_none, 2, 34, :_reduce_62, 1, 34, :_reduce_63, 2, 38, :_reduce_64, 1, 38, :_reduce_65, 2, 35, :_reduce_66, 2, 35, :_reduce_67, 2, 35, :_reduce_68, 1, 35, :_reduce_69, 1, 35, :_reduce_none, 1, 35, :_reduce_71, 0, 35, :_reduce_72 ] racc_reduce_n = 73 racc_shift_n = 89 racc_token_table = { false => 0, :error => 1, :DUMMY => 2, :ITEMLISTLINE => 3, :ENUMLISTLINE => 4, :DESCLISTLINE => 5, :METHODLISTLINE => 6, :STRINGLINE => 7, :WHITELINE => 8, :SUBTREE => 9, :HEADLINE => 10, :INCLUDE => 11, :INDENT => 12, :DEDENT => 13 } racc_nt_base = 14 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "DUMMY", "ITEMLISTLINE", "ENUMLISTLINE", "DESCLISTLINE", "METHODLISTLINE", "STRINGLINE", "WHITELINE", "SUBTREE", "HEADLINE", "INCLUDE", "INDENT", "DEDENT", "$start", "document", "blocks", "block", "textblock", "verbatim", "lists", "headline", "include", "textblockcontent", "verbatimcontent", "verbatim_after_lists", "list", "itemlist", "enumlist", "desclist", "methodlist", "lists2", "itemlistitems", "itemlistitem", "first_textblock_in_itemlist", "other_blocks_in_list", "enumlistitems", "enumlistitem", "first_textblock_in_enumlist", "desclistitems", "desclistitem", "description_part", "methodlistitems", "methodlistitem", "whitelines", "blocks_in_list", "block_in_list", "whitelines2" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted def _reduce_1(val, _values, result) result = RDoc::Markup::Document.new(*val[0]) result end def _reduce_2(val, _values, result) raise ParseError, "file empty" result end def _reduce_3(val, _values, result) result = val[0].concat val[1] result end def _reduce_4(val, _values, result) result = val[0] result end def _reduce_5(val, _values, result) result = val result end def _reduce_6(val, _values, result) result = val result end # reduce 7 omitted def _reduce_8(val, _values, result) result = val result end def _reduce_9(val, _values, result) result = val result end def _reduce_10(val, _values, result) result = [RDoc::Markup::BlankLine.new] result end def _reduce_11(val, _values, result) result = val[0].parts result end def _reduce_12(val, _values, result) # val[0] is like [level, title] title = @inline_parser.parse(val[0][1]) result = RDoc::Markup::Heading.new(val[0][0], title) result end def _reduce_13(val, _values, result) result = RDoc::Markup::Include.new val[0], @include_path result end def _reduce_14(val, _values, result) # val[0] is Array of String result = paragraph val[0] result end def _reduce_15(val, _values, result) result << val[1].rstrip result end def _reduce_16(val, _values, result) result = [val[0].rstrip] result end def _reduce_17(val, _values, result) # val[1] is Array of String content = cut_off val[1] result = RDoc::Markup::Verbatim.new(*content) # imform to lexer. @in_verbatim = false result end def _reduce_18(val, _values, result) # val[0] is Array of String content = cut_off val[0] result = RDoc::Markup::Verbatim.new(*content) # imform to lexer. @in_verbatim = false result end def _reduce_19(val, _values, result) result << val[1] result end def _reduce_20(val, _values, result) result.concat val[2] result end def _reduce_21(val, _values, result) result << "\n" result end def _reduce_22(val, _values, result) result = val # inform to lexer. @in_verbatim = true result end # reduce 23 omitted # reduce 24 omitted # reduce 25 omitted # reduce 26 omitted def _reduce_27(val, _values, result) result = val[0] result end def _reduce_28(val, _values, result) result = val[1] result end def _reduce_29(val, _values, result) result = val[1].push(val[2]) result end def _reduce_30(val, _values, result) result = val[0] << val[1] result end def _reduce_31(val, _values, result) result = [val[0]] result end def _reduce_32(val, _values, result) result = RDoc::Markup::List.new :BULLET, *val[0] result end def _reduce_33(val, _values, result) result.push(val[1]) result end def _reduce_34(val, _values, result) result = val result end def _reduce_35(val, _values, result) result = RDoc::Markup::ListItem.new nil, val[0], *val[1] result end def _reduce_36(val, _values, result) result = RDoc::Markup::List.new :NUMBER, *val[0] result end def _reduce_37(val, _values, result) result.push(val[1]) result end def _reduce_38(val, _values, result) result = val result end def _reduce_39(val, _values, result) result = RDoc::Markup::ListItem.new nil, val[0], *val[1] result end def _reduce_40(val, _values, result) result = RDoc::Markup::List.new :NOTE, *val[0] result end def _reduce_41(val, _values, result) result.push(val[1]) result end def _reduce_42(val, _values, result) result = val result end def _reduce_43(val, _values, result) term = @inline_parser.parse val[0].strip result = RDoc::Markup::ListItem.new term, *val[1] result end def _reduce_44(val, _values, result) result = RDoc::Markup::List.new :LABEL, *val[0] result end def _reduce_45(val, _values, result) result.push(val[1]) result end def _reduce_46(val, _values, result) result = val result end def _reduce_47(val, _values, result) result = RDoc::Markup::ListItem.new "#{val[0].strip}", *val[1] result end def _reduce_48(val, _values, result) result = [val[1]].concat(val[2]) result end def _reduce_49(val, _values, result) result = [val[1]] result end def _reduce_50(val, _values, result) result = val[2] result end def _reduce_51(val, _values, result) result = [] result end def _reduce_52(val, _values, result) result.concat val[1] result end # reduce 53 omitted def _reduce_54(val, _values, result) result = val result end def _reduce_55(val, _values, result) result = val result end # reduce 56 omitted def _reduce_57(val, _values, result) result = [] result end # reduce 58 omitted # reduce 59 omitted # reduce 60 omitted # reduce 61 omitted def _reduce_62(val, _values, result) result = paragraph [val[0]].concat(val[1]) result end def _reduce_63(val, _values, result) result = paragraph [val[0]] result end def _reduce_64(val, _values, result) result = paragraph [val[0]].concat(val[1]) result end def _reduce_65(val, _values, result) result = paragraph [val[0]] result end def _reduce_66(val, _values, result) result = [val[0]].concat(val[1]) result end def _reduce_67(val, _values, result) result.concat val[1] result end def _reduce_68(val, _values, result) result = val[1] result end def _reduce_69(val, _values, result) result = val result end # reduce 70 omitted def _reduce_71(val, _values, result) result = [] result end def _reduce_72(val, _values, result) result = [] result end def _reduce_none(val, _values, result) val[0] end end # class BlockParser end gems/rdoc-4.0.0/lib/rdoc/rd/inline.rb000064400000002555147207544650013015 0ustar00## # Inline keeps track of markup and labels to create proper links. class RDoc::RD::Inline ## # The text of the reference attr_reader :reference ## # The markup of this reference in RDoc format attr_reader :rdoc ## # Creates a new Inline for +rdoc+ and +reference+. # # +rdoc+ may be another Inline or a String. If +reference+ is not given it # will use the text from +rdoc+. def self.new rdoc, reference = rdoc if self === rdoc and reference.equal? rdoc then rdoc else super end end ## # Initializes the Inline with +rdoc+ and +inline+ def initialize rdoc, reference # :not-new: @reference = reference.equal?(rdoc) ? reference.dup : reference # unpack @reference = @reference.reference if self.class === @reference @rdoc = rdoc end def == other # :nodoc: self.class === other and @reference == other.reference and @rdoc == other.rdoc end ## # Appends +more+ to this inline. +more+ may be a String or another Inline. def append more case more when String then @reference << more @rdoc << more when RDoc::RD::Inline then @reference << more.reference @rdoc << more.rdoc else raise "unknown thingy #{more}" end self end def inspect # :nodoc: "(inline: #{self})" end alias to_s rdoc # :nodoc: end gems/rdoc-4.0.0/lib/rdoc/rd/inline_parser.rb000064400000076550147207544650014377 0ustar00# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' require 'strscan' class RDoc::RD ## # RD format parser for inline markup such as emphasis, links, footnotes, etc. class InlineParser < Racc::Parser # :stopdoc: EM_OPEN = '((*' EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/ EM_CLOSE = '*))' EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/ CODE_OPEN = '(({' CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/ CODE_CLOSE = '}))' CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/ VAR_OPEN = '((|' VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/ VAR_CLOSE = '|))' VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/ KBD_OPEN = '((%' KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/ KBD_CLOSE = '%))' KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/ INDEX_OPEN = '((:' INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/ INDEX_CLOSE = ':))' INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/ REF_OPEN = '((<' REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/ REF_CLOSE = '>))' REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/ FOOTNOTE_OPEN = '((-' FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/ FOOTNOTE_CLOSE = '-))' FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/ VERB_OPEN = "(('" VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/ VERB_CLOSE = "'))" VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/ BAR = "|" BAR_RE = /\A#{Regexp.quote(BAR)}/ QUOTE = '"' QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/ SLASH = "/" SLASH_RE = /\A#{Regexp.quote(SLASH)}/ BACK_SLASH = "\\" BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/ URL = "URL:" URL_RE = /\A#{Regexp.quote(URL)}/ other_re_mode = Regexp::EXTENDED other_re_mode |= Regexp::MULTILINE OTHER_RE = Regexp.new( "\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}| #{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}| #{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}| #{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}| #{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}| #{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}| #{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}| #{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}| #{Regexp.quote(BAR)}| #{Regexp.quote(QUOTE)}| #{Regexp.quote(SLASH)}| #{Regexp.quote(BACK_SLASH)}| #{Regexp.quote(URL)})", other_re_mode) # :startdoc: ## # Creates a new parser for inline markup in the rd format. The +block_parser+ # is used to for footnotes and labels in the inline text. def initialize block_parser @block_parser = block_parser end ## # Parses the +inline+ text from RD format into RDoc format. def parse inline @inline = inline @src = StringScanner.new inline @pre = "" @yydebug = true do_parse.to_s end ## # Returns the next token from the inline text def next_token return [false, false] if @src.eos? # p @src.rest if @yydebug if ret = @src.scan(EM_OPEN_RE) @pre << ret [:EM_OPEN, ret] elsif ret = @src.scan(EM_CLOSE_RE) @pre << ret [:EM_CLOSE, ret] elsif ret = @src.scan(CODE_OPEN_RE) @pre << ret [:CODE_OPEN, ret] elsif ret = @src.scan(CODE_CLOSE_RE) @pre << ret [:CODE_CLOSE, ret] elsif ret = @src.scan(VAR_OPEN_RE) @pre << ret [:VAR_OPEN, ret] elsif ret = @src.scan(VAR_CLOSE_RE) @pre << ret [:VAR_CLOSE, ret] elsif ret = @src.scan(KBD_OPEN_RE) @pre << ret [:KBD_OPEN, ret] elsif ret = @src.scan(KBD_CLOSE_RE) @pre << ret [:KBD_CLOSE, ret] elsif ret = @src.scan(INDEX_OPEN_RE) @pre << ret [:INDEX_OPEN, ret] elsif ret = @src.scan(INDEX_CLOSE_RE) @pre << ret [:INDEX_CLOSE, ret] elsif ret = @src.scan(REF_OPEN_RE) @pre << ret [:REF_OPEN, ret] elsif ret = @src.scan(REF_CLOSE_RE) @pre << ret [:REF_CLOSE, ret] elsif ret = @src.scan(FOOTNOTE_OPEN_RE) @pre << ret [:FOOTNOTE_OPEN, ret] elsif ret = @src.scan(FOOTNOTE_CLOSE_RE) @pre << ret [:FOOTNOTE_CLOSE, ret] elsif ret = @src.scan(VERB_OPEN_RE) @pre << ret [:VERB_OPEN, ret] elsif ret = @src.scan(VERB_CLOSE_RE) @pre << ret [:VERB_CLOSE, ret] elsif ret = @src.scan(BAR_RE) @pre << ret [:BAR, ret] elsif ret = @src.scan(QUOTE_RE) @pre << ret [:QUOTE, ret] elsif ret = @src.scan(SLASH_RE) @pre << ret [:SLASH, ret] elsif ret = @src.scan(BACK_SLASH_RE) @pre << ret [:BACK_SLASH, ret] elsif ret = @src.scan(URL_RE) @pre << ret [:URL, ret] elsif ret = @src.scan(OTHER_RE) @pre << ret [:OTHER, ret] else ret = @src.rest @pre << ret @src.terminate [:OTHER, ret] end end ## # Raises a ParseError when invalid formatting is found def on_error(et, ev, values) lines_of_rest = @src.rest.lines.to_a.length prev_words = prev_words_on_error(ev) at = 4 + prev_words.length message = <<-MSG RD syntax error: line #{@block_parser.line_index - lines_of_rest}: ...#{prev_words} #{(ev||'')} #{next_words_on_error()} ... MSG message << " " * at + "^" * (ev ? ev.length : 0) + "\n" raise ParseError, message end ## # Returns words before the error def prev_words_on_error(ev) pre = @pre if ev and /#{Regexp.quote(ev)}$/ =~ pre pre = $` end last_line(pre) end ## # Returns the last line of +src+ def last_line(src) if n = src.rindex("\n") src[(n+1) .. -1] else src end end private :last_line ## # Returns words following an error def next_words_on_error if n = @src.rest.index("\n") @src.rest[0 .. (n-1)] else @src.rest end end ## # Creates a new RDoc::RD::Inline for the +rdoc+ markup and the raw +reference+ def inline rdoc, reference = rdoc RDoc::RD::Inline.new rdoc, reference end # :stopdoc: ##### State transition tables begin ### racc_action_table = [ 63, 64, 65, 153, 81, 62, 76, 78, 79, 87, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 80, 152, 63, 64, 65, 61, 81, 62, 76, 78, 79, 124, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 80, 149, 104, 103, 102, 100, 101, 99, 115, 116, 117, 164, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 96, 118, 119, 104, 103, 102, 100, 101, 99, 115, 116, 117, 89, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 88, 118, 119, 104, 103, 102, 100, 101, 99, 115, 116, 117, 161, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 86, 118, 119, 104, 103, 102, 100, 101, 99, 115, 116, 117, 85, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 137, 118, 119, 63, 64, 65, 61, 81, 62, 76, 78, 79, 84, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 80, 22, 23, 24, 25, 26, 21, 18, 19, 176, 177, 13, 173, 14, 154, 15, 175, 16, 137, 17, 42, 148, 20, 54, 38, 53, 55, 56, 57, 29, 13, 177, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, 122, 17, nil, 54, 20, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 172, 135, 136, 54, 133, 53, 55, 56, 57, 165, 135, 136, 54, 133, 53, 55, 56, 57, 95, nil, nil, 54, 91, 53, 55, 56, 57, 174, 135, 136, 54, 133, 53, 55, 56, 57, 158, nil, nil, 54, nil, 53, 55, 56, 57, 178, 135, 136, 54, 133, 53, 55, 56, 57, 145, nil, nil, 54, 133, 53, 55, 56, 57, 145, nil, nil, 54, 133, 53, 55, 56, 57, 135, 136, 54, 133, 53, 55, 56, 57, 135, 136, 54, 133, 53, 55, 56, 57, 135, 136, 54, 133, 53, 55, 56, 57, 22, 23, 24, 25, 26, 21 ] racc_action_check = [ 61, 61, 61, 61, 61, 61, 61, 61, 61, 33, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 59, 59, 59, 59, 59, 59, 59, 59, 59, 41, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 97, 97, 97, 97, 97, 97, 97, 97, 97, 125, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 37, 97, 97, 38, 38, 38, 38, 38, 38, 38, 38, 38, 35, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 34, 38, 38, 155, 155, 155, 155, 155, 155, 155, 155, 155, 100, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 32, 155, 155, 91, 91, 91, 91, 91, 91, 91, 91, 91, 31, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 43, 91, 91, 20, 20, 20, 20, 20, 20, 20, 20, 20, 29, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 17, 17, 17, 17, 17, 17, 17, 17, 165, 165, 17, 162, 17, 90, 17, 164, 17, 94, 17, 18, 58, 17, 18, 18, 18, 18, 18, 18, 1, 18, 172, 18, nil, 18, nil, 18, nil, 18, nil, nil, 18, 19, 19, 19, 19, 19, 19, 19, 19, nil, nil, 19, nil, 19, nil, 19, nil, 19, nil, 19, nil, nil, 19, 16, 16, 16, 16, 16, 16, 16, 16, nil, nil, 16, nil, 16, nil, 16, nil, 16, nil, 16, nil, nil, 16, 15, 15, 15, 15, 15, 15, 15, 15, nil, nil, 15, nil, 15, nil, 15, nil, 15, nil, 15, 45, nil, 15, 45, 45, 45, 45, 45, 45, nil, 45, nil, 45, nil, 45, nil, 45, nil, 45, nil, nil, 45, 14, 14, 14, 14, 14, 14, 14, 14, nil, nil, 14, nil, 14, nil, 14, nil, 14, nil, 14, 146, nil, 14, 146, 146, 146, 146, 146, 146, nil, 146, nil, 146, nil, 146, nil, 146, nil, 146, nil, nil, 146, 13, 13, 13, 13, 13, 13, 13, 13, nil, nil, 13, nil, 13, nil, 13, nil, 13, nil, 13, 138, nil, 13, 138, 138, 138, 138, 138, 138, nil, 138, nil, 138, nil, 138, nil, 138, nil, 138, 44, nil, 138, 44, 44, 44, 44, 44, 44, nil, 44, nil, 44, nil, 44, nil, 44, nil, 44, nil, nil, 44, 2, 2, 2, 2, 2, 2, 2, 2, nil, nil, 2, nil, 2, nil, 2, nil, 2, 39, 2, nil, 39, 2, 39, 39, 39, 39, nil, 39, nil, 39, nil, 39, nil, 39, nil, 39, nil, nil, 39, 0, 0, 0, 0, 0, 0, 0, 0, nil, nil, 0, nil, 0, nil, 0, nil, 0, nil, 0, nil, nil, 0, 122, 122, 122, 122, 122, 122, 122, 122, nil, 122, nil, 122, nil, 122, nil, 122, nil, 122, nil, nil, 122, 127, 127, 127, 127, 127, 127, 127, 127, nil, 127, nil, 127, nil, 127, nil, 127, nil, 127, nil, nil, 127, 42, 42, 42, 42, 42, 42, 42, 42, nil, 42, nil, 42, nil, 42, nil, 42, nil, 42, nil, nil, 42, 159, 159, 159, 159, 159, 159, 159, 159, 159, 126, 126, 126, 126, 126, 126, 126, 126, 126, 36, nil, nil, 36, 36, 36, 36, 36, 36, 163, 163, 163, 163, 163, 163, 163, 163, 163, 92, nil, nil, 92, nil, 92, 92, 92, 92, 171, 171, 171, 171, 171, 171, 171, 171, 171, 142, nil, nil, 142, 142, 142, 142, 142, 142, 52, nil, nil, 52, 52, 52, 52, 52, 52, 95, 95, 95, 95, 95, 95, 95, 95, 168, 168, 168, 168, 168, 168, 168, 168, 158, 158, 158, 158, 158, 158, 158, 158, 27, 27, 27, 27, 27, 27 ] racc_action_pointer = [ 423, 188, 384, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 324, 283, 242, 220, 157, 176, 198, 135, nil, nil, nil, nil, nil, nil, 604, nil, 147, nil, 110, 96, -9, 69, 56, 526, 43, 66, 401, nil, 28, 486, 130, 362, 261, nil, nil, nil, nil, nil, nil, 571, nil, nil, nil, nil, nil, 169, 20, nil, -3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 150, 112, 544, nil, 172, 579, nil, 43, nil, nil, 95, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 444, nil, nil, 52, 517, 465, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 343, nil, nil, nil, 562, nil, nil, nil, 302, nil, nil, nil, nil, nil, nil, nil, nil, 89, nil, nil, 595, 508, nil, nil, 168, 535, 171, 164, nil, nil, 587, nil, nil, 553, 185, nil, nil, nil, nil, nil, nil ] racc_action_default = [ -138, -138, -1, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -138, -138, -138, -138, -138, -138, -138, -138, -103, -104, -105, -106, -107, -108, -111, -110, -138, -2, -138, -138, -138, -138, -138, -138, -138, -138, -27, -26, -35, -138, -58, -41, -40, -47, -48, -49, -50, -51, -52, -63, -66, -67, -68, -69, -70, -138, -138, -112, -138, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -137, -109, 179, -13, -14, -15, -16, -17, -138, -138, -23, -22, -33, -138, -19, -24, -79, -80, -138, -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100, -25, -35, -138, -58, -28, -138, -59, -42, -46, -55, -56, -65, -71, -72, -75, -76, -77, -31, -38, -44, -53, -54, -57, -61, -73, -74, -39, -62, -101, -102, -136, -113, -114, -115, -18, -20, -21, -33, -138, -138, -78, -81, -138, -59, -36, -37, -64, -45, -59, -43, -60, -138, -34, -36, -37, -29, -30, -32, -34 ] racc_goto_table = [ 126, 44, 125, 43, 144, 144, 160, 93, 97, 52, 166, 82, 144, 41, 40, 39, 138, 146, 169, 147, 167, 94, 44, 1, 123, 129, 169, 52, 36, 37, 52, 90, 59, 92, 121, 120, 31, 32, 33, 34, 35, 170, 58, 166, 83, 30, 170, 166, 151, nil, 150, nil, 166, 159, 8, 166, 8, nil, nil, nil, nil, 155, nil, 156, 160, nil, nil, 8, 8, 8, 8, 8, nil, 8, 4, nil, 4, 157, nil, nil, 163, nil, 162, 52, nil, 168, nil, 4, 4, 4, 4, 4, nil, 4, nil, nil, nil, nil, 144, nil, nil, nil, 144, nil, nil, 129, 144, 144, nil, 5, 129, 5, nil, nil, nil, nil, 171, 6, nil, 6, nil, nil, 5, 5, 5, 5, 5, 11, 5, 11, 6, 6, 6, 6, 6, 7, 6, 7, nil, nil, 11, 11, 11, 11, 11, nil, 11, nil, 7, 7, 7, 7, 7, nil, 7 ] racc_goto_check = [ 22, 24, 21, 23, 36, 36, 37, 18, 16, 34, 35, 41, 36, 20, 19, 17, 25, 25, 28, 32, 29, 23, 24, 1, 23, 24, 28, 34, 13, 15, 34, 14, 38, 17, 20, 19, 1, 1, 1, 1, 1, 33, 1, 35, 39, 3, 33, 35, 42, nil, 41, nil, 35, 22, 8, 35, 8, nil, nil, nil, nil, 16, nil, 18, 37, nil, nil, 8, 8, 8, 8, 8, nil, 8, 4, nil, 4, 23, nil, nil, 22, nil, 21, 34, nil, 22, nil, 4, 4, 4, 4, 4, nil, 4, nil, nil, nil, nil, 36, nil, nil, nil, 36, nil, nil, 24, 36, 36, nil, 5, 24, 5, nil, nil, nil, nil, 22, 6, nil, 6, nil, nil, 5, 5, 5, 5, 5, 11, 5, 11, 6, 6, 6, 6, 6, 7, 6, 7, nil, nil, 11, 11, 11, 11, 11, nil, 11, nil, 7, 7, 7, 7, 7, nil, 7 ] racc_goto_pointer = [ nil, 23, nil, 43, 74, 109, 117, 135, 54, nil, nil, 127, nil, 10, -5, 11, -30, -3, -29, -4, -5, -40, -42, -15, -17, -28, nil, nil, -120, -107, nil, nil, -33, -101, -9, -116, -40, -91, 12, 17, nil, -9, -13 ] racc_goto_default = [ nil, nil, 2, 3, 46, 47, 48, 49, 50, 9, 10, 51, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 140, nil, 45, 127, 139, 128, 141, 130, 142, 143, 132, 131, 134, 98, nil, 28, 27, nil, 60 ] racc_reduce_table = [ 0, 0, :racc_error, 1, 27, :_reduce_none, 2, 28, :_reduce_2, 1, 28, :_reduce_3, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 1, 29, :_reduce_none, 3, 30, :_reduce_13, 3, 31, :_reduce_14, 3, 32, :_reduce_15, 3, 33, :_reduce_16, 3, 34, :_reduce_17, 4, 35, :_reduce_18, 3, 35, :_reduce_19, 2, 40, :_reduce_20, 2, 40, :_reduce_21, 1, 40, :_reduce_22, 1, 40, :_reduce_23, 2, 41, :_reduce_24, 2, 41, :_reduce_25, 1, 41, :_reduce_26, 1, 41, :_reduce_27, 2, 39, :_reduce_none, 4, 39, :_reduce_29, 4, 39, :_reduce_30, 2, 43, :_reduce_31, 4, 43, :_reduce_32, 1, 44, :_reduce_33, 3, 44, :_reduce_34, 1, 45, :_reduce_none, 3, 45, :_reduce_36, 3, 45, :_reduce_37, 2, 46, :_reduce_38, 2, 46, :_reduce_39, 1, 46, :_reduce_40, 1, 46, :_reduce_41, 1, 47, :_reduce_none, 2, 51, :_reduce_43, 1, 51, :_reduce_44, 2, 53, :_reduce_45, 1, 53, :_reduce_46, 1, 50, :_reduce_none, 1, 50, :_reduce_none, 1, 50, :_reduce_none, 1, 50, :_reduce_none, 1, 50, :_reduce_none, 1, 50, :_reduce_none, 1, 54, :_reduce_none, 1, 54, :_reduce_none, 1, 55, :_reduce_none, 1, 55, :_reduce_none, 1, 56, :_reduce_57, 1, 52, :_reduce_58, 1, 57, :_reduce_59, 2, 58, :_reduce_60, 1, 58, :_reduce_none, 2, 49, :_reduce_62, 1, 49, :_reduce_none, 2, 48, :_reduce_64, 1, 48, :_reduce_none, 1, 60, :_reduce_none, 1, 60, :_reduce_none, 1, 60, :_reduce_none, 1, 60, :_reduce_none, 1, 60, :_reduce_none, 1, 62, :_reduce_none, 1, 62, :_reduce_none, 1, 59, :_reduce_none, 1, 59, :_reduce_none, 1, 61, :_reduce_none, 1, 61, :_reduce_none, 1, 61, :_reduce_none, 2, 42, :_reduce_78, 1, 42, :_reduce_none, 1, 63, :_reduce_none, 2, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 1, 63, :_reduce_none, 3, 36, :_reduce_101, 3, 37, :_reduce_102, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 1, 65, :_reduce_none, 2, 66, :_reduce_109, 1, 66, :_reduce_none, 1, 38, :_reduce_111, 1, 67, :_reduce_none, 2, 67, :_reduce_113, 2, 67, :_reduce_114, 2, 67, :_reduce_115, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 1, 68, :_reduce_none, 2, 64, :_reduce_136, 1, 64, :_reduce_none ] racc_reduce_n = 138 racc_shift_n = 179 racc_token_table = { false => 0, :error => 1, :EX_LOW => 2, :QUOTE => 3, :BAR => 4, :SLASH => 5, :BACK_SLASH => 6, :URL => 7, :OTHER => 8, :REF_OPEN => 9, :FOOTNOTE_OPEN => 10, :FOOTNOTE_CLOSE => 11, :EX_HIGH => 12, :EM_OPEN => 13, :EM_CLOSE => 14, :CODE_OPEN => 15, :CODE_CLOSE => 16, :VAR_OPEN => 17, :VAR_CLOSE => 18, :KBD_OPEN => 19, :KBD_CLOSE => 20, :INDEX_OPEN => 21, :INDEX_CLOSE => 22, :REF_CLOSE => 23, :VERB_OPEN => 24, :VERB_CLOSE => 25 } racc_nt_base = 26 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "EX_LOW", "QUOTE", "BAR", "SLASH", "BACK_SLASH", "URL", "OTHER", "REF_OPEN", "FOOTNOTE_OPEN", "FOOTNOTE_CLOSE", "EX_HIGH", "EM_OPEN", "EM_CLOSE", "CODE_OPEN", "CODE_CLOSE", "VAR_OPEN", "VAR_CLOSE", "KBD_OPEN", "KBD_CLOSE", "INDEX_OPEN", "INDEX_CLOSE", "REF_CLOSE", "VERB_OPEN", "VERB_CLOSE", "$start", "content", "elements", "element", "emphasis", "code", "var", "keyboard", "index", "reference", "footnote", "verb", "normal_str_ele", "substitute", "ref_label", "ref_label2", "ref_url_strings", "filename", "element_label", "element_label2", "ref_subst_content", "ref_subst_content_q", "ref_subst_strings_q", "ref_subst_strings_first", "ref_subst_ele2", "ref_subst_eles", "ref_subst_str_ele_first", "ref_subst_eles_q", "ref_subst_ele", "ref_subst_ele_q", "ref_subst_str_ele", "ref_subst_str_ele_q", "ref_subst_strings", "ref_subst_string3", "ref_subst_string", "ref_subst_string_q", "ref_subst_string2", "ref_url_string", "verb_strings", "normal_string", "normal_strings", "verb_string", "verb_normal_string" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted # reduce 1 omitted def _reduce_2(val, _values, result) result.append val[1] result end def _reduce_3(val, _values, result) result = val[0] result end # reduce 4 omitted # reduce 5 omitted # reduce 6 omitted # reduce 7 omitted # reduce 8 omitted # reduce 9 omitted # reduce 10 omitted # reduce 11 omitted # reduce 12 omitted def _reduce_13(val, _values, result) content = val[1] result = inline "#{content}", content result end def _reduce_14(val, _values, result) content = val[1] result = inline "#{content}", content result end def _reduce_15(val, _values, result) content = val[1] result = inline "+#{content}+", content result end def _reduce_16(val, _values, result) content = val[1] result = inline "#{content}", content result end def _reduce_17(val, _values, result) label = val[1] @block_parser.add_label label.reference result = "#{label}" result end def _reduce_18(val, _values, result) result = "{#{val[1]}}[#{val[2].join}]" result end def _reduce_19(val, _values, result) scheme, inline = val[1] result = "{#{inline}}[#{scheme}#{inline.reference}]" result end def _reduce_20(val, _values, result) result = [nil, inline(val[1])] result end def _reduce_21(val, _values, result) result = [ 'rdoc-label:', inline("#{val[0].reference}/#{val[1].reference}") ] result end def _reduce_22(val, _values, result) result = ['rdoc-label:', val[0].reference] result end def _reduce_23(val, _values, result) result = ['rdoc-label:', "#{val[0].reference}/"] result end def _reduce_24(val, _values, result) result = [nil, inline(val[1])] result end def _reduce_25(val, _values, result) result = [ 'rdoc-label:', inline("#{val[0].reference}/#{val[1].reference}") ] result end def _reduce_26(val, _values, result) result = ['rdoc-label:', val[0]] result end def _reduce_27(val, _values, result) ref = val[0].reference result = ['rdoc-label:', inline(ref, "#{ref}/")] result end # reduce 28 omitted def _reduce_29(val, _values, result) result = val[1] result end def _reduce_30(val, _values, result) result = val[1] result end def _reduce_31(val, _values, result) result = inline val[0] result end def _reduce_32(val, _values, result) result = inline "\"#{val[1]}\"" result end def _reduce_33(val, _values, result) result = inline val[0] result end def _reduce_34(val, _values, result) result = inline "\"#{val[1]}\"" result end # reduce 35 omitted def _reduce_36(val, _values, result) result = val[1] result end def _reduce_37(val, _values, result) result = inline val[1] result end def _reduce_38(val, _values, result) result = val[0].append val[1] result end def _reduce_39(val, _values, result) result = val[0].append val[1] result end def _reduce_40(val, _values, result) result = val[0] result end def _reduce_41(val, _values, result) result = inline val[0] result end # reduce 42 omitted def _reduce_43(val, _values, result) result = val[0].append val[1] result end def _reduce_44(val, _values, result) result = inline val[0] result end def _reduce_45(val, _values, result) result = val[0].append val[1] result end def _reduce_46(val, _values, result) result = val[0] result end # reduce 47 omitted # reduce 48 omitted # reduce 49 omitted # reduce 50 omitted # reduce 51 omitted # reduce 52 omitted # reduce 53 omitted # reduce 54 omitted # reduce 55 omitted # reduce 56 omitted def _reduce_57(val, _values, result) result = val[0] result end def _reduce_58(val, _values, result) result = inline val[0] result end def _reduce_59(val, _values, result) result = inline val[0] result end def _reduce_60(val, _values, result) result << val[1] result end # reduce 61 omitted def _reduce_62(val, _values, result) result << val[1] result end # reduce 63 omitted def _reduce_64(val, _values, result) result << val[1] result end # reduce 65 omitted # reduce 66 omitted # reduce 67 omitted # reduce 68 omitted # reduce 69 omitted # reduce 70 omitted # reduce 71 omitted # reduce 72 omitted # reduce 73 omitted # reduce 74 omitted # reduce 75 omitted # reduce 76 omitted # reduce 77 omitted def _reduce_78(val, _values, result) result << val[1] result end # reduce 79 omitted # reduce 80 omitted # reduce 81 omitted # reduce 82 omitted # reduce 83 omitted # reduce 84 omitted # reduce 85 omitted # reduce 86 omitted # reduce 87 omitted # reduce 88 omitted # reduce 89 omitted # reduce 90 omitted # reduce 91 omitted # reduce 92 omitted # reduce 93 omitted # reduce 94 omitted # reduce 95 omitted # reduce 96 omitted # reduce 97 omitted # reduce 98 omitted # reduce 99 omitted # reduce 100 omitted def _reduce_101(val, _values, result) index = @block_parser.add_footnote val[1].rdoc result = "{*#{index}}[rdoc-label:foottext-#{index}:footmark-#{index}]" result end def _reduce_102(val, _values, result) result = inline "#{val[1]}", val[1] result end # reduce 103 omitted # reduce 104 omitted # reduce 105 omitted # reduce 106 omitted # reduce 107 omitted # reduce 108 omitted def _reduce_109(val, _values, result) result << val[1] result end # reduce 110 omitted def _reduce_111(val, _values, result) result = inline val[0] result end # reduce 112 omitted def _reduce_113(val, _values, result) result = val[1] result end def _reduce_114(val, _values, result) result = val[1] result end def _reduce_115(val, _values, result) result = val[1] result end # reduce 116 omitted # reduce 117 omitted # reduce 118 omitted # reduce 119 omitted # reduce 120 omitted # reduce 121 omitted # reduce 122 omitted # reduce 123 omitted # reduce 124 omitted # reduce 125 omitted # reduce 126 omitted # reduce 127 omitted # reduce 128 omitted # reduce 129 omitted # reduce 130 omitted # reduce 131 omitted # reduce 132 omitted # reduce 133 omitted # reduce 134 omitted # reduce 135 omitted def _reduce_136(val, _values, result) result << val[1] result end # reduce 137 omitted def _reduce_none(val, _values, result) val[0] end end # class InlineParser end gems/rdoc-4.0.0/lib/rdoc/cross_reference.rb000064400000013476147207544650014305 0ustar00## # RDoc::CrossReference is a reusable way to create cross references for names. class RDoc::CrossReference ## # Regular expression to match class references # # 1. There can be a '\\' in front of text to suppress the cross-reference # 2. There can be a '::' in front of class names to reference from the # top-level namespace. # 3. The method can be followed by parenthesis (not recommended) CLASS_REGEXP_STR = '\\\\?((?:\:{2})?[A-Z]\w*(?:\:\:\w+)*)' ## # Regular expression to match method references. # # See CLASS_REGEXP_STR METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===)(?:\([\w.+*/=<>-]*\))?' ## # Regular expressions matching text that should potentially have # cross-reference links generated are passed to add_special. Note that # these expressions are meant to pick up text for which cross-references # have been suppressed, since the suppression characters are removed by the # code that is triggered. CROSSREF_REGEXP = /(?:^|\s) ( (?: # A::B::C.meth #{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR} # Stand-alone method (preceded by a #) | \\?\##{METHOD_REGEXP_STR} # Stand-alone method (preceded by ::) | ::#{METHOD_REGEXP_STR} # A::B::C # The stuff after CLASS_REGEXP_STR is a # nasty hack. CLASS_REGEXP_STR unfortunately matches # words like dog and cat (these are legal "class" # names in Fortran 95). When a word is flagged as a # potential cross-reference, limitations in the markup # engine suppress other processing, such as typesetting. # This is particularly noticeable for contractions. # In order that words like "can't" not # be flagged as potential cross-references, only # flag potential class cross-references if the character # after the cross-reference is a space, sentence # punctuation, tag start character, or attribute # marker. | #{CLASS_REGEXP_STR}(?=[@\s).?!,;<\000]|\z) # Things that look like filenames # The key thing is that there must be at least # one special character (period, slash, or # underscore). | (?:\.\.\/)*[-\/\w]+[_\/.][-\w\/.]+ # Things that have markup suppressed # Don't process things like '\<' in \, though. # TODO: including < is a hack, not very satisfying. | \\[^\s<] ) # labels for headings (?:@[\w+%-]+(?:\.[\w|%-]+)?)? )/x ## # Version of CROSSREF_REGEXP used when --hyperlink-all is specified. ALL_CROSSREF_REGEXP = / (?:^|\s) ( (?: # A::B::C.meth #{CLASS_REGEXP_STR}(?:[.#]|::)#{METHOD_REGEXP_STR} # Stand-alone method | \\?#{METHOD_REGEXP_STR} # A::B::C | #{CLASS_REGEXP_STR}(?=[@\s).?!,;<\000]|\z) # Things that look like filenames | (?:\.\.\/)*[-\/\w]+[_\/.][-\w\/.]+ # Things that have markup suppressed | \\[^\s<] ) # labels for headings (?:@[\w+%-]+)? )/x ## # Hash of references that have been looked-up to their replacements attr_accessor :seen ## # Allows cross-references to be created based on the given +context+ # (RDoc::Context). def initialize context @context = context @store = context.store @seen = {} end ## # Returns a reference to +name+. # # If the reference is found and +name+ is not documented +text+ will be # returned. If +name+ is escaped +name+ is returned. If +name+ is not # found +text+ is returned. def resolve name, text return @seen[name] if @seen.include? name if /#{CLASS_REGEXP_STR}([.#]|::)#{METHOD_REGEXP_STR}/o =~ name then type = $2 type = '' if type == '.' # will find either #method or ::method method = "#{type}#{$3}" container = @context.find_symbol_module($1) elsif /^([.#]|::)#{METHOD_REGEXP_STR}/o =~ name then type = $1 type = '' if type == '.' method = "#{type}#{$2}" container = @context else container = nil end if container then ref = container.find_local_symbol method unless ref || RDoc::TopLevel === container then ref = container.find_ancestor_local_symbol method end end ref = case name when /^\\(#{CLASS_REGEXP_STR})$/o then @context.find_symbol $1 else @context.find_symbol name end unless ref # Try a page name ref = @store.page name if not ref and name =~ /^\w+$/ ref = nil if RDoc::Alias === ref # external alias, can't link to it out = if name == '\\' then name elsif name =~ /^\\/ then # we remove the \ only in front of what we know: # other backslashes are treated later, only outside of ref ? $' : name elsif ref then if ref.display? then ref else text end else text end @seen[name] = out out end end gems/rdoc-4.0.0/lib/rdoc/code_object.rb000064400000017331147207544650013370 0ustar00## # Base class for the RDoc code tree. # # We contain the common stuff for contexts (which are containers) and other # elements (methods, attributes and so on) # # Here's the tree of the CodeObject subclasses: # # * RDoc::Context # * RDoc::TopLevel # * RDoc::ClassModule # * RDoc::AnonClass (never used so far) # * RDoc::NormalClass # * RDoc::NormalModule # * RDoc::SingleClass # * RDoc::MethodAttr # * RDoc::Attr # * RDoc::AnyMethod # * RDoc::GhostMethod # * RDoc::MetaMethod # * RDoc::Alias # * RDoc::Constant # * RDoc::Require # * RDoc::Include class RDoc::CodeObject include RDoc::Text ## # Our comment attr_reader :comment ## # Do we document our children? attr_reader :document_children ## # Do we document ourselves? attr_reader :document_self ## # Are we done documenting (ie, did we come across a :enddoc:)? attr_reader :done_documenting ## # Which file this code object was defined in attr_reader :file ## # Force documentation of this CodeObject attr_reader :force_documentation ## # Line in #file where this CodeObject was defined attr_accessor :line ## # Hash of arbitrary metadata for this CodeObject attr_reader :metadata ## # Offset in #file where this CodeObject was defined #-- # TODO character or byte? attr_accessor :offset ## # Sets the parent CodeObject attr_writer :parent ## # Did we ever receive a +:nodoc:+ directive? attr_reader :received_nodoc ## # Set the section this CodeObject is in attr_writer :section ## # The RDoc::Store for this object. attr_accessor :store ## # We are the model of the code, but we know that at some point we will be # worked on by viewers. By implementing the Viewable protocol, viewers can # associated themselves with these objects. attr_accessor :viewer ## # Creates a new CodeObject that will document itself and its children def initialize @metadata = {} @comment = '' @parent = nil @parent_name = nil # for loading @parent_class = nil # for loading @section = nil @section_title = nil # for loading @file = nil @full_name = nil @store = nil initialize_visibility end ## # Initializes state for visibility of this CodeObject and its children. def initialize_visibility # :nodoc: @document_children = true @document_self = true @done_documenting = false @force_documentation = false @received_nodoc = false @ignored = false end ## # Replaces our comment with +comment+, unless it is empty. def comment=(comment) @comment = case comment when NilClass then '' when RDoc::Markup::Document then comment when RDoc::Comment then comment.normalize else if comment and not comment.empty? then normalize_comment comment else # HACK correct fix is to have #initialize create @comment # with the correct encoding if String === @comment and Object.const_defined? :Encoding and @comment.empty? then @comment.force_encoding comment.encoding end @comment end end end ## # Should this CodeObject be shown in documentation? def display? @document_self and not @ignored end ## # Enables or disables documentation of this CodeObject's children unless it # has been turned off by :enddoc: def document_children=(document_children) @document_children = document_children unless @done_documenting end ## # Enables or disables documentation of this CodeObject unless it has been # turned off by :enddoc:. If the argument is +nil+ it means the # documentation is turned off by +:nodoc:+. def document_self=(document_self) return if @done_documenting @document_self = document_self @received_nodoc = true if document_self.nil? end ## # Does this object have a comment with content or is #received_nodoc true? def documented? @received_nodoc or !@comment.empty? end ## # Turns documentation on/off, and turns on/off #document_self # and #document_children. # # Once documentation has been turned off (by +:enddoc:+), # the object will refuse to turn #document_self or # #document_children on, so +:doc:+ and +:start_doc:+ directives # will have no effect in the current file. def done_documenting=(value) @done_documenting = value @document_self = !value @document_children = @document_self end ## # Yields each parent of this CodeObject. See also # RDoc::ClassModule#each_ancestor def each_parent code_object = self while code_object = code_object.parent do yield code_object end self end ## # File name where this CodeObject was found. # # See also RDoc::Context#in_files def file_name return unless @file @file.absolute_name end ## # Force the documentation of this object unless documentation # has been turned off by :enddoc: #-- # HACK untested, was assigning to an ivar def force_documentation=(value) @force_documentation = value unless @done_documenting end ## # Sets the full_name overriding any computed full name. # # Set to +nil+ to clear RDoc's cached value def full_name= full_name @full_name = full_name end ## # Use this to ignore a CodeObject and all its children until found again # (#record_location is called). An ignored item will not be shown in # documentation. # # See github issue #55 # # The ignored status is temporary in order to allow implementation details # to be hidden. At the end of processing a file RDoc allows all classes # and modules to add new documentation to previously created classes. # # If a class was ignored (via stopdoc) then reopened later with additional # documentation it should be shown. If a class was ignored and never # reopened it should not be shown. The ignore flag allows this to occur. def ignore @ignored = true stop_doc end ## # Has this class been ignored? def ignored? @ignored end ## # Our parent CodeObject. The parent may be missing for classes loaded from # legacy RI data stores. def parent return @parent if @parent return nil unless @parent_name if @parent_class == RDoc::TopLevel then @parent = @store.add_file @parent_name else @parent = @store.find_class_or_module @parent_name return @parent if @parent begin @parent = @store.load_class @parent_name rescue RDoc::Store::MissingFileError nil end end end ## # File name of our parent def parent_file_name @parent ? @parent.base_name : '(unknown)' end ## # Name of our parent def parent_name @parent ? @parent.full_name : '(unknown)' end ## # Records the RDoc::TopLevel (file) where this code object was defined def record_location top_level @ignored = false @file = top_level end ## # The section this CodeObject is in. Sections allow grouping of constants, # attributes and methods inside a class or module. def section return @section if @section @section = parent.add_section @section_title if parent end ## # Enable capture of documentation unless documentation has been # turned off by :enddoc: def start_doc return if @done_documenting @document_self = true @document_children = true @ignored = false end ## # Disable capture of documentation def stop_doc @document_self = false @document_children = false end end gems/rdoc-4.0.0/lib/rdoc/generator/darkfish.rb000064400000045306147207544650014714 0ustar00# -*- mode: ruby; ruby-indent-level: 2; tab-width: 2 -*- require 'erb' require 'fileutils' require 'pathname' require 'rdoc/generator/markup' ## # Darkfish RDoc HTML Generator # # $Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $ # # == Author/s # * Michael Granger (ged@FaerieMUD.org) # # == Contributors # * Mahlon E. Smith (mahlon@martini.nu) # * Eric Hodel (drbrain@segment7.net) # # == License # # Copyright (c) 2007, 2008, Michael Granger. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # * Neither the name of the author/s, nor the names of the project's # contributors may be used to endorse or promote products derived from this # software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # == Attributions # # Darkfish uses the {Silk Icons}[http://www.famfamfam.com/lab/icons/silk/] set # by Mark James. class RDoc::Generator::Darkfish RDoc::RDoc.add_generator self include ERB::Util ## # Path to this file's parent directory. Used to find templates and other # resources. GENERATOR_DIR = File.join 'rdoc', 'generator' ## # Release Version VERSION = '3' ## # Description of this generator DESCRIPTION = 'HTML generator, written by Michael Granger' ## # The relative path to style sheets and javascript. By default this is set # the same as the rel_prefix. attr_accessor :asset_rel_path ## # The path to generate files into, combined with --op from the # options for a full path. attr_reader :base_dir ## # Classes and modules to be used by this generator, not necessarily # displayed. See also #modsort attr_reader :classes ## # No files will be written when dry_run is true. attr_accessor :dry_run ## # When false the generate methods return a String instead of writing to a # file. The default is true. attr_accessor :file_output ## # Files to be displayed by this generator attr_reader :files ## # The JSON index generator for this Darkfish generator attr_reader :json_index ## # Methods to be displayed by this generator attr_reader :methods ## # Sorted list of classes and modules to be displayed by this generator attr_reader :modsort ## # The RDoc::Store that is the source of the generated content attr_reader :store ## # The output directory attr_reader :outputdir ## # Initialize a few instance variables before we start def initialize store, options @store = store @options = options @asset_rel_path = '' @base_dir = Pathname.pwd.expand_path @dry_run = @options.dry_run @file_output = true @template_dir = Pathname.new options.template_dir @template_cache = {} @classes = nil @context = nil @files = nil @methods = nil @modsort = nil @json_index = RDoc::Generator::JsonIndex.new self, options end ## # Output progress information if debugging is enabled def debug_msg *msg return unless $DEBUG_RDOC $stderr.puts(*msg) end ## # Directory where generated class HTML files live relative to the output # dir. def class_dir nil end ## # Directory where generated class HTML files live relative to the output # dir. def file_dir nil end ## # Create the directories the generated docs will live in if they don't # already exist. def gen_sub_directories @outputdir.mkpath end ## # Copy over the stylesheet into the appropriate place in the output # directory. def write_style_sheet debug_msg "Copying static files" options = { :verbose => $DEBUG_RDOC, :noop => @dry_run } FileUtils.cp @template_dir + 'rdoc.css', '.', options Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path| next if File.directory? path next if File.basename(path) =~ /^\./ dst = Pathname.new(path).relative_path_from @template_dir # I suck at glob dst_dir = dst.dirname FileUtils.mkdir_p dst_dir, options unless File.exist? dst_dir FileUtils.cp @template_dir + path, dst, options end end ## # Build the initial indices and output objects based on an array of TopLevel # objects containing the extracted information. def generate setup write_style_sheet generate_index generate_class_files generate_file_files generate_table_of_contents @json_index.generate copy_static rescue => e debug_msg "%s: %s\n %s" % [ e.class.name, e.message, e.backtrace.join("\n ") ] raise end ## # Copies static files from the static_path into the output directory def copy_static return if @options.static_path.empty? fu_options = { :verbose => $DEBUG_RDOC, :noop => @dry_run } @options.static_path.each do |path| unless File.directory? path then FileUtils.install path, @outputdir, fu_options.merge(:mode => 0644) next end Dir.chdir path do Dir[File.join('**', '*')].each do |entry| dest_file = @outputdir + entry if File.directory? entry then FileUtils.mkdir_p entry, fu_options else FileUtils.install entry, dest_file, fu_options.merge(:mode => 0644) end end end end end ## # Return a list of the documented modules sorted by salience first, then # by name. def get_sorted_module_list classes classes.select do |klass| klass.display? end.sort end ## # Generate an index page which lists all the classes which are documented. def generate_index setup template_file = @template_dir + 'index.rhtml' return unless template_file.exist? debug_msg "Rendering the index page..." out_file = @base_dir + @options.op_dir + 'index.html' rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path @title = @options.title render_template template_file, out_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating index.html: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generates a class file for +klass+ def generate_class klass, template_file = nil setup current = klass template_file ||= @template_dir + 'class.rhtml' debug_msg " working on %s (%s)" % [klass.full_name, klass.path] out_file = @outputdir + klass.path rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path svninfo = svninfo = get_svninfo(current) @title = "#{klass.type} #{klass.full_name} - #{@options.title}" debug_msg " rendering #{out_file}" render_template template_file, out_file do |io| binding end end ## # Generate a documentation file for each class and module def generate_class_files setup template_file = @template_dir + 'class.rhtml' template_file = @template_dir + 'classpage.rhtml' unless template_file.exist? return unless template_file.exist? debug_msg "Generating class documentation in #{@outputdir}" current = nil @classes.each do |klass| current = klass generate_class klass, template_file end rescue => e error = RDoc::Error.new \ "error generating #{current.path}: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generate a documentation file for each file def generate_file_files setup page_file = @template_dir + 'page.rhtml' fileinfo_file = @template_dir + 'fileinfo.rhtml' # for legacy templates filepage_file = @template_dir + 'filepage.rhtml' unless page_file.exist? or fileinfo_file.exist? return unless page_file.exist? or fileinfo_file.exist? or filepage_file.exist? debug_msg "Generating file documentation in #{@outputdir}" out_file = nil current = nil @files.each do |file| current = file if file.text? and page_file.exist? then generate_page file next end template_file = nil out_file = @outputdir + file.path debug_msg " working on %s (%s)" % [file.full_name, out_file] rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path unless filepage_file then if file.text? then next unless page_file.exist? template_file = page_file @title = file.page_name else next unless fileinfo_file.exist? template_file = fileinfo_file @title = "File: #{file.base_name}" end end @title += " - #{@options.title}" template_file ||= filepage_file render_template template_file, out_file do |io| binding end end rescue => e error = RDoc::Error.new "error generating #{out_file}: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generate a page file for +file+ def generate_page file setup template_file = @template_dir + 'page.rhtml' out_file = @outputdir + file.path debug_msg " working on %s (%s)" % [file.full_name, out_file] rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning current = current = file asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path @title = "#{file.page_name} - #{@options.title}" debug_msg " rendering #{out_file}" render_template template_file, out_file do |io| binding end end ## # Generates the 404 page for the RDoc servlet def generate_servlet_not_found path setup template_file = @template_dir + 'servlet_not_found.rhtml' return unless template_file.exist? debug_msg "Rendering the servlet 404 Not Found page..." rel_prefix = rel_prefix = '' search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = '' @title = 'Not Found' render_template template_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating servlet_not_found: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generates the servlet root page for the RDoc servlet def generate_servlet_root installed setup template_file = @template_dir + 'servlet_root.rhtml' return unless template_file.exist? debug_msg 'Rendering the servlet root page...' rel_prefix = '.' asset_rel_prefix = rel_prefix search_index_rel_prefix = asset_rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output @title = 'Local RDoc Documentation' render_template template_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating servlet_root: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generate an index page which lists all the classes which are documented. def generate_table_of_contents setup template_file = @template_dir + 'table_of_contents.rhtml' return unless template_file.exist? debug_msg "Rendering the Table of Contents..." out_file = @outputdir + 'table_of_contents.html' rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path @title = "Table of Contents - #{@options.title}" render_template template_file, out_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating table_of_contents.html: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Prepares for generation of output from the current directory def setup return if instance_variable_defined? :@outputdir @outputdir = Pathname.new(@options.op_dir).expand_path @base_dir return unless @store @classes = @store.all_classes_and_modules.sort @files = @store.all_files.sort @methods = @classes.map { |m| m.method_list }.flatten.sort @modsort = get_sorted_module_list @classes end ## # Return a string describing the amount of time in the given number of # seconds in terms a human can understand easily. def time_delta_string seconds return 'less than a minute' if seconds < 60 return "#{seconds / 60} minute#{seconds / 60 == 1 ? '' : 's'}" if seconds < 3000 # 50 minutes return 'about one hour' if seconds < 5400 # 90 minutes return "#{seconds / 3600} hours" if seconds < 64800 # 18 hours return 'one day' if seconds < 86400 # 1 day return 'about one day' if seconds < 172800 # 2 days return "#{seconds / 86400} days" if seconds < 604800 # 1 week return 'about one week' if seconds < 1209600 # 2 week return "#{seconds / 604800} weeks" if seconds < 7257600 # 3 months return "#{seconds / 2419200} months" if seconds < 31536000 # 1 year return "#{seconds / 31536000} years" end # %q$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $" SVNID_PATTERN = / \$Id:\s (\S+)\s # filename (\d+)\s # rev (\d{4}-\d{2}-\d{2})\s # Date (YYYY-MM-DD) (\d{2}:\d{2}:\d{2}Z)\s # Time (HH:MM:SSZ) (\w+)\s # committer \$$ /x ## # Try to extract Subversion information out of the first constant whose # value looks like a subversion Id tag. If no matching constant is found, # and empty hash is returned. def get_svninfo klass constants = klass.constants or return {} constants.find { |c| c.value =~ SVNID_PATTERN } or return {} filename, rev, date, time, committer = $~.captures commitdate = Time.parse "#{date} #{time}" return { :filename => filename, :rev => Integer(rev), :commitdate => commitdate, :commitdelta => time_delta_string(Time.now - commitdate), :committer => committer, } end ## # Creates a template from its components and the +body_file+. # # For backwards compatibility, if +body_file+ contains " #{head_file.read} #{body} #{footer_file.read} TEMPLATE end ## # Renders the ERb contained in +file_name+ relative to the template # directory and returns the result based on the current context. def render file_name template_file = @template_dir + file_name template = template_for template_file, false, RDoc::ERBPartial template.filename = template_file.to_s template.result @context end ## # Load and render the erb template in the given +template_file+ and write # it out to +out_file+. # # Both +template_file+ and +out_file+ should be Pathname-like objects. # # An io will be yielded which must be captured by binding in the caller. def render_template template_file, out_file = nil # :yield: io io_output = out_file && !@dry_run && @file_output erb_klass = io_output ? RDoc::ERBIO : ERB template = template_for template_file, true, erb_klass if io_output then debug_msg "Outputting to %s" % [out_file.expand_path] out_file.dirname.mkpath out_file.open 'w', 0644 do |io| io.set_encoding @options.encoding if Object.const_defined? :Encoding @context = yield io template_result template, @context, template_file end else @context = yield nil output = template_result template, @context, template_file debug_msg " would have written %d characters to %s" % [ output.length, out_file.expand_path ] if @dry_run output end end ## # Creates the result for +template+ with +context+. If an error is raised a # Pathname +template_file+ will indicate the file where the error occurred. def template_result template, context, template_file template.filename = template_file.to_s template.result context rescue NoMethodError => e raise RDoc::Error, "Error while evaluating %s: %s" % [ template_file.expand_path, e.message, ], e.backtrace end ## # Retrieves a cache template for +file+, if present, or fills the cache. def template_for file, page = true, klass = ERB template = @template_cache[file] return template if template if page then template = assemble_template file erbout = 'io' else template = file.read template = template.encode @options.encoding if Object.const_defined? :Encoding file_var = File.basename(file).sub(/\..*/, '') erbout = "_erbout_#{file_var}" end template = klass.new template, nil, '<>', erbout @template_cache[file] = template template end end gems/rdoc-4.0.0/lib/rdoc/generator/json_index.rb000064400000014326147207544650015257 0ustar00require 'json' ## # The JsonIndex generator is designed to complement an HTML generator and # produces a JSON search index. This generator is derived from sdoc by # Vladimir Kolesnikov and contains verbatim code written by him. # # This generator is designed to be used with a regular HTML generator: # # class RDoc::Generator::Darkfish # def initialize options # # ... # @base_dir = Pathname.pwd.expand_path # # @json_index = RDoc::Generator::JsonIndex.new self, options # end # # def generate # # ... # @json_index.generate # end # end # # == Index Format # # The index is output as a JSON file assigned to the global variable # +search_data+. The structure is: # # var search_data = { # "index": { # "searchIndex": # ["a", "b", ...], # "longSearchIndex": # ["a", "a::b", ...], # "info": [ # ["A", "A", "A.html", "", ""], # ["B", "A::B", "A::B.html", "", ""], # ... # ] # } # } # # The same item is described across the +searchIndex+, +longSearchIndex+ and # +info+ fields. The +searchIndex+ field contains the item's short name, the # +longSearchIndex+ field contains the full_name (when appropriate) and the # +info+ field contains the item's name, full_name, path, parameters and a # snippet of the item's comment. # # == LICENSE # # Copyright (c) 2009 Vladimir Kolesnikov # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class RDoc::Generator::JsonIndex include RDoc::Text ## # Where the search index lives in the generated output SEARCH_INDEX_FILE = File.join 'js', 'search_index.js' attr_reader :index # :nodoc: ## # Creates a new generator. +parent_generator+ is used to determine the # class_dir and file_dir of links in the output index. # # +options+ are the same options passed to the parent generator. def initialize parent_generator, options @parent_generator = parent_generator @store = parent_generator.store @options = options @template_dir = File.expand_path '../template/json_index', __FILE__ @base_dir = @parent_generator.base_dir @classes = nil @files = nil @index = nil end ## # Builds the JSON index as a Hash. def build_index reset @store.all_files.sort, @store.all_classes_and_modules.sort index_classes index_methods index_pages { :index => @index } end ## # Output progress information if debugging is enabled def debug_msg *msg return unless $DEBUG_RDOC $stderr.puts(*msg) end ## # Writes the JSON index to disk def generate debug_msg "Generating JSON index" debug_msg " writing search index to %s" % SEARCH_INDEX_FILE data = build_index return if @options.dry_run out_dir = @base_dir + @options.op_dir index_file = out_dir + SEARCH_INDEX_FILE FileUtils.mkdir_p index_file.dirname, :verbose => $DEBUG_RDOC index_file.open 'w', 0644 do |io| io.set_encoding Encoding::UTF_8 if Object.const_defined? :Encoding io.write 'var search_data = ' JSON.dump data, io, 0 end Dir.chdir @template_dir do Dir['**/*.js'].each do |source| dest = File.join out_dir, source FileUtils.install source, dest, :mode => 0644, :verbose => $DEBUG_RDOC end end end ## # Adds classes and modules to the index def index_classes debug_msg " generating class search index" documented = @classes.uniq.select do |klass| klass.document_self_or_methods end documented.each do |klass| debug_msg " #{klass.full_name}" record = klass.search_record @index[:searchIndex] << search_string(record.shift) @index[:longSearchIndex] << search_string(record.shift) @index[:info] << record end end ## # Adds methods to the index def index_methods debug_msg " generating method search index" list = @classes.uniq.map do |klass| klass.method_list end.flatten.sort_by do |method| [method.name, method.parent.full_name] end list.each do |method| debug_msg " #{method.full_name}" record = method.search_record @index[:searchIndex] << "#{search_string record.shift}()" @index[:longSearchIndex] << "#{search_string record.shift}()" @index[:info] << record end end ## # Adds pages to the index def index_pages debug_msg " generating pages search index" pages = @files.select do |file| file.text? end pages.each do |page| debug_msg " #{page.page_name}" record = page.search_record @index[:searchIndex] << search_string(record.shift) @index[:longSearchIndex] << '' record.shift @index[:info] << record end end ## # The directory classes are written to def class_dir @parent_generator.class_dir end ## # The directory files are written to def file_dir @parent_generator.file_dir end def reset files, classes # :nodoc: @files = files @classes = classes @index = { :searchIndex => [], :longSearchIndex => [], :info => [] } end ## # Removes whitespace and downcases +string+ def search_string string string.downcase.gsub(/\s/, '') end end gems/rdoc-4.0.0/lib/rdoc/generator/ri.rb000064400000000662147207544650013527 0ustar00## # Generates ri data files class RDoc::Generator::RI RDoc::RDoc.add_generator self ## # Description of this generator DESCRIPTION = 'creates ri data files' ## # Set up a new ri generator def initialize store, options #:not-new: @options = options @store = store @store.path = '.' end ## # Writes the parsed data store to disk for use by ri. def generate @store.save end end gems/rdoc-4.0.0/lib/rdoc/generator/template/json_index/js/navigation.js000064400000007117147207544650021656 0ustar00/* * Navigation allows movement using the arrow keys through the search results. * * When using this library you will need to set scrollIntoView to the * appropriate function for your layout. Use scrollInWindow if the container * is not scrollable and scrollInElement if the container is a separate * scrolling region. */ Navigation = new function() { this.initNavigation = function() { var _this = this; $(document).keydown(function(e) { _this.onkeydown(e); }).keyup(function(e) { _this.onkeyup(e); }); this.navigationActive = true; } this.setNavigationActive = function(state) { this.navigationActive = state; this.clearMoveTimeout(); } this.onkeyup = function(e) { if (!this.navigationActive) return; switch(e.keyCode) { case 37: //Event.KEY_LEFT: case 38: //Event.KEY_UP: case 39: //Event.KEY_RIGHT: case 40: //Event.KEY_DOWN: this.clearMoveTimeout(); break; } } this.onkeydown = function(e) { if (!this.navigationActive) return; switch(e.keyCode) { case 37: //Event.KEY_LEFT: if (this.moveLeft()) e.preventDefault(); break; case 38: //Event.KEY_UP: if (e.keyCode == 38 || e.ctrlKey) { if (this.moveUp()) e.preventDefault(); this.startMoveTimeout(false); } break; case 39: //Event.KEY_RIGHT: if (this.moveRight()) e.preventDefault(); break; case 40: //Event.KEY_DOWN: if (e.keyCode == 40 || e.ctrlKey) { if (this.moveDown()) e.preventDefault(); this.startMoveTimeout(true); } break; case 13: //Event.KEY_RETURN: if (this.$current) e.preventDefault(); this.select(this.$current); break; } if (e.ctrlKey && e.shiftKey) this.select(this.$current); } this.clearMoveTimeout = function() { clearTimeout(this.moveTimeout); this.moveTimeout = null; } this.startMoveTimeout = function(isDown) { if (!$.browser.mozilla && !$.browser.opera) return; if (this.moveTimeout) this.clearMoveTimeout(); var _this = this; var go = function() { if (!_this.moveTimeout) return; _this[isDown ? 'moveDown' : 'moveUp'](); _this.moveTimout = setTimeout(go, 100); } this.moveTimeout = setTimeout(go, 200); } this.moveRight = function() { } this.moveLeft = function() { } this.move = function(isDown) { } this.moveUp = function() { return this.move(false); } this.moveDown = function() { return this.move(true); } /* * Scrolls to the given element in the scrollable element view. */ this.scrollInElement = function(element, view) { var offset, viewHeight, viewScroll, height; offset = element.offsetTop; height = element.offsetHeight; viewHeight = view.offsetHeight; viewScroll = view.scrollTop; if (offset - viewScroll + height > viewHeight) { view.scrollTop = offset - viewHeight + height; } if (offset < viewScroll) { view.scrollTop = offset; } } /* * Scrolls to the given element in the window. The second argument is * ignored */ this.scrollInWindow = function(element, ignored) { var offset, viewHeight, viewScroll, height; offset = element.offsetTop; height = element.offsetHeight; viewHeight = window.innerHeight; viewScroll = window.scrollY; if (offset - viewScroll + height > viewHeight) { window.scrollTo(window.scrollX, offset - viewHeight + height); } if (offset < viewScroll) { window.scrollTo(window.scrollX, offset); } } } gems/rdoc-4.0.0/lib/rdoc/generator/template/json_index/js/searcher.js000064400000014713147207544650021313 0ustar00Searcher = function(data) { this.data = data; this.handlers = []; } Searcher.prototype = new function() { // search is performed in chunks of 1000 for non-blocking user input var CHUNK_SIZE = 1000; // do not try to find more than 100 results var MAX_RESULTS = 100; var huid = 1; var suid = 1; var runs = 0; this.find = function(query) { var queries = splitQuery(query); var regexps = buildRegexps(queries); var highlighters = buildHilighters(queries); var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++}; var _this = this; this.currentSuid = state.n; if (!query) return; var run = function() { // stop current search thread if new search started if (state.n != _this.currentSuid) return; var results = performSearch(_this.data, regexps, queries, highlighters, state); var hasMore = (state.limit > 0 && state.pass < 4); triggerResults.call(_this, results, !hasMore); if (hasMore) { setTimeout(run, 2); } runs++; }; runs = 0; // start search thread run(); } /* ----- Events ------ */ this.ready = function(fn) { fn.huid = huid; this.handlers.push(fn); } /* ----- Utilities ------ */ function splitQuery(query) { return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) { return string.match(/\S/) }); } function buildRegexps(queries) { return jQuery.map(queries, function(query) { return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i') }); } function buildHilighters(queries) { return jQuery.map(queries, function(query) { return jQuery.map(query.split(''), function(l, i) { return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2); }).join(''); }); } // function longMatchRegexp(index, longIndex, regexps) { // for (var i = regexps.length - 1; i >= 0; i--){ // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; // }; // return true; // } /* ----- Mathchers ------ */ /* * This record matches if the index starts with queries[0] and the record * matches all of the regexps */ function matchPassBeginning(index, longIndex, queries, regexps) { if (index.indexOf(queries[0]) != 0) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; }; return true; } /* * This record matches if the longIndex starts with queries[0] and the * longIndex matches all of the regexps */ function matchPassLongIndex(index, longIndex, queries, regexps) { if (longIndex.indexOf(queries[0]) != 0) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!longIndex.match(regexps[i])) return false; }; return true; } /* * This record matches if the index contains queries[0] and the record * matches all of the regexps */ function matchPassContains(index, longIndex, queries, regexps) { if (index.indexOf(queries[0]) == -1) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; }; return true; } /* * This record matches if regexps[0] matches the index and the record * matches all of the regexps */ function matchPassRegexp(index, longIndex, queries, regexps) { if (!index.match(regexps[0])) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; }; return true; } /* ----- Highlighters ------ */ function highlightRegexp(info, queries, regexps, highlighters) { var result = createResult(info); for (var i=0, l = regexps.length; i < l; i++) { result.title = result.title.replace(regexps[i], highlighters[i]); result.namespace = result.namespace.replace(regexps[i], highlighters[i]); }; return result; } function hltSubstring(string, pos, length) { return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length); } function highlightQuery(info, queries, regexps, highlighters) { var result = createResult(info); var pos = 0; var lcTitle = result.title.toLowerCase(); pos = lcTitle.indexOf(queries[0]); if (pos != -1) { result.title = hltSubstring(result.title, pos, queries[0].length); } result.namespace = result.namespace.replace(regexps[0], highlighters[0]); for (var i=1, l = regexps.length; i < l; i++) { result.title = result.title.replace(regexps[i], highlighters[i]); result.namespace = result.namespace.replace(regexps[i], highlighters[i]); }; return result; } function createResult(info) { var result = {}; result.title = info[0]; result.namespace = info[1]; result.path = info[2]; result.params = info[3]; result.snippet = info[4]; return result; } /* ----- Searching ------ */ function performSearch(data, regexps, queries, highlighters, state) { var searchIndex = data.searchIndex; var longSearchIndex = data.longSearchIndex; var info = data.info; var result = []; var i = state.from; var l = searchIndex.length; var togo = CHUNK_SIZE; var matchFunc, hltFunc; while (state.pass < 4 && state.limit > 0 && togo > 0) { if (state.pass == 0) { matchFunc = matchPassBeginning; hltFunc = highlightQuery; } else if (state.pass == 1) { matchFunc = matchPassLongIndex; hltFunc = highlightQuery; } else if (state.pass == 2) { matchFunc = matchPassContains; hltFunc = highlightQuery; } else if (state.pass == 3) { matchFunc = matchPassRegexp; hltFunc = highlightRegexp; } for (; togo > 0 && i < l && state.limit > 0; i++, togo--) { if (info[i].n == state.n) continue; if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) { info[i].n = state.n; result.push(hltFunc(info[i], queries, regexps, highlighters)); state.limit--; } }; if (searchIndex.length <= i) { state.pass++; i = state.from = 0; } else { state.from = i; } } return result; } function triggerResults(results, isLast) { jQuery.each(this.handlers, function(i, fn) { fn.call(this, results, isLast) }) } } gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_head.rhtml000064400000001635147207544650020307 0ustar00 <%= h @title %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml000064400000001004147207544650024555 0ustar00<% comment = if current.respond_to? :comment_location then current.comment_location else current.comment end table = current.parse(comment).table_of_contents if table.length > 1 then %>
<% end %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml000064400000000743147207544650022704 0ustar00<% unless klass.includes.empty? then %> <% end %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml000064400000000460147207544650022527 0ustar00 gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_VCS_info.rhtml000064400000000710147207544650022536 0ustar00<% if !svninfo.empty? then %> <% end %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/servlet_root.rhtml000064400000002073147207544650021773 0ustar00

Local RDoc Documentation

Here you can browse local documentation from the ruby standard library and your installed gems. <% gems = installed.select { |_, _, _, type,| type == :gem } %> <% missing = gems.reject { |_, _, exists,| exists } %> <% unless missing.empty? then %>

Missing Gem Documentation

You are missing documentation for some of your installed gems. You can install missing documentation for gems by running gem rdoc --all. After installing the missing documentation you only need to reload this page. The newly created documentation will automatically appear.

You can also install documentation for a specific gem by running one of the following commands.

    <% names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq %> <% names.each do |name| %>
  • gem rdoc <%=h name %> <% end %>
<% end %>
gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml000064400000000630147207544650022534 0ustar00<% unless klass.method_list.empty? then %> <% end %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml000064400000000746147207544650022553 0ustar00<% unless klass.extends.empty? then %> <% end %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml000064400000000603147207544650022362 0ustar00<% if klass.type == 'class' then %> <% end %> gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml000064400000000563147207544650023005 0ustar00

Not Found

The page <%=h path %> was not found

gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml000064400000000633147207544650022341 0ustar00 gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/index.rhtml000064400000000764147207544650020360 0ustar00
<% if @options.main_page && main_page = @files.find { |f| f.full_name == @options.main_page } then %> <%= main_page.description %> <% else %>

This is the API documentation for <%= @title %>. <% end %>

gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/rdoc.css000064400000024175147207544650017644 0ustar00/* * "Darkfish" Rdoc CSS * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ * * Author: Michael Granger * */ /* vim: ft=css et sw=2 ts=2 sts=2 */ /* Base Green is: #6C8C22 */ * { padding: 0; margin: 0; } body { background: #efefef; font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; margin-left: 40px; } body.file-popup { font-size: 90%; margin-left: 0; } h1 { font-size: 300%; text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; color: #6C8C22; } h2,h3,h4 { margin-top: 1.5em; } h1 span, h2 span, h3 span, h4 span, h5 span, h6 span { display: none; padding-left: 1em; font-size: 50%; vertical-align: super; } h1:hover span, h2:hover span, h3:hover span, h4:hover span, h5:hover span, h6:hover span { display: inline; } :link, :visited { color: #6C8C22; text-decoration: none; } :link:hover, :visited:hover { border-bottom: 1px dotted #6C8C22; } pre { background: #ddd; padding: 0.5em 0; } blockquote { background: #ddd; margin: 1em; padding: 0.25em; } blockquote > :first-child { margin-top: 0 !important; } /* @group Generic Classes */ .initially-hidden { display: none; } #search-field { width: 98%; background: #eee; border: none; height: 1.5em; -webkit-border-radius: 4px; } #search-field:focus { background: #f1edba; } #search-field:-moz-placeholder, #search-field::-webkit-input-placeholder { font-weight: bold; color: #666; } .missing-docs { font-size: 120%; background: white url(images/wrench_orange.png) no-repeat 4px center; color: #ccc; line-height: 2em; border: 1px solid #d00; opacity: 1; padding-left: 20px; text-indent: 24px; letter-spacing: 3px; font-weight: bold; -webkit-border-radius: 5px; -moz-border-radius: 5px; } .target-section { border: 2px solid #dcce90; border-left-width: 8px; padding: 0 1em; background: #fff3c2; } /* @end */ /* @group Index Page, Standalone file pages */ .indexpage ul { line-height: 160%; list-style: none; } .indexpage ul :link, .indexpage ul :visited { font-size: 16px; } .indexpage li { padding-left: 20px; } .indexpage ul > li { background: url(images/bullet_black.png) no-repeat left 4px; } .indexpage li.method { background: url(images/plugin.png) no-repeat left 4px; } .indexpage li.module { background: url(images/package.png) no-repeat left 4px; } .indexpage li.class { background: url(images/ruby.png) no-repeat left 4px; } .indexpage li.file { background: url(images/page_white_text.png) no-repeat left 4px; } .indexpage li li { background: url(images/tag_blue.png) no-repeat left 4px; } .indexpage li .toc-toggle { width: 16px; height: 16px; background: url(images/add.png) no-repeat; } .indexpage li .toc-toggle.open { background: url(images/delete.png) no-repeat; } /* @end */ /* @group Top-Level Structure */ #metadata { float: left; width: 260px; } #documentation { margin: 2em 1em 5em 300px; min-width: 340px; } #validator-badges { clear: both; margin: 1em 1em 2em; font-size: smaller; } /* @end */ /* @group Metadata Section */ #metadata .section { background-color: #dedede; -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #aaa; margin: 0 8px 8px; font-size: 90%; overflow: hidden; } #metadata h3.section-header { margin: 0; padding: 2px 8px; background: #ccc; color: #666; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-bottom: 1px solid #aaa; } #metadata #home-section h3.section-header { border-bottom: 0; } #metadata ul, #metadata dl, #metadata p { padding: 8px; list-style: none; } #file-metadata { margin-top: 2em; } #file-metadata ul { padding-left: 28px; list-style-image: url(images/page_green.png); } #table-of-contents { margin-top: 2em; } #table-of-contents ul { padding-left: 28px; list-style-image: url(images/tag_blue.png); } dl.svninfo { color: #666; margin: 0; } dl.svninfo dt { font-weight: bold; } ul.link-list li { white-space: nowrap; line-height: 20px; } ul.link-list .type { font-size: 8px; text-transform: uppercase; color: white; background: #969696; padding: 2px 4px; -webkit-border-radius: 5px; } .calls-super { background: url(images/arrow_up.png) no-repeat right center; } /* @end */ /* @group Class Metadata Section */ #class-metadata { margin-top: 2em; } /* @end */ /* @group Project Metadata Section */ #project-metadata { margin-top: 2em; } #project-metadata .section { border: 1px solid #aaa; } #project-metadata h3.section-header { border-bottom: 1px solid #aaa; position: relative; } #project-metadata form { color: #777; background: #ccc; } /* @end */ /* @group Documentation Section */ .description { font-size: 100%; color: #333; } .description p { margin: 1em 0.4em; } .description li p { margin: 0; } .description ol, .description ul { margin-left: 1.5em; } .description ol li, .description ul li { line-height: 1.4em; } .note-list { margin: 8px 0; } .label-list { margin: 8px 1.5em; border: 1px solid #ccc; } .description .label-list { font-size: 14px; } .note-list dt { font-weight: bold; } .note-list dd { padding: 0 12px; } .label-list dt { padding: 2px 4px; font-weight: bold; background: #ddd; } .label-list dd { padding: 2px 12px; } .label-list dd + dt, .note-list dd + dt { margin-top: 0.7em; } #documentation .section { font-size: 90%; } #documentation h2.section-header { margin-top: 1em; padding: 0.25em 0.5em; background: #ccc; color: #333; font-size: 175%; border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } .documentation-section-title { position: relative; } .documentation-section-title .section-click-top { position: absolute; top: 6px; right: 12px; font-size: 10px; color: #9b9877; visibility: hidden; padding-right: 0.5px; } .documentation-section-title:hover .section-click-top { visibility: visible; } #documentation h3.section-header { margin-top: 1em; padding: 0.25em 0.5em; background-color: #dedede; color: #333; font-size: 150%; border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } #constants-list > dl, #attributes-list > dl { margin: 1em 0 2em; border: 0; } #constants-list > dl dt, #attributes-list > dl dt { padding-left: 0; font-weight: bold; font-family: Monaco, "Andale Mono"; background: inherit; } #constants-list > dl dt a, #attributes-list > dl dt a { color: inherit; } #constants-list > dl dd, #attributes-list > dl dd { margin: 0 0 1em 0; padding: 0; color: #666; } .documentation-section h2 { position: relative; } .documentation-section h2 a { position: absolute; top: 8px; right: 10px; font-size: 12px; color: #9b9877; visibility: hidden; } .documentation-section h2:hover a { visibility: visible; } /* @group Method Details */ #documentation .method-source-code { display: none; } #documentation .method-description .method-calls-super { color: #333; font-weight: bolder; } #documentation .method-detail { margin: 0.5em 0; padding: 0.5em 0; cursor: pointer; } #documentation .method-detail:hover { background-color: #f1edba; } #documentation .method-heading { position: relative; padding: 2px 4px 0 20px; font-size: 125%; font-weight: bold; color: #333; background: url(images/brick.png) no-repeat left bottom; } #documentation .method-heading :link, #documentation .method-heading :visited { color: inherit; } #documentation .method-click-advice { position: absolute; top: 2px; right: 5px; font-size: 10px; color: #9b9877; visibility: hidden; padding-right: 20px; line-height: 20px; background: url(images/zoom.png) no-repeat right top; } #documentation .method-heading:hover .method-click-advice { visibility: visible; } #documentation .method-alias .method-heading { color: #666; background: url(images/brick_link.png) no-repeat left bottom; } #documentation .method-description, #documentation .aliases { margin: 0 20px; color: #666; } #documentation .method-description p, #documentation .aliases p { line-height: 1.2em; } #documentation .aliases { padding-top: 4px; font-style: italic; cursor: default; } #documentation .method-description p { margin-bottom: 0.5em; } #documentation .method-description ul { margin-left: 1.5em; } pre { margin: 0.5em 0; } #documentation .attribute-method-heading { background: url(images/tag_green.png) no-repeat left bottom; } #documentation #attribute-method-details .method-detail:hover { background-color: transparent; cursor: default; } #documentation .attribute-access-type { font-size: 60%; text-transform: uppercase; vertical-align: super; padding: 0 2px; } /* @end */ /* @end */ /* @group Source Code */ pre { overflow: auto; background: #262626; color: white; border: 1px dashed #999; padding: 0.5em; } .description pre { margin: 0 0.4em; } .ruby-constant { color: #7fffd4; background: transparent; } .ruby-keyword { color: #00ffff; background: transparent; } .ruby-ivar { color: #eedd82; background: transparent; } .ruby-operator { color: #00ffee; background: transparent; } .ruby-identifier { color: #ffdead; background: transparent; } .ruby-node { color: #ffa07a; background: transparent; } .ruby-comment { color: #dc0000; font-weight: bold; background: transparent; } .ruby-regexp { color: #ffa07a; background: transparent; } .ruby-value { color: #7fffd4; background: transparent; } /* @end */ /* @group search results */ #search-results h1 { font-size: 1em; font-weight: normal; text-shadow: none; } #search-results .current { background: #ccc; border-bottom: 1px solid transparent; } #search-results li { list-style: none; border-bottom: 1px solid #aaa; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; margin-bottom: 0.5em; } #search-results li:last-child { border-bottom: none; margin-bottom: 0; } #search-results li p { padding: 0; margin: 0.5em; } #search-results .search-namespace { font-weight: bold; } #search-results li em { background: yellow; font-style: normal; } #search-results pre { margin: 0.5em; } /* @end */ gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_in_files.rhtml000064400000000276147207544650022667 0ustar00 gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml000064400000000437147207544650023235 0ustar00 gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/js/search.js000064400000004502147207544650020412 0ustar00Search = function(data, input, result) { this.data = data; this.$input = $(input); this.$result = $(result); this.$current = null; this.$view = this.$result.parent(); this.searcher = new Searcher(data.index); this.init(); } Search.prototype = $.extend({}, Navigation, new function() { var suid = 1; this.init = function() { var _this = this; var observer = function() { _this.search(_this.$input[0].value); }; this.$input.keyup(observer); this.$input.click(observer); // mac's clear field this.searcher.ready(function(results, isLast) { _this.addResults(results, isLast); }) this.initNavigation(); this.setNavigationActive(false); } this.search = function(value, selectFirstMatch) { value = jQuery.trim(value).toLowerCase(); if (value) { this.setNavigationActive(true); } else { this.setNavigationActive(false); } if (value == '') { this.lastQuery = value; this.$result.empty(); this.setNavigationActive(false); } else if (value != this.lastQuery) { this.lastQuery = value; this.firstRun = true; this.searcher.find(value); } } this.addResults = function(results, isLast) { var target = this.$result.get(0); if (this.firstRun && (results.length > 0 || isLast)) { this.$current = null; this.$result.empty(); } for (var i=0, l = results.length; i < l; i++) { target.appendChild(this.renderItem.call(this, results[i])); }; if (this.firstRun && results.length > 0) { this.firstRun = false; this.$current = $(target.firstChild); this.$current.addClass('current'); } if (jQuery.browser.msie) this.$element[0].className += ''; } this.move = function(isDown) { if (!this.$current) return; var $next = this.$current[isDown ? 'next' : 'prev'](); if ($next.length) { this.$current.removeClass('current'); $next.addClass('current'); this.scrollIntoView($next[0], this.$view[0]); this.$current = $next; } return true; } this.hlt = function(html) { return this.escapeHTML(html). replace(/\u0001/g, ''). replace(/\u0002/g, ''); } this.escapeHTML = function(html) { return html.replace(/[&<>]/g, function(c) { return '&#' + c.charCodeAt(0) + ';'; }); } }); gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/js/jquery.js000064400000263025147207544650020473 0ustar00/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */ (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);gems/rdoc-4.0.0/lib/rdoc/generator/template/darkfish/js/darkfish.js000064400000010032147207544650020733 0ustar00/** * * Darkfish Page Functions * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $ * * Author: Michael Granger * */ /* Provide console simulation for firebug-less environments */ if (!("console" in window) || !("firebug" in console)) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; window.console = {}; for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {}; }; /** * Unwrap the first element that matches the given @expr@ from the targets and return them. */ $.fn.unwrap = function( expr ) { return this.each( function() { $(this).parents( expr ).eq( 0 ).after( this ).remove(); }); }; function showSource( e ) { var target = e.target; var codeSections = $(target). parents('.method-detail'). find('.method-source-code'); $(target). parents('.method-detail'). find('.method-source-code'). slideToggle(); }; function hookSourceViews() { $('.method-heading').click( showSource ); }; function toggleDebuggingSection() { $('.debugging-section').slideToggle(); }; function hookDebuggingToggle() { $('#debugging-toggle img').click( toggleDebuggingSection ); }; function hookTableOfContentsToggle() { $('.indexpage li .toc-toggle').each( function() { $(this).click( function() { $(this).toggleClass('open'); }); var section = $(this).next(); $(this).click( function() { section.slideToggle(); }); }); } function hookSearch() { var input = $('#search-field').eq(0); var result = $('#search-results').eq(0); $(result).show(); var search_section = $('#search-section').get(0); $(search_section).show(); var search = new Search(search_data, input, result); search.renderItem = function(result) { var li = document.createElement('li'); var html = ''; // TODO add relative path to